Performance increase tips [slow fps]

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.
UrbanNinja
Burner Inserter
Burner Inserter
Posts: 7
Joined: Sat May 27, 2017 8:22 pm
Contact:

Performance increase tips [slow fps]

Post by UrbanNinja »

I have a large factory with over 225 hours of gameplay. Since I researched worker robot speed 14, I noticed a performance drop in the game. I don't know if this is related or not as I've resumed exploration of the map at the same time.

I currently average around 23 FPS which makes the whole experience a bit sluggish. Moreover, it now takes ages to reach the edge of the map with a train.

I've tried using /c game.forces.enemy.kill_all_units() as mentionned in another post. This bumps FPS to about 28 - 29, which is better than nothing.

I was wondering if there was anything else to be done to improve FPS? I currently have about 19k logistic robots, 35k laser turrets and about 60 trains. I could live with cutting any of those and working around that if it means better performance.

I can provide screenshots or files if you need anything
User avatar
Distelzombie
Filter Inserter
Filter Inserter
Posts: 336
Joined: Tue May 02, 2017 4:27 pm
Contact:

Re: Performance increase tips [slow fps]

Post by Distelzombie »

Do you use only Bots? If not remove some belts and use bots instead.
Complete 2-Lane system as a Blueprint-Book! The perfect OCD reactor? Testing chained science lab efficiency Please use real prefixes and proper rounding!
British_Petroleum
Filter Inserter
Filter Inserter
Posts: 321
Joined: Tue Dec 23, 2014 7:21 am
Contact:

Re: Performance increase tips [slow fps]

Post by British_Petroleum »

fewer machines also helps; so use speed modules and beacons everywhere if you're not already.

Someone also said bots+barrelling is better than using pipes, although i haven't tested that myself
UrbanNinja
Burner Inserter
Burner Inserter
Posts: 7
Joined: Sat May 27, 2017 8:22 pm
Contact:

Re: Performance increase tips [slow fps]

Post by UrbanNinja »

I have an incredible amount of belts to carry around 4.5M iron / h and 3M copper / h. Yesterday I tried switching to bots only with fewer belts. To achieve the same levels of production, I needed around 30k - 40k logistic robots which drained an additional 3 - 4GW. I reverted from that try since I only bumped from 23.0 FPS to 26 - 27FPS.

I'll try removing as much belts and pipes as possible and see how it goes.

Just as a side note, something I had never used before 0.15x was the liquid pump. I now have tons of them all over the map and I suspect that fluid dynamics take a lot of computing time.
UrbanNinja
Burner Inserter
Burner Inserter
Posts: 7
Joined: Sat May 27, 2017 8:22 pm
Contact:

Re: Performance increase tips [slow fps]

Post by UrbanNinja »

Just to confirm that belt do take a lot of UPS, I have a huge belt highway about 30 belts large and over 1500 tiles long. Removing all of it brings me back to about 28 - 30 UPS. It also stops production in 1.5k electric furnaces which might explain the bump
orzelek
Smart Inserter
Smart Inserter
Posts: 3923
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: Performance increase tips [slow fps]

Post by orzelek »

You could try to get distance plus mod and exchange belts for underground ones. This mod adds really long underground belts and that should reduce total amount of belt entities to process.

I think it should help a bit but never did any special testing.
There is also belt optimization coming that should mek your current setup work much faster.
mrvn
Smart Inserter
Smart Inserter
Posts: 5860
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Performance increase tips [slow fps]

Post by mrvn »

Vanilla blue underground belts should help a lot already. each pair of underground belts is just 2 entities but replaces a lot more normal belt entities.

As for your belt highway why not remove all those 30*1500 belts and replace them with a loop of train tracks. Loading, unloading station(s) at the end and a number of trains. 30 blue belts is about half of what a single track can carry with single wagon trains. And that should go up with multi car trains. I would try it out with maybe 4 cars per train.
User avatar
Distelzombie
Filter Inserter
Filter Inserter
Posts: 336
Joined: Tue May 02, 2017 4:27 pm
Contact:

Re: Performance increase tips [slow fps]

Post by Distelzombie »

I always thought underground belts are just as bad.
You sure about this? Is it not just rumaors? Have you tested it?

I have a pretty crappy machine - means its easy to test. I guess I'll do thast sometime today.
Complete 2-Lane system as a Blueprint-Book! The perfect OCD reactor? Testing chained science lab efficiency Please use real prefixes and proper rounding!
mrvn
Smart Inserter
Smart Inserter
Posts: 5860
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Performance increase tips [slow fps]

Post by mrvn »

See the recent FFF about upcoming belt improvements. Yes, underground belts are more efficient. They are trying to bring that extra efficiency to normal belt segments too with good success.
iceman_1212
Filter Inserter
Filter Inserter
Posts: 256
Joined: Wed Aug 17, 2016 9:49 am
Contact:

Re: Performance increase tips [slow fps]

Post by iceman_1212 »

Are you doing this all in one giant base? Subfactories separated by trains is generally more UPS efficient as it lets trains do the majority of the lifting while bots/belts travel shorter distances.

Bots/barrels for refineries are indeed more efficient than large refinery setups with long stretches of pipes - I saved 10 UPS in my current save from this switch alone.

For general playability, I have power switches to turn off parts of my factory when I want to do big expansions. My factory runs at ~20 UPS when everything is going full speed - but with the major parts of it turned off, I can add outposts / make upgrades at a comfortable 55 UPS.

