[0.15.26] High CPU usage when paused.
[0.15.26] High CPU usage when paused.
I am playing Factorio on a notebook. Sometimes I can only play some minutes at a time, so I usually leave it running, but paused. Since Factorio's CPU usage doesn't seem to reduce when paused, this keeps the fan spinning all the time, and the notebook gets quite warm. Would be nice if Factorio could reduce its CPU usage while paused.
Running with vsync disabled on Linux, X with Intel/modesetting driver.
This issue is not new in 0.15.18, it happened in all the versions before (that I played). So at least 0.14 and 0.13 as well.
Edit: CPU usage does go down when paused, but is still somewhat high. vsync doesn't seem to make a difference.
Running with vsync disabled on Linux, X with Intel/modesetting driver.
This issue is not new in 0.15.18, it happened in all the versions before (that I played). So at least 0.14 and 0.13 as well.
Edit: CPU usage does go down when paused, but is still somewhat high. vsync doesn't seem to make a difference.
Last edited by lxx on Tue Jul 04, 2017 6:50 am, edited 2 times in total.
Re: [0.15.18] High CPU usage when paused.
Update to 15.26 and post the log please.
Re: [0.15.18] High CPU usage when paused.
If you are playing under Linux I suggest starting factorio from a terminal and pressing ctrl-z to really pause the game and then "fg" to unpause it.
Re: [0.15.18] High CPU usage when paused.
mrvn wrote:If you are playing under Linux I suggest starting factorio from a terminal and pressing ctrl-z to really pause the game and then "fg" to unpause it.
This will work, but is more of a "patch", and it may have undesired side-effects (Factorio has issues in Windows when locking / switching users / resuming from sleep - I'm guessing similar things may happen when backgrounding under Linux).
Assuming most of the processing power is in the actual game simulation you would expect the CPU usage to drop significantly when the game is paused. If it doesn't - maybe there's a problem somewhere? (Or perhaps the architecture of the game/engine makes it much simpler to "run the simulation on idle" when paused... I can see this being the case).
Re: [0.15.18] High CPU usage when paused.
The game simulation is paused when the game is paused so any CPU usage you're seeing is rendering and processing of input. I can't speak for the linux build but on Windows when I pause the game the CPU usage drops to almost nothing.
If you want to get ahold of me I'm almost always on Discord.
Re: [0.15.18] High CPU usage when paused.
By the way, what do you mean by "pause the game"? Just opening the game menu?
Re: [0.15.18] High CPU usage when paused.
There you go.Loewchen wrote:Update to 15.26 and post the log please.
- Attachments
-
- factorio-current.log
- Factorio Log
- (2.81 KiB) Downloaded 96 times
Re: [0.15.18] High CPU usage when paused.
Well, I'm sending kill -STOP/-CONT, but the result should be the same. But it's a bit tedious.mrvn wrote:If you are playing under Linux I suggest starting factorio from a terminal and pressing ctrl-z to really pause the game and then "fg" to unpause it.
Re: [0.15.18] High CPU usage when paused.
Shift+Space, for me the that's binding for "Pause game" in the Options/Controls/Game. But it's about the same in the menu, I think.mrvn wrote:By the way, what do you mean by "pause the game"? Just opening the game menu?
Re: [0.15.18] High CPU usage when paused.
Well, my notebook (Haswell with on-chip GPU), is not very fast. The game runs acceptably, but when it's paused and in the background, it still eats ~50% of one CPU, which results in a lot of heat and fan noise.Rseding91 wrote:The game simulation is paused when the game is paused so any CPU usage you're seeing is rendering and processing of input. I can't speak for the linux build but on Windows when I pause the game the CPU usage drops to almost nothing.
That being sad, pausing the game results in a lower CPU usage. When playing it's easily >100%.
Re: [0.15.18] High CPU usage when paused.
Yeah, it's still drawing 60 fps. On my old low end desktop the FPS actually goes way up when I pause the game. All the time saved by not doing ticks goes into frame redraws. Playing I didn't get 60 fps, paused I do.
Re: [0.15.18] High CPU usage when paused.
I noticed this too. I think this was not happend in v0.14
When fully Zoomed In, and game is paused, it uses 4% cpu.
When fully zoomed Out, the game uses in paused mode about 19%..
When fully Zoomed In, and game is paused, it uses 4% cpu.
When fully zoomed Out, the game uses in paused mode about 19%..
Re: [0.15.18] High CPU usage when paused.
The game still renders when it's paused, so that takes some amount of CPU. If your hardware is not very fast, this might cause considerable CPU load.
Make sure you don't have any of the debug options enabled – they can take a lot of CPU to process.
Make sure you don't have any of the debug options enabled – they can take a lot of CPU to process.
Re: [0.15.18] High CPU usage when paused.
With the debug off (it did for me only show ups fps, does for me not change cpu %)Oxyd wrote:The game still renders when it's paused, so that takes some amount of CPU. If your hardware is not very fast, this might cause considerable CPU load.
Make sure you don't have any of the debug options enabled – they can take a lot of CPU to process.
When i play the game on full zoom window it uses 25%cpu (60fps/60ups), paused 19/20% cpu.
I find pausing the game resulting only in 5/6% cpu drop very poor.
Thats 1/5 of total cpu usage, that is removed while in paused mode.
Intel i7 3630QM 2.4ghz.
Well i found a work around to get it to use less cpu, i need to zoom in to maximum, en then pause the game.
Re: [0.15.18] High CPU usage when paused.
Well, the rendering is not for free, and it is multithreaded, so it can take more cpu easily.rorror wrote:With the debug off (it did for me only show ups fps, does for me not change cpu %)Oxyd wrote:The game still renders when it's paused, so that takes some amount of CPU. If your hardware is not very fast, this might cause considerable CPU load.
Make sure you don't have any of the debug options enabled – they can take a lot of CPU to process.
When i play the game on full zoom window it uses 25%cpu (60fps/60ups), paused 19/20% cpu.
I find pausing the game resulting only in 5/6% cpu drop very poor.
Thats 1/5 of total cpu usage, that is removed while in paused mode.
Intel i7 3630QM 2.4ghz.
Well i found a work around to get it to use less cpu, i need to zoom in to maximum, en then pause the game.
Re: [0.15.18] High CPU usage when paused.
It should be nearly free. Simply create a texture of the screen when pausing or opening menues and use that as background instead of compositing the whole frame 60 times a second. And only refresh the screen when something changes.kovarex wrote:Well, the rendering is not for free, and it is multithreaded, so it can take more cpu easily.rorror wrote:With the debug off (it did for me only show ups fps, does for me not change cpu %)Oxyd wrote:The game still renders when it's paused, so that takes some amount of CPU. If your hardware is not very fast, this might cause considerable CPU load.
Make sure you don't have any of the debug options enabled – they can take a lot of CPU to process.
When i play the game on full zoom window it uses 25%cpu (60fps/60ups), paused 19/20% cpu.
I find pausing the game resulting only in 5/6% cpu drop very poor.
Thats 1/5 of total cpu usage, that is removed while in paused mode.
Intel i7 3630QM 2.4ghz.
Well i found a work around to get it to use less cpu, i need to zoom in to maximum, en then pause the game.
Re: [0.15.18] High CPU usage when paused.
True that. But, maybe things can be optimized. Maybe render at a lower FPS when in menu/paused, if there's no input… or try to detect when the window is not visible and then skip the rendering.kovarex wrote:Well, the rendering is not for free, and it is multithreaded, so it can take more cpu easily.