Factorio

Factorio

View Stats:
Raaleth Sep 26, 2020 @ 2:08am
UPS and CPU usage
Hi there,

so I'm running a small megafactory (2k SPM). I seem to be getting UPS issues with it, with UPS dropping to about 45 - 50 at times.

The odd thing is, I noticed that during these slowdowns my CPU use doesn't go beyond 60% or so.

Is there a setting I'm missing, or is the game just designed not to hog 100% CPU?

My config:

Intel i5-7600k
16 GB RAM, 3000 MHz DDR4
GPU: Geforce GTX 1070
The game is installed on an SSD drive.

Example screenshot: https://i.imgur.com/29UNAV4.png

TBH I thought that an i5-7600k would be enough to run a megabase, but turns out I might want to revise that idea.

Thanks in advance for any responses!
Last edited by Raaleth; Sep 26, 2020 @ 2:10am
< >
Showing 16-30 of 31 comments
PunCrathod Sep 26, 2020 @ 6:07pm 
Originally posted by ShutEye_DK:
Originally posted by PunCrathod:
Hz is just 1/s. So if something can be measured in x/s then it can also be measured in Hz. What why and when is irrelevant.

Edit: Oh and I have a 256kb ddr-200 stick on my table right now from the first computer I ever had so age is not an issue.
Not irrelevant. It brings confusion. Just read this thread.

256KB? The smallest that came out was 64MB (yeah I had to look it up haha :) )
I remember my first PC having a whopping 320MB. That was A LOT at the time.
I know it adds confusion. It still is technically right. IMHO cpu-z should have reported data transfer frequency to be inline with the marketing. Seeing as in a modern bios when you are selecting DRAM frequency it is more often than not the data rate frequency measured in MHz.

And I meant to write mb but made a typo. And I got curious and rechecked the datasheet for the 16 chips in the stick. And noticed that it is infact m5m44400bj chips for a total of 64MB. I don't remember where I got the 256 from. Granted I was 8 at the time so misremembering something from so long ago is not a surprise.

Originally posted by Magma Dragoon:
OP doesn't need to know the true meaning of MCLK, he needs to select the memory profile that matches the advertised speed and primary timings of his RAM
I know that. I'm just pointing out that it is not wrong to call it 3000MHz DDR4 and that cpu-z is not lying but measuring a different although related thing instead. And that when trying to configure the bios to use the ram to its intended potential you might actually need to know that there are multiple different standards in use that can be confusing and result in failure.

Also OP if you want more help with this just tell the make and model of the motherboard and I will try to find a youtube video detailing the exact steps needed to make full use of your ram.
Raaleth Sep 27, 2020 @ 3:53am 
Originally posted by PunCrathod:
Originally posted by ShutEye_DK:
AFAIK 1067 MHz is the actual frequence - the 2133 is the datarate (MT/s), which is used to name the module. Somewhat confusing :)

EDIT: So OP: Your RAM is not running at 3000 MT/s. Nor at 1500 MHz.
Technically 3000MHz DDR4 is also correct. It's just telling you the frequency of transfer operations.
For further elaboration DDR memory(double data rate memory) can do a memory transfer operation on both rising and falling edges of the clock signal. The marketing is based on the frequency of memory transfer operations while cpu-z reports the frequency of the clock. Thus if you have 3000 mhz DDR4 running at it's marketed speed then cpu-z should say DRAM frequency: 1500.0 MHz

Originally posted by Raaleth:
DRAM frequency: 1067.7 MHz

Yours is saying 1067MHz in cpu-z so your ram is running at 2133MHz.
This is easy to fix in modern bios. When rebooting you press F2 or del(depending on your motherboard model) when the bios is loading to enter the bios menu. Find an option that mentions XMP or extreme memory profile. And turn it on. Or if it gives multiple choices select DDR4 3000MHz. If there is no XMP or extreme memory profile anywhere in the bios then there probably is a DRAM target frequency options somewhere. Depending on the model of the motherboard this can be either the DRAM clock or the frequency of transfer operations. For ddr4 the lowest clock is 800mhz and lowest transfer frequency is 1600mhz. There should also be a current target DRAM frequency indicator somewhere where you can check.

If this sounds too hard then there are plenty of tutorial videos on youtube showing exactly how to do this. There probably are videos for your exact motherboard that show exactly where the right setting is and how to change it to the correct value.

