Performance optimization - post your saves

Post all other topics which do not belong to any other category.
Sander_Bouwhuis
Filter Inserter
Filter Inserter
Posts: 292
Joined: Mon Dec 07, 2015 10:45 pm
Contact:

Re: Performance optimization - post your saves

Post by Sander_Bouwhuis »

teenusa wrote: Wed Mar 20, 2019 8:25 pm @Rseding91 I've got an really reallistic map for you :P
about 663k gates fill up this map.

the performacen is very good until you open all the gates (opening and closing is not a problem at all I think)
the reall problem are open gates, I only get about 25 UPS with an 5.2Ghz i7 8700K

to open all the gates, just turn on the nearest constant combinator (bottom right corner of that thing)

Why are open gates eating so much performance? I cannot think abbout anything what causes something like this, aren't open gates "passive" (they do not have to do anything, do not have to look for players, or anything like that.)

The map is too big for the forum.
The map name is "laggy gates.zip"
https://mega.nz/#F!24ciiYTZ!MO7BbbZo1hjFaSO8biPcKQ
This probably has to do with path finding. As long as the gates are closed there is no path there. When you open them, you add 663.000 unique pathways to other places on the map. If Factorio is trying to calculate the shortest path from a biter nest to your base, it will have to go through an insane amount of choices.
TheSAguy
Smart Inserter
Smart Inserter
Posts: 1449
Joined: Mon Jan 13, 2014 6:17 pm
Contact:

Re: Performance optimization - post your saves

Post by TheSAguy »

Hi,

I have a save here that is causing heavy lag. It's modded.
In a small area of approximately 32x16 tiles contains ~5,000 items and ~10,000 fires, and that's why it is so slow.

This is the area that causes the problems.
As you can see, lot's of items on the ground and lots of flames: The FPS drops to below 5 at points.
Image


Full disclosure, it's mainly caused by my mod NE Enemies.
The problem is, I don't know what to do about it...
I've tried to edit my flames to be as short lived and non spreading as possible, so not sure if it's just vanilla's flame thrower causing the lag because of the items on the ground.

I know you guys are hard working on bug fixes.
So any help with this would be greatly appreciated.

SAVE on DropBox: https://www.dropbox.com/s/nkd5po8y1llajvx/Slow.zip?dl=0

Mods on Dropbox:
https://www.dropbox.com/s/b2ihc9yppoj4dzj/MODS.zip?dl=0

Some more screens ans save:
4 FPS:
Image
Save at 13 FPS: https://www.dropbox.com/s/blr2o31j9b3li ... 2.zip?dl=0

Thanks again!!
Attachments
Natural_Evolution_Enemies_0.17.12.zip
Mod that I think is causing this...
(1.34 MiB) Downloaded 177 times
factorio-current.log
(146.46 KiB) Downloaded 190 times
evandy
Fast Inserter
Fast Inserter
Posts: 236
Joined: Mon Apr 15, 2019 2:54 am
Contact:

Re: Performance optimization - post your saves

Post by evandy »

Are you still looking for saves? I am having huge fps issues when I'm areas with dense forest. It is a bobs and angels game but I don't think that is part of the problem. Will upload my safe for you tonight.


2018 15" MacBook pro, so a decent but not super powerful graphics card.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14561
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Performance optimization - post your saves

Post by Rseding91 »

evandy wrote: Fri May 24, 2019 2:21 pm Are you still looking for saves? I am having huge fps issues when I'm areas with dense forest. It is a bobs and angels game but I don't think that is part of the problem. Will upload my safe for you tonight.


2018 15" MacBook pro, so a decent but not super powerful graphics card.
Game update performance problems yes. FPS problems no. I can just tell you right now the problem is you're using a macbook pro and the graphics card is not powerful enough. According to the technical specifications I found online the macbook pro you have either has a Radeon Pro 555X or a Radeon Pro 560X. Those are both very weak graphics cards.

Comparing them to the GTX 970 graphics card I'm using which was made back in Q2 of 2014: https://www.videocardbenchmark.net/comp ... 3763vs2954 they're just slow.

You'll need to reduce graphics quality (use Normal/Low instead of High - if you're using "High" now) or get a better computer.
If you want to get ahold of me I'm almost always on Discord.
evandy
Fast Inserter
Fast Inserter
Posts: 236
Joined: Mon Apr 15, 2019 2:54 am
Contact:

Re: Performance optimization - post your saves

Post by evandy »

