Improving Performance

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Post Reply
Septimus ii
Inserter
Inserter
Posts: 26
Joined: Fri Mar 25, 2016 10:59 pm
Contact:

Improving Performance

Post by Septimus ii »

I've got a fairly big factory going (about a rocket every 3 minutes) but my UPS is dropping to around 25. The factory has around 150 trains, outposts for things like smelting that are mostly bot based with the odd belt, and a main base with a bus. It has 34k "belt" entities and 42k "bot" entities. Here is a screenshot of my time usage stats:
Time Usage
My CPU isn't ideal for running for factorio, but I'd like to make changes to my factorio to make it run better. I can see that the Hacked Splitters mod is too heavy for it's worth, but other than that should I switch my main base and maybe my whole factory to purely bot based work? Do I need to avoid long liquid pipes?

It would be useful to get more details on the 'Entity update' line. What is the 'Script update' line? What is and isn't included in 'Logistics manager'

Any advice welcome

EDIT: I forgot to say, I turned off pollution when I set the game up as I reckoned that tracking pollution would slow the game down significantly and I'm not fussed about fighting biters. Was that correct?

Patashu
Fast Inserter
Fast Inserter
Posts: 130
Joined: Mon May 08, 2017 11:57 pm
Contact:

Re: Improving Performance

Post by Patashu »

If you don't mind using mods, grab https://mods.factorio.com/mods/Zanthra/GTTS and have it target 30FPS. This will make twice as much stuff happen every tick, so even if your game is running at 30 UPS it will be as effective as if it was running at 60 UPS without the mod.

You can also try:

https://mods.factorio.com/mods/AntiElite/UPS-up removes unnecessary entities
https://mods.factorio.com/mods/Mooncat/creative-mode can be used to delete all biters from the map

d3x0r
Filter Inserter
Filter Inserter
Posts: 316
Joined: Sun Jun 04, 2017 8:56 am
Contact:

Re: Improving Performance

Post by d3x0r »

I'd love to play with a copy of your map if you could share it :) (150 trains! )

My friend has a similar issue, only he thinks he is going to have issues only with a small factory; and has wondered if maybe a mode could be made that make belts more like conveyor-tubes that have a light indicator about moving items instead of moving the actual item sprites; I'm sure this would be good; I had a consideration to make sprites that looked like items in various positions and swapping those; but the possible combinations of things on belts I would think would make that prohibitive, and even making 8 sprites for each item would then still have to draw 8x the sprites ( and really be no gain) (something mentioned in last FFF about optimizing conveyor systems)

I doubt a mod that made belts into tubes and then just magically kept an internal count from input points to output points of when things would arrive would be very efficient but maybe internal to the game engine it could work.

and I did notice that train pathing for 62 trains on circular tracks takes a good bit of time, can't imagine what that would look like on real tracks with genuine choices and other trains to avoid.

----
Edit
But to address some of your questions 'script updates' is the sum of all scripts - the times are in milliseconds; more than 16.66 ms is going to miss 60 ups.
Looks like entity updates are the biggest portion at 25ms... the scripts are only a few.. though you're slightly more than 33.333ms so you're not even getting half speed; perhaps some of that could be fixed with that UPS-up mod mentioned just prior.

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2916
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: Improving Performance

Post by Optera »

Get rid of Hacked Splitters it drains 2.4 ups by itself.
YARM and Bottleneck are nice to have but can be safly removed to regain the ~1.1ups they use up.

You seem to run many short trains using a lot of processing power for pathfinding and state change updates. Go for fewer longer trains to reduce their overhead.

Electric network drain can be reduced by having only one single network and not using power switches at all. Solar farms don't add any ups drain nuclear plants add some for fluid updates, coal adds most from feeding boilers and fluid update.

Entity Update can be reduced by using less belts and assemblers. Max beacon setups with logistic bots are your friend here.
Any belt, ug belt, splitter moving items adds a bit to entity update. Express Underground belts count only as 2 belts for a distance of 8 tiles use them where ever possible.

d3x0r
Filter Inserter
Filter Inserter
Posts: 316
Joined: Sun Jun 04, 2017 8:56 am
Contact:

Re: Improving Performance

Post by d3x0r »

Optera wrote:Get rid of Hacked Splitters it drains 2.4 ups by itself.
YARM and Bottleneck are nice to have but can be safly removed to regain the ~1.1ups they use up.
thats only 3ms of the 16ms in 1UPS.
It would be nice if the values were maybe scaled to UPS but then it would be harder to figure out what they were. While it is a small it, it's not causing the significant UPS drop.

Patashu
Fast Inserter
Fast Inserter
Posts: 130
Joined: Mon May 08, 2017 11:57 pm
Contact:

Re: Improving Performance

Post by Patashu »

d3x0r wrote:thats only 3ms of the 16ms in 1UPS.
If your updates take 40ms (e.g. UPS = 25) and you make them 3ms faster, you go from 25UPS to 27UPS.

d3x0r
Filter Inserter
Filter Inserter
Posts: 316
Joined: Sun Jun 04, 2017 8:56 am
Contact:

Re: Improving Performance

Post by d3x0r »

Patashu wrote:
d3x0r wrote:thats only 3ms of the 16ms in 1UPS.
If your updates take 40ms (e.g. UPS = 25) and you make them 3ms faster, you go from 25UPS to 27UPS.
but the update is actually
35.4ms = 28.24858757UPS
32.6ms = 30.67484663UPS (minus script update time)

Sure okay so coincidnetally 3ms is aproxx 3ups at the moment.

which is still half speed.... and only 7.9% improvement

Septimus ii
Inserter
Inserter
Posts: 26
Joined: Fri Mar 25, 2016 10:59 pm
Contact:

Re: Improving Performance

Post by Septimus ii »

I've installed GTTS with a target of 20 UPS and it's amazing to see my factory and myself running at proper speed again! Now to work on everything else so I can put the UPS back up a bit

Post Reply

Return to “Gameplay Help”