low UPS again, barely reached the half of the game

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
MPeti1
Long Handed Inserter
Long Handed Inserter
Posts: 67
Joined: Tue Apr 12, 2016 5:38 pm
Contact:

low UPS again, barely reached the half of the game

Post by MPeti1 »

Hi!
In my seventh map i reached the half of the modded game, and now i only have 30-45 UPS. Again. This happens all the time, I need to create a new map to have a playable game speed. I've read many things about how Factorio is multithreaded, and i read the game uses only 1 core for game updates. I've also read that it's very hard to modify the game update cycle to be able to run on multiple cores, and you only want to do that if other optimizations are not enough. I think we reached that point. A lot of people plays the game with a lot of mods, so a lot of other people experiences this problem.
At the moment i play with 0.14, and i can't update because of the mods, some are not made for 0.15 and some are modified* by me and i forgot what i modified in them. Also there are mods which are not compatible with it's 0.15 version.
I have now 8 GB of RAM, and a AMD FX-4130 Quad Core CPU (3,82 GHz) if it matters. Is there a way to speed up the game? I can't remove too much mods, because the most of them are used. If needed i'll upload my save and the mods folder.
Can i do anything to speed up the game?
Some debug information: http://imgur.com/a/ldvEg

*some mods got nerfed too much the things they added
User avatar
impetus maximus
Smart Inserter
Smart Inserter
Posts: 1299
Joined: Sat Aug 20, 2016 10:07 pm
Contact:

Re: low UPS again, barely reached the half of the game

Post by impetus maximus »

i think you can lower the UPS on the warehouses you are using. that should help.
replace belts with underground belts wherever you can.
disable any programs you have running in the background.

BTW with imgur you can change the order after uploading.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14264
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: low UPS again, barely reached the half of the game

Post by Rseding91 »

I could make the game use 100% of anyones CPU. It just doesn't actually help make the game run faster :P

The mods you're using aren't helping your games performance - that's for sure.
If you want to get ahold of me I'm almost always on Discord.
MPeti1
Long Handed Inserter
Long Handed Inserter
Posts: 67
Joined: Tue Apr 12, 2016 5:38 pm
Contact:

Re: low UPS again, barely reached the half of the game

Post by MPeti1 »

impetus maximus wrote:i think you can lower the UPS on the warehouses you are using. that should help.
replace belts with underground belts wherever you can.
disable any programs you have running in the background.

BTW with imgur you can change the order after uploading.
You mean i should replace the warehouses? But what should i use instead of them?
I later noticed that option, just forgot to remove that title
Rseding91 wrote:I could make the game use 100% of anyones CPU. It just doesn't actually help make the game run faster :P

The mods you're using aren't helping your games performance - that's for sure.
I don't wanted to say the game needs to use 100% of a cpu, i mean the processing of the game logic should be split up to more than one thread. I know it's very hard and a complex task, and can cause a lot of bugs, but i think it's needed because a lot of player uses mods. I know mods are slowing down the game, but what can i do with it? :D I use mods because i think i need them, and i can't do anything with it.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14264
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: low UPS again, barely reached the half of the game

Post by Rseding91 »

Mods are one thing that are almost guaranteed to never be threaded.
If you want to get ahold of me I'm almost always on Discord.
MPeti1
Long Handed Inserter
Long Handed Inserter
Posts: 67
Joined: Tue Apr 12, 2016 5:38 pm
Contact:

Re: low UPS again, barely reached the half of the game

Post by MPeti1 »

You mean every entity, logic and everything added by mods?
Tekky
Smart Inserter
Smart Inserter
Posts: 1040
Joined: Sun Jul 31, 2016 10:53 am
Contact:

Re: low UPS again, barely reached the half of the game

Post by Tekky »

If you are interested in why Factorio does not use more multithreading, I suggest you read the following thread:

viewtopic.php?f=5&t=39893 Parrallel processing in games & applications

I especially found this post by Factorio developer Harkonnen on page 4 of the thread to be very interesting.

Now, about your problem with low UPS:

Have you ever done a playthrough without any mods? If yes, did you also have issues with low UPS?