Rseding91 wrote: Fri May 24, 2019 9:36 pm Game update performance problems yes. FPS problems no. I can just tell you right now the problem is you're using a macbook pro and the graphics card is not powerful enough. According to the technical specifications I found online the macbook pro you have either has a Radeon Pro 555X or a Radeon Pro 560X. Those are both very weak graphics cards.

Comparing them to the GTX 970 graphics card I'm using which was made back in Q2 of 2014: https://www.videocardbenchmark.net/comp ... 3763vs2954 they're just slow.

You'll need to reduce graphics quality (use Normal/Low instead of High - if you're using "High" now) or get a better computer.
Can't say I'm surprised, but thanks for the info. I have the 560X for what it's worth... I don't usually have much trouble with rendering times, but I guess Factorio is worse than Civ & Eu4. UPS is staying up just fine at least.
ZZaphodd
Burner Inserter
Burner Inserter
Posts: 8
Joined: Tue May 07, 2019 10:59 am
Contact:

Re: Performance optimization - post your saves

Post by ZZaphodd »

train heavy save game

1k~2k spm @ 20~30 ups @ i7-4470

some mod included but QoL, practically vanilla
Clipboard01.jpg
Clipboard01.jpg (225.16 KiB) Viewed 8589 times
savelinks : https://drive.google.com/open?id=1NLdNK ... 7K5nS48MV5
Rseding91
Factorio Staff
Factorio Staff
Posts: 14561
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Performance optimization - post your saves

Post by Rseding91 »

ZZaphodd wrote: Mon Oct 21, 2019 10:31 am train heavy save game

1k~2k spm @ 20~30 ups @ i7-4470

some mod included but QoL, practically vanilla

savelinks : https://drive.google.com/open?id=1NLdNK ... 7K5nS48MV5
I took a look at your save but there's nothing special about it to optimize path finder wise. You've simply built the ultimate spaghetti train system :P

Did you manually place the blueprints for all of those rails? I wonder because most of them (I would guess close to 90%) are doing nothing but looking pretty. A lot aren't even connected to the rest of the system and just make small ovals. Overall it's just excessive to be excessive and isn't actually helping you move trains around faster (you have very few trains).

Still an interesting save though. Thanks for it :)
If you want to get ahold of me I'm almost always on Discord.
ZZaphodd
Burner Inserter
Burner Inserter
Posts: 8
Joined: Tue May 07, 2019 10:59 am
Contact:

Re: Performance optimization - post your saves

Post by ZZaphodd »

Rseding91 wrote: Wed Oct 23, 2019 7:11 pm
ZZaphodd wrote: Mon Oct 21, 2019 10:31 am train heavy save game

1k~2k spm @ 20~30 ups @ i7-4470

some mod included but QoL, practically vanilla

savelinks : https://drive.google.com/open?id=1NLdNK ... 7K5nS48MV5
I took a look at your save but there's nothing special about it to optimize path finder wise. You've simply built the ultimate spaghetti train system :P

Did you manually place the blueprints for all of those rails? I wonder because most of them (I would guess close to 90%) are doing nothing but looking pretty. A lot aren't even connected to the rest of the system and just make small ovals. Overall it's just excessive to be excessive and isn't actually helping you move trains around faster (you have very few trains).

Still an interesting save though. Thanks for it :)
Thank you for looked in to my game.
Totally agreed with ‘spaghetti train’ lol

Btw does ‘nothing doing rails’ make bad impact on finding routes? I used ‘nothing doing rails’ as occupied space from biters and will turn there as solar farm or mining site later
Honktown
Smart Inserter
Smart Inserter
Posts: 1044
Joined: Thu Oct 03, 2019 7:10 am
Contact:

Re: Performance optimization - post your saves

Post by Honktown »

I could make a save for enemy behavior lag. If pollution is absolutely stupendously high, UPS plummets when enemies nest. I was trying out "Choke on smoke", and enemies were nesting in... very large groups due to a fully red map and heightened enemy settings, and my UPS dropped to 38 before I removed the polluter and cleared nests with artillery. Otherwise my UPS has never consistently gone below my framerate (not a megabaser at all). Similar thing is possible in the wave defense scenario (the older one definitely) when enemies spawn. Multiple huge friggin blocks of green enemies, gosh. I could post that if you want, I don't think I was running mods. UPS might've been lower when watching the area, which may indicate a cpu->graphic bottleneck.
I have mods! I guess!
Link
Rseding91
Factorio Staff
Factorio Staff
Posts: 14561
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Performance optimization - post your saves

