Page 1 of 1

Rails and lategame performance problems

Posted: Thu Jun 23, 2022 10:17 pm
by -Holo-
I hit a wall yesterday it seems, always been able to play and add/remove rails/roundabouts, but suddenly the game absolutely destroys its performance when manipulating rails.
Playing on local dedicated Server
Host - Ryzen 5600G, 64Gb Ram, using a Kingston NVME drive as storage for world, MS Server 2019.
Client - Ryzen 5600X, 32Gb Ram, using Samsung NVME drives for Windows 10
Normally running fine at 60/60 FPS/UPS
Using FactorioHD mods for crisper graphics and Configurable underground belts to reduce pipe/belt amounts.

It's by far endgame but I enjoy building and tinkering with it, it's by no means any of the insane megabases I've seen.

FPS takes a larger hit then UPS and dips down to single digits for 5-10 seconds when building/removing intersections (8-10 signals)
Removing an roundabout causes the client to loose contact with server and forcing a reconnect to continue. (About 50 signals)
Even building/removing rails/signals not connected to the main railnetwork causes the same problems with just rails affecting verly slightly.
Sending out construction robots to remove a signal freezes up the client for about 1-2 seconds when the robots come into range, not when setting the deconstuction target. Removing by hand causes almost no noticeable freeze, Using stationary roboports also causes same freeze/lag.
I've just spent the evening removing about 1500 signals from the rails but there is no change so it kinda feels there is something else running amok.

At the moment I'm not researching anything so most if not all trains are also idle in their unload stations.

Any suggestions on how to fix this problem? I absolutely don't want to start over, and it's getting tiresome with all the small freezes/lagging.

Re: Rails and lategame performance problems

Posted: Thu Jun 23, 2022 10:23 pm
by Loewchen
Post log, save and the screenshots as requested here 68653.

Re: Rails and lategame performance problems

Posted: Thu Jun 23, 2022 11:38 pm
by robot256
Will need to see your save file to say, but there are plenty of reasons that could explain this. Modifying a large, active rail network will generally cause a lot of processing to happen after every individual chance.

It's either (a) too many chain signals having to update in recursive loops, (b) too many trains having to repath every time you change the rail network, and/or (c) too many roundabouts and city blocks in the network, creating millions of (useless) alternate routes to consider during every repath.

Re: Rails and lategame performance problems

Posted: Thu Jun 23, 2022 11:59 pm
by Rseding91
It would be nice to have the save. I was recently looking at trying to improve performance around this exact thing.

Re: Rails and lategame performance problems

Posted: Fri Jun 24, 2022 11:56 pm
by -Holo-
It's gone.
After two days of constant issue when I logged in today to get a fresh couple of logs, everything worked again for no reason (just like it started)
Very happy it works again, but it rubs my troubleshooting mind the wrong way :/
Want me to share the savefile regardless?

Re: Rails and lategame performance problems

Posted: Mon Jun 27, 2022 11:48 am
by aka13
-Holo- wrote: Fri Jun 24, 2022 11:56 pm It's gone.
After two days of constant issue when I logged in today to get a fresh couple of logs, everything worked again for no reason (just like it started)
Very happy it works again, but it rubs my troubleshooting mind the wrong way :/
Want me to share the savefile regardless?
What you described in the post above usually happens when you have a lot of trains trying to get out of the "no-path" state, at least for me it does. Every time the rail network is edited, where trains are trying to find a path, everything freezes up.
Perhaps, you fixed the broken link, and the trains repathed successfully?

Re: Rails and lategame performance problems

Posted: Mon Jun 27, 2022 8:58 pm
by -Holo-
aka13 wrote: Mon Jun 27, 2022 11:48 am
-Holo- wrote: Fri Jun 24, 2022 11:56 pm It's gone.
After two days of constant issue when I logged in today to get a fresh couple of logs, everything worked again for no reason (just like it started)
Very happy it works again, but it rubs my troubleshooting mind the wrong way :/
Want me to share the savefile regardless?
What you described in the post above usually happens when you have a lot of trains trying to get out of the "no-path" state, at least for me it does. Every time the rail network is edited, where trains are trying to find a path, everything freezes up.
Perhaps, you fixed the broken link, and the trains repathed successfully?
Thats something I was looking for at the start, but at the time of problem there was no more then about five trains active, and the night before it started working I had all trains waiting in their stations, with no 'no path' anywhere
(interestingly now that i activated a research and all trains are active again, UPS has slowed down to between 50-56 and trains regulary seems to try to path to the same mine (trainlimit 1) giving no path for a short while before resuming, but changing rail signals works with no considerably slowdowns)

Re: Rails and lategame performance problems

Posted: Mon Jun 27, 2022 9:12 pm
by robot256
Are you using both train limits and stop disabling? That can cause problems sometimes. You can try setting the train limit to 0 via circuits instead of disabling the stop, so that trains en route will continue instead of repathing.

Re: Rails and lategame performance problems

Posted: Tue Jun 28, 2022 8:41 am
by -Holo-
robot256 wrote: Mon Jun 27, 2022 9:12 pm Are you using both train limits and stop disabling? That can cause problems sometimes. You can try setting the train limit to 0 via circuits instead of disabling the stop, so that trains en route will continue instead of repathing.
I am doing both, Migrating over slowly to using trainstop on new stations, Right now a bunch of the mining/loading stations uses enable/disable when there's enough resources for a full train, but the vast majority of the loading-stations is just always enabled while the unloading stations uses both trainstop circuits and enable/disable, but the larger unloading stations also have a parking station before unloading where the train sits whenever stations are full. Don't know if that's a dumb idea or not though :/