Do note that this will not make your games run 50% faster. It might not make any difference at all.

Thanks for the answer. I went into bios and switched the extreme memory profile, but the only option I could pick was 2,400 MHz. I did some searching and it turns out that this is the maximum frequency supported by my mobo (Gigabyte B250-HD3P-CF). I can't remember why I picked it the way I did in 2017, probably there wasn't any 16 GB DDR4 available that was below 3000MHz at the time.

I did some changes in the game as well, namely removing old steam generators, relying on solar more, and getting rid of belts in some needless old defence lines. All of this combined sped the game up a bit, by about 5 UPS or so I think.

Regardless, given that my mobo can't make full use of my current memory, and that my CPU seems to be bottlenecking me in other sim games, I think I'll go for an upgrade eventually.

According to what I read if I want to stick with Intel and get a CPU that isn't ridiculously expensive, I think I should go for an i7, maybe i7 9700k? I'll need to do more digging before I make a decision.
chief hopper Sep 27, 2020 @ 3:57am 
any mods installed?
Ryan Sep 27, 2020 @ 8:40am 
If you want to try a test then run this command:
Kill all biters on the "enemy" force
Note that this will kill only mobile units and worms, spawners will not be killed.
/c game.forces["enemy"].kill_all_units()

It used to be that enemies could get stuck behind walls and lakes where their pathfinding would constantly recalculate causing FPS to tank. I don't know if this is still a problem, but could be worth checking.
PunCrathod Sep 27, 2020 @ 10:33am 
Originally posted by Raaleth:
Originally posted by PunCrathod:
Technically 3000MHz DDR4 is also correct. It's just telling you the frequency of transfer operations.
For further elaboration DDR memory(double data rate memory) can do a memory transfer operation on both rising and falling edges of the clock signal. The marketing is based on the frequency of memory transfer operations while cpu-z reports the frequency of the clock. Thus if you have 3000 mhz DDR4 running at it's marketed speed then cpu-z should say DRAM frequency: 1500.0 MHz



Yours is saying 1067MHz in cpu-z so your ram is running at 2133MHz.
This is easy to fix in modern bios. When rebooting you press F2 or del(depending on your motherboard model) when the bios is loading to enter the bios menu. Find an option that mentions XMP or extreme memory profile. And turn it on. Or if it gives multiple choices select DDR4 3000MHz. If there is no XMP or extreme memory profile anywhere in the bios then there probably is a DRAM target frequency options somewhere. Depending on the model of the motherboard this can be either the DRAM clock or the frequency of transfer operations. For ddr4 the lowest clock is 800mhz and lowest transfer frequency is 1600mhz. There should also be a current target DRAM frequency indicator somewhere where you can check.

If this sounds too hard then there are plenty of tutorial videos on youtube showing exactly how to do this. There probably are videos for your exact motherboard that show exactly where the right setting is and how to change it to the correct value.

Do note that this will not make your games run 50% faster. It might not make any difference at all.

Thanks for the answer. I went into bios and switched the extreme memory profile, but the only option I could pick was 2,400 MHz. I did some searching and it turns out that this is the maximum frequency supported by my mobo (Gigabyte B250-HD3P-CF). I can't remember why I picked it the way I did in 2017, probably there wasn't any 16 GB DDR4 available that was below 3000MHz at the time.

I did some changes in the game as well, namely removing old steam generators, relying on solar more, and getting rid of belts in some needless old defence lines. All of this combined sped the game up a bit, by about 5 UPS or so I think.

Regardless, given that my mobo can't make full use of my current memory, and that my CPU seems to be bottlenecking me in other sim games, I think I'll go for an upgrade eventually.

According to what I read if I want to stick with Intel and get a CPU that isn't ridiculously expensive, I think I should go for an i7, maybe i7 9700k? I'll need to do more digging before I make a decision.
Glad to have been of help. Also I can confirm your earlier suspicion that most simulation games are mostly singlethreaded. So for those games the best place to look what cpu to use would be passmark singlethreaded chart https://www.cpubenchmark.net/singleThread.html . It even lists the price of the processor so it is easy to just decide your price range and go down the list until you see one that fits. Of course it is not 100% accurate since it is a synthethic test but unless you can find somewhere where they benchmarked the exact games you wish to play with a bunch of cpus its the best source you have.