Post by Rseding91 »

ZZaphodd wrote: Thu Oct 24, 2019 5:45 am Thank you for looked in to my game.
Totally agreed with ‘spaghetti train’ lol

Btw does ‘nothing doing rails’ make bad impact on finding routes? I used ‘nothing doing rails’ as occupied space from biters and will turn there as solar farm or mining site later
Rails existing is fine. If you connect them to the rest of your rail system and then ask a train to drive on it then it starts to have a performance overhead for the pathfinder because it will try to check if driving down them is a valid route for the trian(s).
If you want to get ahold of me I'm almost always on Discord.
mr_fancy_pants
Burner Inserter
Burner Inserter
Posts: 17
Joined: Sun Nov 13, 2016 10:13 pm
Contact:

Re: Performance optimization - post your saves

Post by mr_fancy_pants »

I have a ~780 SPM base that I'm loathe to expand because it's starting to drop below 60 UPS on my machine (Xeon E5 2690v2, 64G RAM @ 1600 MHz). Instead I've been tweaking it for better UPS, and after some changes and investigation, it seems a lot of the time is being spent on trains:
nothing_in_particular.png
nothing_in_particular.png (2.99 MiB) Viewed 8174 times
Pictured is a 4ms train update, but It's not unusual to see trains spike up to ~10 ms update per tick. Although they spend much of their time at ~1 ms per tick, they are very very spiky.

I don't really have that many trains (~100), although the rail network is pretty extensive. For the most part, there's only signals at the rail junctions, but every junction is heavily optimized for train flow such that they only reserve exactly the path they're using through it and won't stop in the junction - this requires a lot more signals than might be intuitively expected.

There's still further UPS savings to be had outside of trains, but it would be great if trains themselves could be made more efficient without having to completely gut the existing rail network (I am very very fond of the rail grid pattern).

Save appears to be too large for the forums (~77M):

http://97.107.134.138/nothing%20in%20particular.zip
Koub
Global Moderator
Global Moderator
Posts: 7902
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Performance optimization - post your saves

Post by Koub »

I'll try an educated guess : you have way too many useless train roundabouts, which require a ton of signalling, and for each train, a ton of pathfinding. It might please you for aesthetic or practical purpose, but the same base with only the required amount of train tracks would be stuck on 60 UPS for long :)
Koub - Please consider English is not my native language.
User avatar
Oktokolo
Filter Inserter
Filter Inserter
Posts: 884
Joined: Wed Jul 12, 2017 5:45 pm
Contact:

Re: Performance optimization - post your saves

Post by Oktokolo »

mr_fancy_pants wrote: Tue Nov 19, 2019 2:43 am nothing_in_particular.png
It looks to me like you have layd a fine grid of rails over the entire continent!
But why?

A cell size of three smelter columns is way too small to be of any use. Enlarge the cells four times near your base and even more further out. Then you can expand as much as you want without train pathfinding becomming an issue.
mr_fancy_pants
Burner Inserter
Burner Inserter
Posts: 17
Joined: Sun Nov 13, 2016 10:13 pm
Contact:

Re: Performance optimization - post your saves

Post by mr_fancy_pants »

Oktokolo wrote: Wed Nov 20, 2019 12:49 am
mr_fancy_pants wrote: Tue Nov 19, 2019 2:43 am nothing_in_particular.png
It looks to me like you have layd a fine grid of rails over the entire continent!
But why?

A cell size of three smelter columns is way too small to be of any use. Enlarge the cells four times near your base and even more further out. Then you can expand as much as you want without train pathfinding becomming an issue.
Glad you asked, quite a lot of reasons actually! My rail grid blueprint has Roboports, power, radar and an optimally signalled junction on each corner built in (and is sized based on max Roboport range), so let's look at the benefits:

