fps drops but cpu< 50%
-
- Fast Inserter
- Posts: 182
- Joined: Mon Jan 20, 2020 4:41 am
- Contact:
fps drops but cpu< 50%
Hi,
I have found that my fps drops less 60, but my cpu usage is less than 50% and gpu usage is less than 25 percent.
is there anything i can do to improve performance.
I have found that my fps drops less 60, but my cpu usage is less than 50% and gpu usage is less than 25 percent.
is there anything i can do to improve performance.
Re: fps drops but cpu< 50%
Less than 50% CPU usage on a single core or on all cores?varundevan wrote: Tue Jun 16, 2020 12:06 pm […] my cpu usage is less than 50% and gpu usage is less than 25 percent. […]
Factorio is only partially parallelized because a lot of the game state updates cannot be easily disentangled.
Does UPS go down too or is it just FPS?
If UPS goes down, too: do you use mods that perform many computations via script? You can check the debug visualizations (press F4 or F5) to check the script computation times.
Factorio is not a 3D game, so it probably never fully occupy your GPU. After all, many parts of your GPU are made to compute/render 3D graphics and remain unused when running a 2D game.
-
- Fast Inserter
- Posts: 182
- Joined: Mon Jan 20, 2020 4:41 am
- Contact:
Re: fps drops but cpu< 50%
thanks for dropping by,valneq wrote: Tue Jun 16, 2020 2:23 pmLess than 50% CPU usage on a single core or on all cores?varundevan wrote: Tue Jun 16, 2020 12:06 pm […] my cpu usage is less than 50% and gpu usage is less than 25 percent. […]
Factorio is only partially parallelized because a lot of the game state updates cannot be easily disentangled.
Does UPS go down too or is it just FPS?
If UPS goes down, too: do you use mods that perform many computations via script? You can check the debug visualizations (press F4 or F5) to check the script computation times.
Factorio is not a 3D game, so it probably never fully occupy your GPU. After all, many parts of your GPU are made to compute/render 3D graphics and remain unused when running a 2D game.
usage in all cores is less than or about 50 % usage.
in F5 may details are shown, am not familiar with many,
i am running the native game itself , no mods , nothing
yet my fps is less than 60 ..
Re: fps drops but cpu< 50%
That is not how it works. GPU usage measures the amount of GPU core cycles that do not have an instruction loaded. It can be 100% even if you are not rendering anything at all and it is easy to max out with just 2d graphics. Besides modern 2d graphics are just 3d graphics where everything is aligned perpendicular and are rendered at the same distance from the camera.valneq wrote: Tue Jun 16, 2020 2:23 pmFactorio is not a 3D game, so it probably never fully occupy your GPU. After all, many parts of your GPU are made to compute/render 3D graphics and remain unused when running a 2D game.
CPU usage also does not count each CPU component like alus and simd units etc. Just the main instruction stack.
A thread can jump between cores during execution. But it can only ever use at most one cores worth of CPU. So if a thread is jumping between two threads it is very common to see two cores at 50% usage. If you want to be sure you can use process explorer and look at properties of factorio and the threads tab. If there is a thread that is using close to (100/coresinyourcpu)% CPU then you are hitting the limit of what your CPU can do.varundevan wrote: Tue Jun 16, 2020 5:48 pmusage in all cores is less than or about 50 % usage.
in F5 may details are shown, am not familiar with many,
i am running the native game itself , no mods , nothing
yet my fps is less than 60 ..
If you can show us a screenshot of the f4/f5 data we can probably help pinpoint what is going on.
-
- Fast Inserter
- Posts: 182
- Joined: Mon Jan 20, 2020 4:41 am
- Contact:
Re: fps drops but cpu< 50%
Thanks for the reply,PunPun wrote: Fri Jun 19, 2020 3:51 pmThat is not how it works. GPU usage measures the amount of GPU core cycles that do not have an instruction loaded. It can be 100% even if you are not rendering anything at all and it is easy to max out with just 2d graphics. Besides modern 2d graphics are just 3d graphics where everything is aligned perpendicular and are rendered at the same distance from the camera.valneq wrote: Tue Jun 16, 2020 2:23 pmFactorio is not a 3D game, so it probably never fully occupy your GPU. After all, many parts of your GPU are made to compute/render 3D graphics and remain unused when running a 2D game.
CPU usage also does not count each CPU component like alus and simd units etc. Just the main instruction stack.
A thread can jump between cores during execution. But it can only ever use at most one cores worth of CPU. So if a thread is jumping between two threads it is very common to see two cores at 50% usage. If you want to be sure you can use process explorer and look at properties of factorio and the threads tab. If there is a thread that is using close to (100/coresinyourcpu)% CPU then you are hitting the limit of what your CPU can do.varundevan wrote: Tue Jun 16, 2020 5:48 pmusage in all cores is less than or about 50 % usage.
in F5 may details are shown, am not familiar with many,
i am running the native game itself , no mods , nothing
yet my fps is less than 60 ..
If you can show us a screenshot of the f4/f5 data we can probably help pinpoint what is going on.
here is the screenshot of F5, i don't understand much of this. I appreciate if you could figure something out of it.

