Page 15 of 21

Re: Performance optimization - post your saves

Posted: Sun Aug 09, 2020 4:01 pm
by varundevan
azesmbog wrote:
Sun Aug 09, 2020 3:00 pm
varundevan wrote:
Sun Aug 09, 2020 2:50 pm
i use bots for quick completion of construction ..
i planning on upgrading, may i know what processor do you use...
if you could share your save games , it would helpful for ideas and inspirations..
the number of bots can be reduced by 10 times - nothing will change. I think so.
I have a 9700K processor, as I have already said.
My save is good for performance testing, but not for inspiration :)
Try downloading of course :)
viewtopic.php?p=504613#p504613
:D thanks again

Re: Performance optimization - post your saves

Posted: Mon Aug 10, 2020 3:09 am
by Bimbol6254
Will you still be interested in saves coming up into 1.0 launch and after?

Re: Performance optimization - post your saves

Posted: Mon Aug 10, 2020 2:59 pm
by Rseding91
Bimbol6254 wrote:
Mon Aug 10, 2020 3:09 am
Will you still be interested in saves coming up into 1.0 launch and after?
If they're not just "built a lot" yes. I'm interested in saves where some extreme case is having issues.

Re: Performance optimization - post your saves

Posted: Tue Aug 11, 2020 9:02 pm
by burner
I am interested how to optimize factory at nowadays. At some point one thumb of rule was that use bots instead of belts. Is it still valid at most of cases (specially with extra cargo slots)?
How insterter activity is triggered in call stack level? I mean that at tick will inserter check that is there item at spesific position or will item call inserters? Also if I disable stack inserter with circuit network to keep care that it always take full stacks will that circuit network check take anyway same cpu (or need same amount of memory actions) what that item transfer take or will that save cpu time?
I know that years ago reseding was little allergic for this topic but I dont know what is your stance nowadays? It would be nice if some of friday facts will focus on this kind things that what players can do if they want squeeze those last extra drops of juice from their giga factory.

Re: Performance optimization - post your saves

Posted: Tue Aug 18, 2020 6:44 pm
by TheTom
Remember that depending on research mods, robots still may be seriously better than Belts. You an research both capacity as well as speed, while (even with, what I use, bobs mod) belts are quite limited in throughput and do not get better than top tier (which is around 72/second, iirc).

Re: Performance optimization - post your saves

Posted: Wed Sep 09, 2020 12:07 pm
by villareol12
TheTom wrote:
Tue Aug 18, 2020 6:44 pm
Remember that depending on research mods, robots still may be seriously better than Belts. You an research both capacity as well as speed, while (even with, what I use, bobs mod) belts are quite limited in throughput and do not get better than top tier (which is around 72/second, iirc).
Are you sure that the calculation is around 72 / second, iirc??

Re: Performance optimization - post your saves

Posted: Wed Sep 09, 2020 2:18 pm
by Koub
villareol12 wrote:
Wed Sep 09, 2020 12:07 pm
TheTom wrote:
Tue Aug 18, 2020 6:44 pm
Remember that depending on research mods, robots still may be seriously better than Belts. You an research both capacity as well as speed, while (even with, what I use, bobs mod) belts are quite limited in throughput and do not get better than top tier (which is around 72/second, iirc).
Are you sure that the calculation is around 72 / second, iirc??
Vanilla max tier belt is 45 items/second. Vanilla robots don't have a hard limit, but eventually get to a soft limit (once you don't have enough roboports to power the bots). Don't know where the 72 comes from though.

Re: Performance optimization - post your saves

Posted: Fri Sep 11, 2020 4:31 pm
by orpailleur
When setting up the guide rails my base has a big gap, I went from 50-55 FPS / UPS to 2-3 FPS / UPS, I have about 300 trains and so on. I have many mods, but I see no problem with mods on the debug screen, but the number of "pending update" has increased from 10 to 20 or even over 300.

Re: Performance optimization - post your saves

Posted: Sun Oct 04, 2020 8:44 pm
by sceiler
Hi,

I am doing a Krastorio 2 playthrough using a grid layout. My train crossings have circuit-powered crossing. Currently my grid has 361 blocks and it runs with about 45-50 UPS/FPS. Before I added the last ~95 blocks it was running pretty stable with 60 UPS/FPS. According to the debug menu the main culprit is Circuit Network and Entity Updates. When I asked in /r/TechnicalFactorio's Discord Server stevetrov kindly looked into my save and it looks like Rail Chain Signals plus Walls are the reasons for my UPS drop. See here: https://cdn.discordapp.com/attachments/ ... nknown.png
RustyBlade64 suggested that I post here as Chain Signals + Walls + Circuit Network might be exotic enough to not have been looked at in-depth from a performance point of view.