What are your comp specs and what kind of production stats are you able to get on 23UPS? General factory design can go a long way toward UPS efficiency. Aside from refineries and my "make-everything" factory where I build modules and railway equipment, I am using belts everywhere else (i.e., for all mining, circuits, science, etc.) and I'm able to maintain 2k science per min + 15 module 3s per min (i.e., ~12m iron per hour, ~7m copper per hour) at 20 UPS on a computer with not the best specs (i5 3320M @ 2.6ghz laptop, integrated graphics).

Solar will be far more UPS friendly at these scales than nuclear. Also, avoiding long stretches of belts (and using trains to do that work instead) will go a long way toward conserving UPS.
daggot
Burner Inserter
Burner Inserter
Posts: 11
Joined: Fri Dec 09, 2016 6:11 pm
Contact:

Re: Performance increase tips [slow fps]

Post by daggot »

Is there a way to count the belts in your factory?

We ran into some serious lag in our first MP 15.x map and we're getting again on this current map. This current map is bigger, but since we're running Bob's we've had to rely on way more logistics bot and before (super spaghetti since we never did get around to a proper bus). The first base def would have had more belts. I'm curious to see what the belt count is between the two maps.
GenBOOM
Long Handed Inserter
Long Handed Inserter
Posts: 95
Joined: Tue May 16, 2017 11:39 pm
Contact:

Re: Performance increase tips [slow fps]

Post by GenBOOM »

I noticed when starting a new map and searching the map with about 2K radars that the game can lag very very badly. if your base is big and you have a lot of radars in the middle of nowhere inside of your walls, remove them.
UrbanNinja
Burner Inserter
Burner Inserter
Posts: 7
Joined: Sat May 27, 2017 8:22 pm
Contact:

Re: Performance increase tips [slow fps]

Post by UrbanNinja »

I've been trying various things for the last few days to improve UPS and so far very little worked. It might be because I end up increasing production at the same time.

I removed several thousand blue belts and put five 1-5-1 trains instead. This helped a bit.

I had around 900 radars before checking your comment and I now have around 600. This didn't helped much, but maybe I did it wrong as I did not lose a lot of map vision with this.

I don't think that underground belts are much better, but I've started to switch to that kind of use instead.

I've also halved the amount of trains I use with little effect. Trains do have an impact though, as I sometimes get deadlocks now with longer trains. When all trains halt, I get a 5 UPS bump. It might be because remote factories become saturated and stop working, hard to say. Something I've noticed regarding trains is that multiple trains queuing for access to a particular segment adds a lot of stress to the engine.

According to the detailed debug overlay, Update time is around 45 / 42 / 47, which I assume is current / min / max. Most of that update time is spent on "Entity update", between 35 and 45. This leads me to think that all of that time is spent on actual production and very little can be done at this point. Top screen reports "Entities Total: 4.2M" and "Active: 500k"
mrvn
Smart Inserter
Smart Inserter
Posts: 5860
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Performance increase tips [slow fps]

Post by mrvn »

When a train is stuck because the station is busy then every now and then it seeks for a new path to maybe find a different station with the same name. Maybe that is what you are seeing.
GenBOOM
Long Handed Inserter
Long Handed Inserter
Posts: 95
Joined: Tue May 16, 2017 11:39 pm
Contact:

Re: Performance increase tips [slow fps]

Post by GenBOOM »

replace your smelting belts with a train line instead. no belts required. smelt directly from the train, unload ore and load plates at the same time. does not maximize the cargo space but it eliminates bottlenecks and reduces the number of trains required to keep things running. normally you have 1 train dilvering ores to the smelting area, 1 train picking up plates and delivering it to the main bus- now you just need 1 train to pick up the ores, have them smelted and then delivered to the main bus. the loop is longer but there is no hassle about upgrading belts and splitters etc.
furnace speed
simple train logic
This is for a train that has 1 locomotive and 4 cargo wagons.
Iron Plate to Steel Smelting Blueprint Image
Iron Plate to Steel Smelting Blueprint String
mrvn
Smart Inserter
Smart Inserter
Posts: 5860
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Performance increase tips [slow fps]

Post by mrvn »

Ugh, how many train stops (and trains) would that need to smelt 30 belts of ore worth? Think 1000 furnaces going full speed.
orzelek
Smart Inserter
Smart Inserter
Posts: 3923
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: Performance increase tips [slow fps]

Post by orzelek »

Speed is one concern - other would be no prod modules in furnace. Would need to reserve some spare places in wagons for plates but it should work.
GenBOOM
Long Handed Inserter
Long Handed Inserter
Posts: 95
Joined: Tue May 16, 2017 11:39 pm
Contact:

Re: Performance increase tips [slow fps]

Post by GenBOOM »

orzelek wrote:Speed is one concern - other would be no prod modules in furnace. Would need to reserve some spare places in wagons for plates but it should work.
well I personally put prod 3 modules on the ore mining and have a lot hooked up, then I never have to put them on other things excepts like blue circuits and other high value items
vinnief
Inserter
Inserter
Posts: 31
Joined: Sat Feb 10, 2018 3:39 am
Contact:

Re: Performance increase tips [slow fps]

Post by vinnief »

iceman_1212 wrote:For general playability, I have power switches to turn off parts of my factory when I want to do big expansions. My factory runs at ~20 UPS when everything is going full speed - but with the major parts of it turned off, I can add outposts / make upgrades at a comfortable 55 UPS.
I use the "automatic research" mod and just disallow space science (I'm doing infinite research by the time UPS matters). It takes a couple of minutes for the buffered items to clear out but then the base quiets down and my UPS returns to 60.
Post Reply

Return to “Technical Help”