And don't get scared by the fanboys to buy one brand over the other. What should matter to you the most is getting the most useful bang for your buck. Especially ignore all the claims that one runs hotter than the other or uses more power than the other or is more stable or secure than the other. Fanboys like to take one issue that happened for one specific model they had and claim the entire brand suffers from it even if that was generations ago and the issue hasn't happened since.

And you don't have to rush to upgrade. I still use a i-7 950 from 10 years ago and it works just fine and it's still fast enough for most games I play.
Raaleth Sep 27, 2020 @ 2:53pm 
Originally posted by PunCrathod:
Glad to have been of help. Also I can confirm your earlier suspicion that most simulation games are mostly singlethreaded. So for those games the best place to look what cpu to use would be passmark singlethreaded chart https://www.cpubenchmark.net/singleThread.html . It even lists the price of the processor so it is easy to just decide your price range and go down the list until you see one that fits. Of course it is not 100% accurate since it is a synthethic test but unless you can find somewhere where they benchmarked the exact games you wish to play with a bunch of cpus its the best source you have.

And don't get scared by the fanboys to buy one brand over the other. What should matter to you the most is getting the most useful bang for your buck. Especially ignore all the claims that one runs hotter than the other or uses more power than the other or is more stable or secure than the other. Fanboys like to take one issue that happened for one specific model they had and claim the entire brand suffers from it even if that was generations ago and the issue hasn't happened since.

And you don't have to rush to upgrade. I still use a i-7 950 from 10 years ago and it works just fine and it's still fast enough for most games I play.

Again, thanks for the answer. I guess I'm kind of lucky, sim games like Factorio or Cities Skylines seem to have a few benchmark comparisons dedicated to them due to how popular they are. The thing with single threading is a bit baffling at the moment, these games seem to rely on it, but at the same time CPUs that have only about 25% better single threading can perform couple times better in single tread intense games. Guess other factors come into play in the end as well. TBH I feel like picking a CPU used to be much simpler, years ago you knew that a Pentium IV was faster than Pentium III, and a Pentium IV that was 3.0 GHz would be faster than a Pentium IV 2.5 GHz. Nowadays it seems like a lot more factors are at play, so more reading is required.

I'll sleep on the idea of an upgrade so to speak, I want to do it before the end of the year because there's a change that the pound will become weaker at the start of next year.

Originally posted by Ryan:
If you want to try a test then run this command:
Kill all biters on the "enemy" force
Note that this will kill only mobile units and worms, spawners will not be killed.
/c game.forces["enemy"].kill_all_units()

It used to be that enemies could get stuck behind walls and lakes where their pathfinding would constantly recalculate causing FPS to tank. I don't know if this is still a problem, but could be worth checking.

That might be the case. The map I'm playing on has got a lot of huge patches of water, so it looks a bit like a series of corridors (makes securing choke points easier, I figured). It might be causing problems with AI pathfinding. The fact that I'm producing ungodly amounts of pollution doesn't help either.

I think it's something to keep in mind when I create a new map.
Ryan Sep 27, 2020 @ 5:36pm 
Originally posted by Raaleth:
Originally posted by PunCrathod:
Glad to have been of help. Also I can confirm your earlier suspicion that most simulation games are mostly singlethreaded. So for those games the best place to look what cpu to use would be passmark singlethreaded chart https://www.cpubenchmark.net/singleThread.html . It even lists the price of the processor so it is easy to just decide your price range and go down the list until you see one that fits. Of course it is not 100% accurate since it is a synthethic test but unless you can find somewhere where they benchmarked the exact games you wish to play with a bunch of cpus its the best source you have.

And don't get scared by the fanboys to buy one brand over the other. What should matter to you the most is getting the most useful bang for your buck. Especially ignore all the claims that one runs hotter than the other or uses more power than the other or is more stable or secure than the other. Fanboys like to take one issue that happened for one specific model they had and claim the entire brand suffers from it even if that was generations ago and the issue hasn't happened since.

And you don't have to rush to upgrade. I still use a i-7 950 from 10 years ago and it works just fine and it's still fast enough for most games I play.