Attached is my savegame (krastorio7) and I am using a modified version of Advanced Electric mod (also attached).
Here is my block BP (https://pastebin.com/K8Jt3Gur) and the vanilla version of it (https://pastebin.com/SfpQ7P2B).

PS. there is a small "bug" in my safe train crossing. Kudos to whoever finds it (it is actually quite easy to find) and knows of a way to fix it.
"Bug" description:
One of the walls will close when a train approaches even though it would be perfectly safe to cross

Re: Performance optimization - post your saves

Posted: Thu Nov 26, 2020 3:35 am
by Guenni7
Were there made any optimizations additional to belts between 1.0 and 1.1.1 ?
I have a belt free factory, 60UPS before and after update, times in debug view look the same too,
but I move around much faster and riding in a train is faster too.

Re: Performance optimization - post your saves

Posted: Thu Nov 26, 2020 3:52 am
by Jap2.0
Guenni7 wrote:
Thu Nov 26, 2020 3:35 am
Were there made any optimizations additional to belts between 1.0 and 1.1.1 ?
Groups of belts now update in parallel.

Re: Performance optimization - post your saves

Posted: Thu Nov 26, 2020 4:24 am
by Guenni7
Jap2.0 wrote:
Thu Nov 26, 2020 3:52 am
Groups of belts now update in parallel.
Yes, but I don't have any belts in my factory, zero :)
Guess question was not clear, I want to know it there are additional optimizations other than to the belts.

Re: Performance optimization - post your saves

Posted: Thu Nov 26, 2020 4:33 am
by Jap2.0
Guenni7 wrote:
Thu Nov 26, 2020 4:24 am
Jap2.0 wrote:
Thu Nov 26, 2020 3:52 am
Groups of belts now update in parallel.
Yes, but I don't have any belts in my factory, zero :)
Guess question was not clear, I want to know it there are additional optimizations other than to the belts.
Ah, I misread that sorry. That is the only major one I've heard of, there were likely a few minor improvements (there usually are with major updates) but nothing big that I've heard about, so your performance should be very similar. If you were already running at a consistent 60 UPS it shouldn't be noticeable anyway.

Re: Performance optimization - post your saves

Posted: Thu Nov 26, 2020 4:39 am
by Guenni7
Jap2.0 wrote:
Thu Nov 26, 2020 4:33 am
Ah, I misread that sorry. That is the only major one I've heard of, there were likely a few minor improvements (there usually are with major updates) but nothing big that I've heard about, so your performance should be very similar. If you were already running at a consistent 60 UPS it shouldn't be noticeable anyway.
The bigger my base got, the slower I was running, even with 60UPS. Had that in all my maps so far.
From 1.0 to 1.1.1 is a massive difference, it's like running around at god-speed :)
Whatever magic the devs did to 1.1.1, I hope they keep it up.

Re: Performance optimization - post your saves

Posted: Fri Nov 27, 2020 4:16 pm
by Lennartos
With threading now being touched in 1.1, i sincerely hope it might be helpful to to provide a savegame with lots of surfaces. (space exploration mod)
Speed on the server is now down to 24UPS to match the smallest client.. which is a pain.
And it doesnt feel activity itself is what's causing the slowdown, we have tried replacing mines with omnimines and some insanely large smelters to reduce entity count - but it really seems to be just many small things accumulating.

Electricity system (3ms)
And Entity System (8ms)
Seem to be the worst offenders as far as i can see.
My hope is that surfaces should be relatively easy to be seperated into threads, if entities and electricity themselves prove to be a challenge to thread.

https://1drv.ms/u/s!AgIrNxBqx15xy4dVXOd ... Q?e=qf4N65

Re: Performance optimization - post your saves

Posted: Fri Nov 27, 2020 11:52 pm
by themacguffinman
I was playing multiplayer 1.1.1 Experimental with a friend and both of us have noticed saving & loading have started taking a long time. The game started micro-freezing yesterday and loading a multiplayer session today took way longer than usual. One thing we noticed was that the save file size has gotten huge: you can see the save file size progression here:

Code: Select all

-rw-r--r-- 1 stan stan 5.6M Nov 25 20:37 josh-1.1-a.zip
-rw-r--r-- 1 stan stan 6.7M Nov 25 22:26 josh-1.1-b.zip
-rw-r--r-- 1 stan stan 8.5M Nov 26 01:38 josh-1.1-c.zip
-rw-r--r-- 1 stan stan  11M Nov 26 03:27 josh-1.1-d.zip
-rw-r--r-- 1 stan stan  13M Nov 26 17:28 josh-1.1-e-bad.zip
-rw-r--r-- 1 stan stan  15M Nov 26 21:56 josh-1.1-f.zip
-rw-r--r-- 1 stan stan  16M Nov 26 23:28 josh-1.1-g-bad.zip
-rw-r--r-- 1 stan stan  56M Nov 27 04:35 josh-1.1-h.zip
-rw-r--r-- 1 stan stan 150M Nov 27 15:22 josh-1.1-i.zip
We're hoping you can find clues to this performance issue in the save files that I've uploaded in Google Drive here: https://drive.google.com/drive/folders/ ... sp=sharing

Re: Performance optimization - post your saves

Posted: Sat Nov 28, 2020 12:27 am
by themacguffinman
themacguffinman wrote:
Fri Nov 27, 2020 11:52 pm
I was playing multiplayer 1.1.1 Experimental with a friend and both of us have noticed saving & loading have started taking a long time. The game started micro-freezing yesterday and loading a multiplayer session today took way longer than usual. One thing we noticed was that the save file size has gotten huge: you can see the save file size progression here:

Code: Select all

-rw-r--r-- 1 stan stan 5.6M Nov 25 20:37 josh-1.1-a.zip
-rw-r--r-- 1 stan stan 6.7M Nov 25 22:26 josh-1.1-b.zip
-rw-r--r-- 1 stan stan 8.5M Nov 26 01:38 josh-1.1-c.zip
-rw-r--r-- 1 stan stan  11M Nov 26 03:27 josh-1.1-d.zip
-rw-r--r-- 1 stan stan  13M Nov 26 17:28 josh-1.1-e-bad.zip
-rw-r--r-- 1 stan stan  15M Nov 26 21:56 josh-1.1-f.zip
-rw-r--r-- 1 stan stan  16M Nov 26 23:28 josh-1.1-g-bad.zip
-rw-r--r-- 1 stan stan  56M Nov 27 04:35 josh-1.1-h.zip
-rw-r--r-- 1 stan stan 150M Nov 27 15:22 josh-1.1-i.zip
We're hoping you can find clues to this performance issue in the save files that I've uploaded in Google Drive here: https://drive.google.com/drive/folders/ ... sp=sharing
My friend & I did some testing and it appears to be related to the Bottleneck mod Construction Drone hack mod (it's just the "Construction Drones mod with the version bumped): https://mods.factorio.com/mod/Construction_Droneslk. When we disable the mod and re-save the game, the save file becomes small again. Sorry for reporting a mod-related issue.

Re: Performance optimization - post your saves

Posted: Fri Feb 12, 2021 11:27 am
by shubharora734
It might have something to do with the updated steam-graphic, or that I run it with my onboard graphic card with 1 or 2 GB VRAM (not sure, not in my computer right now)

Re: Performance optimization - post your saves

Posted: Fri Feb 12, 2021 3:20 pm
by ptx0
Lennartos wrote:
Fri Nov 27, 2020 4:16 pm
[...]Speed on the server is now down to 24UPS to match the smallest client.. which is a pain.
[...]but it really seems to be just many small things accumulating.

Electricity system (3ms)
And Entity System (8ms)
Seem to be the worst offenders as far as i can see.
[...]

[...] should be relatively easy to be seperated into threads, if entities and electricity themselves prove to be a challenge to thread.
threading most likely isn't a solution.

and this is why people don't play Space Exploration in multiplayer - or if they do, it typically doesn't last very long.

Electricity and Entity updates simply mean you have "built too much". ElectricNetwork updates aren't threaded, and the gains of threading it would be minimal. it's not really a problem in Vanilla gameplay. maybe in the expansion they'll look into this if the gameplay mechanics change.

overall though, you're right. it's just many small things accumulating. mostly inserters consuming power. if you disable their power consumption by giving them a void source, it'll make things better by a few milliseconds. but then you'll just run into this ceiling again.

one thing you can try is the GTTS mod. it will modify the speed of all items in the game / electric consumption so that it feels like 60 UPS while it's running at 24 UPS.

Re: Performance optimization - post your saves

Posted: Fri Feb 12, 2021 6:15 pm
by ptx0
jfyi Rseding91, using Microsoft's mimalloc implementation instead of glibc malloc has resulted in a 50% reduction in update time on a train-centric megabase save, from 7ms to 3.5ms.