Celestia is busting my CPU?
-
Topic authorVigor
Celestia is busting my CPU?
I use win32 version of celestia and I have noticed how much of CPU usage it has in idle loop (that is when you pause time etc). Celestia uses 99% of my CPU even if I minimize it to tray and pause time. The only way I can stop it to eat my cpu is to open help->license or something like that, but in that case it's not possible to minimize window. Any suggestions?
I don't know why, but it happens on all systems - Celestia always has something like 99% of CPU usage. Unfortunately, you'll just have to live with it (unless it's a fixable problem...).
"I have been asked, 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
Bringing up an old thread to say I noticed this as well and this generates so much heat that I'm not sure it's very healthy for my CPU. The extra fans spin up to try to cool it down, but that makes my computer sound like an airplane. Which isn't very fun in the long run, and also worrying how much it will shorten your CPU life.
I wish the idle loop of Celestia didn't consume 100% CPU. It must have something to do with Celestia trying to do something as fast as possible (redrawing screen??), and not something like max 30 frames per second, which should be good for anyone.
I wish the idle loop of Celestia didn't consume 100% CPU. It must have something to do with Celestia trying to do something as fast as possible (redrawing screen??), and not something like max 30 frames per second, which should be good for anyone.
Just adding to say that it seems that the high CPU usage comes from recalculating the positions of all visible objects as fast as possible, according to another thread. I wonder if this is really necessary, or if a thread "sleep" timer could be added so it does its recalculation work, waits 50-100 milliseconds or something like that, recalculates, etc. That could make a rather huge difference with no special difference to the user.
-
- Site Admin
- Posts: 4211
- Joined: 28.01.2002
- With us: 22 years 10 months
- Location: Seattle, Washington, USA
Celestia draws as many frames per second as it can up to a maximum equal to your refresh rate--at that point, it will idle during the extra time.
Recalculating the positions of objects every frame is essential. Only recalculating every 50-100ms would cause all manner of headaches. Anyhow, Celestia is probably limited by rendering speed more often than than orbital computation, so this wouldn't help most people.
The thing that Celestia should be doing is idling if it detects that it's minimized, and running at a lower priority in the if it's not in the foreground. I'll get to it eventually . . .
But, if you run Celestia in the foreground, it will use up every CPU cycle it can get to try and maintain a frame rate equal to the monitor refresh rate. 30 frames per second is definitely not good enough for everyone. Anyway, running your CPU at full bore isn't going to shorten it's life . . .
--Chris
Recalculating the positions of objects every frame is essential. Only recalculating every 50-100ms would cause all manner of headaches. Anyhow, Celestia is probably limited by rendering speed more often than than orbital computation, so this wouldn't help most people.
The thing that Celestia should be doing is idling if it detects that it's minimized, and running at a lower priority in the if it's not in the foreground. I'll get to it eventually . . .
But, if you run Celestia in the foreground, it will use up every CPU cycle it can get to try and maintain a frame rate equal to the monitor refresh rate. 30 frames per second is definitely not good enough for everyone. Anyway, running your CPU at full bore isn't going to shorten it's life . . .
--Chris
chris wrote:The thing that Celestia should be doing is idling if it detects that it's minimized, and running at a lower priority in the if it's not in the foreground. I'll get to it eventually . . .
Please consider this eventuality . The above mentioned issue is in my feature request list and I think that should be really useful.
Briefly my needings are to being able to use conveniently word processors, image editors or other programs without exiting Celestia.
I think that probably should be sufficent if Celestia suspends only the OpenGL rendering when the process hasn't the input focus.
Bye - Paolo
chris wrote:But, if you run Celestia in the foreground, it will use up every CPU cycle it can get to try and maintain a frame rate equal to the monitor refresh rate. 30 frames per second is definitely not good enough for everyone. Anyway, running your CPU at full bore isn't going to shorten it's life . . .
--Chris
OK, just thought that any refreshes to the "state" of Celestia more than 30 times per second wouldn't be noticeable to us anyway, but I guess it's unfortunately more to it than that.
CPU heat above it's specified maximum temperature does shorten the lifespan, so let's hope I'm below that one. (I should be unless they mounted inadequate fans)
I also agree with Paolo and think this would be a useful feature to lessen the need to play around with process priorities.
chris wrote:Celestia draws as many frames per second as it can up to a maximum equal to your refresh rate--at that point, it will idle during the extra time. ... The thing that Celestia should be doing is idling if it detects that it's minimized, and running at a lower priority in the if it's not in the foreground. I'll get to it eventually . . .
Howdy Chris,
As a suggestion, what about adding a Performance option to one of the menus, so the user can set how they want Celestia to function on that machine? The options could include:
* Max Frames Per Second (FPS)
* Idle when not in-focus or not on-top
* Others?
The Max FPS sub-option could contain pre-sets (checkboxes) if that would make programming easier. Folks with slower machines could use lower settings, and fast machines use higher settings. This would at least give the user a way to set it themselves.
The Idle option again gives the user control of CPU usage when Celestia is not the active window (minimized, not in focus, not on top, whatever it's called these days <smile>).
Personally, I have no problem with FPS or CPU usage, or being able to run other programs at the same time because I have a 3.06 GHz processor. My "game" machine has a 1.3 GHz, so Celestia might be a whole lot slower and maybe not run additional programs at the same time very well.
Bottom Line: I'm just suggesting that you give some control over Celestia's use of the CPU to the user, instead of trying to hard-code this or that, which may be good for user X but not so good for user Z.
Cheers for now...
-Don
don wrote:As a suggestion, what about adding a Performance option to one of the menus, so the user can set how they want Celestia to function on that machine?
I'd rather suggest to put it in celestia.cfg, as it isn't an option you are selecting everyday... We don't need to overload the options dialog with scarcely changed features.
-
- Posts: 1034
- Joined: 16.12.2002
- With us: 21 years 11 months
- Location: People's Republic Of Cork, Ireland
jamarsa wrote:I'd rather suggest to put it in celestia.cfg, as it isn't an option you are selecting everyday... We don't need to overload the options dialog with scarcely changed features.
Even if I hardly ever used it, I'd prefer to have the option within celestia, so I don't have to exit & restart evey time... It's almost always better to have the settings in one place, rather than spread in many places, don't you think?
Javier: Yes.
Please see my post on the Developers forum: http://ennui.shatters.net/forum/viewtopic.php?t=2934
-Don
Please see my post on the Developers forum: http://ennui.shatters.net/forum/viewtopic.php?t=2934
-Don