0) No more "oops, I didn't leave enough room for x" - the cardinal sin of Factorio (see below for further explanation).
1) Highly redundant power everywhere. No more "Oops, I accidentally removed the single power pole that was connecting half of the base to power". No more shuffling random power poles around that are in the way of your big blueprint placements.
2) Roboport coverage everywhere. Everything gets repaired/(re)built/etc without needing to worry about connecting networks or coverage. Also, bots don't get stuck flying over large uncovered areas - in particular, consider capturing a large area for resources but only having roboports around your mining outposts and your perimeter wall. No more shuffling random Roboports around that are in the way of your big blueprint placements.
3) Rail coverage everywhere (with already constructed junctions!). Need more resources? Rails are right there already! Want to send yourself somewhere fast? Use a temporary train stop, rails are already there!
4) No manual rail signals required while still keeping rail sections reasonably sized. In OpenTTD, you can lay down rails from point A to B with signals automagically placed at predefined distances. Factorio kinda has this with blueprints, but it breaks down fast if your rails aren't 100% straight. Manually signalling something you plopped down with the rail planner is extremely awful at anything beyond trivial scales. Not signalling it leaves you a grossly non-optimal rail network in terms of rail bandwidth.
5) Full radar coverage everywhere! Zoom to view makes this infinitely awesome.
6) Rail bandwidth that massively exceeds that of a single rail line. This is a real concern with a decent number of trains.
7) Built in stackers around train stations. Due to the built in redundancy, it's rarely necessary to build proper stackers at larger train stops to avoid gridlock.
8) Build free standing designs that fit inside a standard rail grid and put them anywhere! Have a bigger design? Use more rail grids and still put them anywhere! I have built entire bases like this with everything hooked together via rail or skynet, and it is very awesome (mostly not pictured in this base (with the rather large exception of solar) because I opted for a pure main bus design).
9) Spam as much solar as you want without worrying about it getting in the way. Note that I have ~345k solar panels and ~289k accumulators deployed without getting in the way of anything.
10) Expand your rails in any direction at any time without having to worry about whether they're going to hook back up again nicely with your network on the other end, because all rail expansion happens in grids at a time.

I have built a lot of megabases and I have faced all of the above problems many times. This is not the first solution I've come up with, but it is by far the best solution I've come up with so far. I've probably missed a few benefits, but the above list will have to do for now.

You suggested larger grids, but that's not necessary from a gameplay perspective as you can simply merge multiple smaller grids into a larger one if you need more space. Conversely, splitting a bigger grid into smaller ones works markedly less well for a variety of reasons. Larger grids are also harder to fit nicely on the map without covering up resources, running through perimeter walls, requiring extensive landfilling, etc. Make the grids too large and your bots will start getting stuck too.
Bauer
Filter Inserter
Filter Inserter
Posts: 349
Joined: Fri May 05, 2017 12:48 pm
Contact:

Re: Performance optimization - post your saves

Post by Bauer »

mr_fancy_pants wrote: Wed Nov 20, 2019 10:26 am
Oktokolo wrote: Wed Nov 20, 2019 12:49 am
mr_fancy_pants wrote: Tue Nov 19, 2019 2:43 am nothing_in_particular.png
It looks to me like you have layd a fine grid of rails over the entire continent!
But why?

A cell size of three smelter columns is way too small to be of any use. Enlarge the cells four times near your base and even more further out. Then you can expand as much as you want without train pathfinding becomming an issue.
Glad you asked, quite a lot of reasons actually! My rail grid blueprint has Roboports, power, radar and an optimally signalled junction on each corner built in (and is sized based on max Roboport range), so let's look at the benefits:

0) (...)
For exactly the same reasons, i use a 7x7 chunks grid. No performance worries whatsoever.
User avatar
Oktokolo
Filter Inserter
Filter Inserter
Posts: 884
Joined: Wed Jul 12, 2017 5:45 pm
Contact:

Re: Performance optimization - post your saves

Post by Oktokolo »

mr_fancy_pants wrote: Wed Nov 20, 2019 10:26 am I have built a lot of megabases and I have faced all of the above problems many times. This is not the first solution I've come up with, but it is by far the best solution I've come up with so far. I've probably missed a few benefits, but the above list will have to do for now.
I never had that problems with my naive rail blueprints that consist of straight segements, junctions and stackers of rail that i put down where i need them.
But i neither need to have rail right next to each radar, nor a roboport segment covering an entire continent. I included big power poles in my blueprints though.
I am not a megabaser, but i read, that in general they like to split their bot networks into rather small segments and optimize everything for UPS. Rail networks wich contain enormous amounts of unused nodes and continent-wide logistic networks are an unexpected deviation from that "norm".
mr_fancy_pants
Burner Inserter
Burner Inserter
Posts: 17
Joined: Sun Nov 13, 2016 10:13 pm
Contact:

Re: Performance optimization - post your saves

Post by mr_fancy_pants »