- Attachments
-
- 12345.png (3.46 MiB) Viewed 4233 times
Re: fps drops but cpu< 50%
According to this data, everything is OK:
In the top right you see that both FPS (frames per second) and UPS (updates per second) are at 60.
A screenshot that shows where one of them drops considerably would be more insightful.
For FPS it might depend on zoom level and what is shown on screen.
If you play with biters that attack your defenses, destroying them might cause spikes of heavy load on CPU/GPU when they attack (and specifically if that is shown on screen!).
In the top right you see that both FPS (frames per second) and UPS (updates per second) are at 60.
A screenshot that shows where one of them drops considerably would be more insightful.
For FPS it might depend on zoom level and what is shown on screen.
If you play with biters that attack your defenses, destroying them might cause spikes of heavy load on CPU/GPU when they attack (and specifically if that is shown on screen!).
-
- Fast Inserter
- Posts: 182
- Joined: Mon Jan 20, 2020 4:41 am
- Contact:
Re: fps drops but cpu< 50%
thanks for the reply,valneq wrote: Mon Jun 22, 2020 11:31 am According to this data, everything is OK:
In the top right you see that both FPS (frames per second) and UPS (updates per second) are at 60.
A screenshot that shows where one of them drops considerably would be more insightful.
For FPS it might depend on zoom level and what is shown on screen.
If you play with biters that attack your defenses, destroying them might cause spikes of heavy load on CPU/GPU when they attack (and specifically if that is shown on screen!).
here is an instance when i found the drop in drop in fps ,
please take a look at the image ...
Re: fps drops but cpu< 50%
It appears that FPS is capped by the UPS not reaching 60.
UPS measures updates of the game state (known as tick) per second. Normally the game tries to update the state 60 times per second, so that each changed state can be drawn by the GPU on screen. If the update takes more than 1s/60 = 16.667ms, the GPU has nothing to draw, so FPS will drop, too.
Why is UPS dropping?
From what I can see in the center left "Update" section (and be aware: I am no technical expert), the most time appears to be spent on
average/min/max
15.261/13.951/19.859
So you run into the limit of what your computer can handle.
In particular, the train path finder appears to have spikes of computation times, caused by finding paths for trains in very large/compex train systems. This is likely causing the peaks in the total maximum update time.
But the computation time for entities alone reaching half of the entire available time hints towards a very large base in the first place, or a large uncovered area with lots of active biters.
It is possible that your base is just large enough to run into the biggest bottleneck for Factorio: Ram access speed / timings.
As far as I am aware, the CPU is not the limiting factor in a large base, but how quickly the data can be loaded from RAM into the CPU, and back into RAM. If your RAM is not fast enough, your CPU will not be running at 100% all the time.
In order to get this confirmed by someone who knows the technical side better than I do, they might want to additionally have a look at your save file and your logfile.
In the mean time, you could try lowering some graphics settings. For example animation quality, graphics quality, light rendering, smoke effects, or particle effects. But since you appear to be capped by UPS (not FPS), I doubt that this will magically solve your issue.
Another suspicion that I have: a lot of computation time (and RAM access) is required to deal with large amounts of biters.
This was reported several times. Especially, when you have artillery that permanently arrgoes large amounts of biters to come attack you (and need to compute attack paths).
So if you play with biters that constantly attack your base, this has a considerable impact on performance.
If you don't want to deal with biters and just scale up your base, it could be a good idea to just remove all biters from the game and disallow them from spawning in the future. The wiki explains how:
https://wiki.factorio.com/Console#Enemy ... on_scripts
Other people try to optimize their factory design so as to not use a lot of entities that require much time to update. You can search the forums for "UPS" and "megabase" and find lots of issues/ideas/solutions. For example: Solar panels are much easier to deal with (computationally) than steam or nuclear power. The latter rely on fluids, inserters and transport belts.
Other than that, there is not much I can tell you. Even with a savegame or a logfile. But other people might.
UPS measures updates of the game state (known as tick) per second. Normally the game tries to update the state 60 times per second, so that each changed state can be drawn by the GPU on screen. If the update takes more than 1s/60 = 16.667ms, the GPU has nothing to draw, so FPS will drop, too.
Why is UPS dropping?
From what I can see in the center left "Update" section (and be aware: I am no technical expert), the most time appears to be spent on
- entity updates (~7ms)
- transport lines (items on belts) (~4ms)
- trains (~1ms)
average/min/max
15.261/13.951/19.859
So you run into the limit of what your computer can handle.
In particular, the train path finder appears to have spikes of computation times, caused by finding paths for trains in very large/compex train systems. This is likely causing the peaks in the total maximum update time.
But the computation time for entities alone reaching half of the entire available time hints towards a very large base in the first place, or a large uncovered area with lots of active biters.
It is possible that your base is just large enough to run into the biggest bottleneck for Factorio: Ram access speed / timings.
As far as I am aware, the CPU is not the limiting factor in a large base, but how quickly the data can be loaded from RAM into the CPU, and back into RAM. If your RAM is not fast enough, your CPU will not be running at 100% all the time.
In order to get this confirmed by someone who knows the technical side better than I do, they might want to additionally have a look at your save file and your logfile.
In the mean time, you could try lowering some graphics settings. For example animation quality, graphics quality, light rendering, smoke effects, or particle effects. But since you appear to be capped by UPS (not FPS), I doubt that this will magically solve your issue.
Another suspicion that I have: a lot of computation time (and RAM access) is required to deal with large amounts of biters.
This was reported several times. Especially, when you have artillery that permanently arrgoes large amounts of biters to come attack you (and need to compute attack paths).
So if you play with biters that constantly attack your base, this has a considerable impact on performance.
If you don't want to deal with biters and just scale up your base, it could be a good idea to just remove all biters from the game and disallow them from spawning in the future. The wiki explains how:
https://wiki.factorio.com/Console#Enemy ... on_scripts
Other people try to optimize their factory design so as to not use a lot of entities that require much time to update. You can search the forums for "UPS" and "megabase" and find lots of issues/ideas/solutions. For example: Solar panels are much easier to deal with (computationally) than steam or nuclear power. The latter rely on fluids, inserters and transport belts.
Other than that, there is not much I can tell you. Even with a savegame or a logfile. But other people might.
-
- Fast Inserter
- Posts: 182
- Joined: Mon Jan 20, 2020 4:41 am
- Contact:
Re: fps drops but cpu< 50%
Thank you valneq for taking your time to share an elaborate reply, i was resourcefulvalneq wrote: Wed Jun 24, 2020 8:04 pm It appears that FPS is capped by the UPS not reaching 60.
UPS measures updates of the game state (known as tick) per second. Normally the game tries to update the state 60 times per second, so that each changed state can be drawn by the GPU on screen. If the update takes more than 1s/60 = 16.667ms, the GPU has nothing to draw, so FPS will drop, too.
Why is UPS dropping?
From what I can see in the center left "Update" section (and be aware: I am no technical expert), the most time appears to be spent onThe entire update together reaches (over the last 100 ticks, in milliseconds)
- entity updates (~7ms)
- transport lines (items on belts) (~4ms)
- trains (~1ms)
average/min/max
15.261/13.951/19.859
So you run into the limit of what your computer can handle.
In particular, the train path finder appears to have spikes of computation times, caused by finding paths for trains in very large/compex train systems. This is likely causing the peaks in the total maximum update time.
But the computation time for entities alone reaching half of the entire available time hints towards a very large base in the first place, or a large uncovered area with lots of active biters.
It is possible that your base is just large enough to run into the biggest bottleneck for Factorio: Ram access speed / timings.
As far as I am aware, the CPU is not the limiting factor in a large base, but how quickly the data can be loaded from RAM into the CPU, and back into RAM. If your RAM is not fast enough, your CPU will not be running at 100% all the time.
In order to get this confirmed by someone who knows the technical side better than I do, they might want to additionally have a look at your save file and your logfile.
In the mean time, you could try lowering some graphics settings. For example animation quality, graphics quality, light rendering, smoke effects, or particle effects. But since you appear to be capped by UPS (not FPS), I doubt that this will magically solve your issue.
Another suspicion that I have: a lot of computation time (and RAM access) is required to deal with large amounts of biters.
This was reported several times. Especially, when you have artillery that permanently arrgoes large amounts of biters to come attack you (and need to compute attack paths).
So if you play with biters that constantly attack your base, this has a considerable impact on performance.
If you don't want to deal with biters and just scale up your base, it could be a good idea to just remove all biters from the game and disallow them from spawning in the future. The wiki explains how:
https://wiki.factorio.com/Console#Enemy ... on_scripts
Other people try to optimize their factory design so as to not use a lot of entities that require much time to update. You can search the forums for "UPS" and "megabase" and find lots of issues/ideas/solutions. For example: Solar panels are much easier to deal with (computationally) than steam or nuclear power. The latter rely on fluids, inserters and transport belts.
Other than that, there is not much I can tell you. Even with a savegame or a logfile. But other people might.
i am running the game in peaceful mode , so biters are not the problem, i believe
the screen shot is the one of the tiles, and i have 13 more of those .. when i am in the soil where no entities are shown on the screen , the fps is 60.. when i move into base and entities are on the screen the fps (ups) drops ..
yes , i use nuclear setup .. (and some solar panels .. and it is pretty useless compared to nuclear .. and lot of space .. ) 6GW of power needed .. so ..
and i did not use any mods , and did not use any lua commands .. as it will disables all the achievements

what wonders me is the fps/ups drops even when there is unused processing power .. (the ram could be a problem.. i am not an expert either)
thanks for the insight
Re: fps drops but cpu< 50%
If it only drops with lots of stuff on screen, you might actually achieve something with reducing the graphics settings. Give it a go!
And as I said before, if you want more technical expertise, you will have to provide the save file and your logfile so some technical experts can take a look.
And as I said before, if you want more technical expertise, you will have to provide the save file and your logfile so some technical experts can take a look.
-
- Fast Inserter
- Posts: 182
- Joined: Mon Jan 20, 2020 4:41 am
- Contact:
Re: fps drops but cpu< 50%
hey there,valneq wrote: Thu Jun 25, 2020 4:26 am If it only drops with lots of stuff on screen, you might actually achieve something with reducing the graphics settings. Give it a go!
And as I said before, if you want more technical expertise, you will have to provide the save file and your logfile so some technical experts can take a look.
i tried reducing the graphics settings in all possible combinations , but no improvement in results ..
i think CPU is the bottleneck, even though factorio CPU usage is about 38-40% as i saw in task manager.
anyways , Thank you my friend.