If a specific mod is responsible for your low UPS, you could maybe try removing mods until your UPS is good again, then you will know which mod is responsible.
MPeti1
Long Handed Inserter
Long Handed Inserter
Posts: 67
Joined: Tue Apr 12, 2016 5:38 pm
Contact:

Re: low UPS again, barely reached the half of the game

Post by MPeti1 »

I played through an entire save without mods, but i can't remember if it had speed problems. I don't think a specific mod causes the ups drop, because every mod has a low value at time_used_percent debug page, as you can see in the link (imgur)
dgw
Fast Inserter
Fast Inserter
Posts: 197
Joined: Tue Apr 12, 2016 7:06 pm
Contact:

Re: low UPS again, barely reached the half of the game

Post by dgw »

I had significant UPS drop before I ever started playing with mods, just getting to Mass Production 3. If I look at the timings using the debug menu, even now that I have a number of mods installed, it appears that most of the time is spent in the entity update phase. Since I have lots of long transport belts running ore and such around smelting columns, that makes sense. I'm hoping that the belt optimizations rumored for 0.16 materialize at some point, but for now I've just accepted that, with my base the size it is now, one game second just takes two real seconds (or three or four, if a certain mod has set multiple chunks full of trees and biters on fire). It is what it is.

Factorio is constrained by how fast the CPU can update entities, which is constrained by clock speed and memory access latency. That's just how it is. (I fully expect to have gotten some part of this wrong, because it's 4am.)
MPeti1
Long Handed Inserter
Long Handed Inserter
Posts: 67
Joined: Tue Apr 12, 2016 5:38 pm
Contact:

Re: low UPS again, barely reached the half of the game

Post by MPeti1 »

dgw wrote:I had significant UPS drop before I ever started playing with mods, just getting to Mass Production 3. If I look at the timings using the debug menu, even now that I have a number of mods installed, it appears that most of the time is spent in the entity update phase. Since I have lots of long transport belts running ore and such around smelting columns, that makes sense. I'm hoping that the belt optimizations rumored for 0.16 materialize at some point, but for now I've just accepted that, with my base the size it is now, one game second just takes two real seconds (or three or four, if a certain mod has set multiple chunks full of trees and biters on fire). It is what it is.

Factorio is constrained by how fast the CPU can update entities, which is constrained by clock speed and memory access latency. That's just how it is. (I fully expect to have gotten some part of this wrong, because it's 4am.)
Same here, entity updates takes 13%, it's the highest of all. But Factorio only uses 42% of the processor. After reading the post linked by Tekky i really don't know if the core of the processor is overloaded which processes the game logic, or my ram modules with transfer speed. You know, cpu stats separated into cores is not too reliable, and you can't measure the ram transfer speed real time, only in tests. But is there a way to find the weak link of Factorio? I mean to find the thing what is too small, too few too long time to run my gigafactory with more ups?
dgw
Fast Inserter
Fast Inserter
Posts: 197
Joined: Tue Apr 12, 2016 7:06 pm
Contact:

Re: low UPS again, barely reached the half of the game

Post by dgw »

It's just a limitation of the game on current hardware, as I understand it. Factorio doesn't use 100% of the CPU because it doesn't need that; it needs more memory bandwidth. Harkonnen's post linked by Tekky goes into some depth about how the game could use 100% CPU but doesn't, and so far it's just working with what's available.

I found it especially interesting to note the estimated RAM traffic budget, at the top end of DDR4, of about 300 MB per tick at 60 UPS, given peak performance of around 20GB/s (give or take, depending on memory speed). Game state for large bases can reach several GB, so updating more than a relatively small percentage of chunks frequently can really drag UPS down. That's why the best practices I've seen for improving UPS relate to removing things that cause active chunks, like biters, trees, etc.

As a side note, my system is still on DDR2 because it's a dinosaur, and so I get maybe 6GB/s of RAM bandwidth, or ~100MB per tick at 60 UPS. However slow your game is, mine's slower!

Edit: I tested the same map on my laptop, which has DDR3, and it can get significantly higher UPS (when I'm not using the browser simultaneously). Desktop with DDR2 gets around 25 UPS right now. Laptop with DDR3 has gone as high as 40-odd, but seems to hover around 30-32 UPS if I don't touch other apps.
Post Reply

Return to “Technical Help”