Bauer wrote: Wed Nov 20, 2019 12:10 pm
mr_fancy_pants wrote: Wed Nov 20, 2019 10:26 am
Oktokolo wrote: Wed Nov 20, 2019 12:49 am
mr_fancy_pants wrote: Tue Nov 19, 2019 2:43 am nothing_in_particular.png
It looks to me like you have layd a fine grid of rails over the entire continent!
But why?

A cell size of three smelter columns is way too small to be of any use. Enlarge the cells four times near your base and even more further out. Then you can expand as much as you want without train pathfinding becomming an issue.
Glad you asked, quite a lot of reasons actually! My rail grid blueprint has Roboports, power, radar and an optimally signalled junction on each corner built in (and is sized based on max Roboport range), so let's look at the benefits:

0) (...)
For exactly the same reasons, i use a 7x7 chunks grid. No performance worries whatsoever.
Chunks are 32x32, so you'd have a big gap in the middle with no Roboport construction coverage, or you'd have to spray more Roboports inside the grid. Both of those are undesirable to me.
mr_fancy_pants
Burner Inserter
Burner Inserter
Posts: 17
Joined: Sun Nov 13, 2016 10:13 pm
Contact:

Re: Performance optimization - post your saves

Post by mr_fancy_pants »

Oktokolo wrote: Wed Nov 20, 2019 1:07 pm
mr_fancy_pants wrote: Wed Nov 20, 2019 10:26 am I have built a lot of megabases and I have faced all of the above problems many times. This is not the first solution I've come up with, but it is by far the best solution I've come up with so far. I've probably missed a few benefits, but the above list will have to do for now.
I never had that problems with my naive rail blueprints that consist of straight segements, junctions and stackers of rail that i put down where i need them.
But i neither need to have rail right next to each radar, nor a roboport segment covering an entire continent. I included big power poles in my blueprints though.
I am not a megabaser, but i read, that in general they like to split their bot networks into rather small segments and optimize everything for UPS. Rail networks wich contain enormous amounts of unused nodes and continent-wide logistic networks are an unexpected deviation from that "norm".
While they're possibly better for UPS, multiple logistics networks are an enormous PITA from a gameplay perspective. UPS optimizations that make the game less fun are generally not worthwhile in my opinion.
quyxkh
Smart Inserter
Smart Inserter
Posts: 1031
Joined: Sun May 08, 2016 9:01 am
Contact:

Re: Performance optimization - post your saves

Post by quyxkh »

mr_fancy_pants wrote: Wed Nov 20, 2019 5:23 pm While they're possibly better for UPS, multiple logistics networks are an enormous PITA from a gameplay perspective. UPS optimizations that make the game less fun are generally not worthwhile in my opinion.
https://www.youtube.com/watch?v=QqR68rLP3jE
Stevetrov
Fast Inserter
Fast Inserter
Posts: 134
Joined: Tue Jun 14, 2016 7:04 am
Contact:

Re: Performance optimization - post your saves

Post by Stevetrov »

mr_fancy_pants wrote: Wed Nov 20, 2019 5:23 pm
Oktokolo wrote: Wed Nov 20, 2019 1:07 pm
mr_fancy_pants wrote: Wed Nov 20, 2019 10:26 am I have built a lot of megabases and I have faced all of the above problems many times. This is not the first solution I've come up with, but it is by far the best solution I've come up with so far. I've probably missed a few benefits, but the above list will have to do for now.
I never had that problems with my naive rail blueprints that consist of straight segements, junctions and stackers of rail that i put down where i need them.
But i neither need to have rail right next to each radar, nor a roboport segment covering an entire continent. I included big power poles in my blueprints though.
I am not a megabaser, but i read, that in general they like to split their bot networks into rather small segments and optimize everything for UPS. Rail networks wich contain enormous amounts of unused nodes and continent-wide logistic networks are an unexpected deviation from that "norm".
While they're possibly better for UPS, multiple logistics networks are an enormous PITA from a gameplay perspective. UPS optimizations that make the game less fun are generally not worthwhile in my opinion.
The UPS costs of logi-nets mainly depends on the number of bots in the air and the number of jobs dispatched / second.
There is also a small constant cost for roboports because they dont sleep. As OP is only using the logi-net for building and not production, it will only slow down when building. He would see a small UPS improvement if he got rid of most of the roboports, but I doubt it would be very big.

oh and yes mr_fancy_pants your rail network is causing extra work for the path-finder because there are so many paths between any 2 points.
Post Reply

Return to “General discussion”