Again, thanks for the answer. I guess I'm kind of lucky, sim games like Factorio or Cities Skylines seem to have a few benchmark comparisons dedicated to them due to how popular they are. The thing with single threading is a bit baffling at the moment, these games seem to rely on it, but at the same time CPUs that have only about 25% better single threading can perform couple times better in single tread intense games. Guess other factors come into play in the end as well. TBH I feel like picking a CPU used to be much simpler, years ago you knew that a Pentium IV was faster than Pentium III, and a Pentium IV that was 3.0 GHz would be faster than a Pentium IV 2.5 GHz. Nowadays it seems like a lot more factors are at play, so more reading is required.

I'll sleep on the idea of an upgrade so to speak, I want to do it before the end of the year because there's a change that the pound will become weaker at the start of next year.

Originally posted by Ryan:
If you want to try a test then run this command:
Kill all biters on the "enemy" force
Note that this will kill only mobile units and worms, spawners will not be killed.
/c game.forces["enemy"].kill_all_units()

It used to be that enemies could get stuck behind walls and lakes where their pathfinding would constantly recalculate causing FPS to tank. I don't know if this is still a problem, but could be worth checking.

That might be the case. The map I'm playing on has got a lot of huge patches of water, so it looks a bit like a series of corridors (makes securing choke points easier, I figured). It might be causing problems with AI pathfinding. The fact that I'm producing ungodly amounts of pollution doesn't help either.

I think it's something to keep in mind when I create a new map.

Try running that command in your existing game to see if it makes an immediate difference.

Hit this key ~
Then paste in this command /c game.forces["enemy"].kill_all_units()
DustyDinklemen Sep 27, 2020 @ 9:17pm 
Yeah, its simple. Don't buy intel. My laptop intel based is ♥♥♥♥ on mega factories.
AMD lower spec laptop runs better.
PunCrathod Sep 27, 2020 @ 10:14pm 
Originally posted by Robert Ramiro:
Yeah, its simple. Don't buy intel. My laptop intel based is ♥♥♥♥ on mega factories.
AMD lower spec laptop runs better.
That is fanboy talk. Every benchmark I have seen says for factorio intel is better at the moment.
Magma Dragoon Sep 28, 2020 @ 1:48pm 
Wait for Zen 3 benchmarks, even if it doesn't beat 10th Intel might respond with price cuts
ShutEye_DK Sep 28, 2020 @ 11:56pm 
Originally posted by Magma Dragoon:
Wait for...
No! Buy what you need at the pricepoint you can.
Magma Dragoon Sep 29, 2020 @ 12:13am 
Originally posted by ShutEye_DK:
Originally posted by Magma Dragoon:
Wait for...
No! Buy what you need at the pricepoint you can.
Zen 3 will be announced in like a week
ShutEye_DK Sep 29, 2020 @ 12:15am 
Originally posted by Magma Dragoon:
Originally posted by ShutEye_DK:
No! Buy what you need at the pricepoint you can.
Zen 3 will be announced in like a week
And?
-<{AfroBob}>- Sep 29, 2020 @ 4:26am 
Originally posted by ShutEye_DK:
Originally posted by Magma Dragoon:
Zen 3 will be announced in like a week
And?

And,,, it is very likely that prices of various CPU's drop in response. However this is also dependant on your lokal market. The Ryzen 5 3600, for instance, has been rising in price here (NL) lately because of stock reasons. But waiting a small time will probably work in the favor of the consumer at this point.
Last edited by -<{AfroBob}>-; Sep 29, 2020 @ 4:32am
Raaleth Oct 4, 2020 @ 3:30pm 
Originally posted by Ryan:

Try running that command in your existing game to see if it makes an immediate difference.

Hit this key ~
Then paste in this command /c game.forces["enemy"].kill_all_units()

Thanks for the tip. I tried the command, it added about 2 - 3 UPS. It might be related to the fact that my current map is full of choke points, so the AI pathfinding might be getting stuck and consuming a fair amount of processing power.

If I decided to run another megafactory in the future, I'll probably do it without enemies and with pollution disabled.

Well, I got my PC equipped with i7 9700k. UPS/FPS seem much better now, though there are still instabilities. Sometimes the UPS might drop to as low as 52, no idea why thought. Sometimes most of the factory might be shut down, using only 1.5 GW, and I get 48 UPS. Other times i might be pushing the factory to use 6 GW, and I get stable 60 UPS.

Will need to investigate it more.

Does anyone know where I can find a reliable article on how Factorio calculates things?
< >
Showing 16-30 of 31 comments
Per page: 1530 50

Date Posted: Sep 26, 2020 @ 2:08am
Posts: 31