Performance optimization - post your saves

Post all other topics which do not belong to any other category.

Performance optimization - post your saves

Postby Rseding91 » Mon Nov 02, 2015 1:53 am

I'm looking for save files where people are experiencing specific (or extreme) performance issues so I can work on optimizing them.

A few examples of existing specific/extreme saves I've profiled and found areas to optimize:

  • During heavy combat with 120 + robots (particle slowdown)
  • Having 5000+ beacons active at once (tick slowdown)
  • Having 66,000+ robots on screen at the same time (Render slowdown)
  • Opening a chest with 5000 slots (GUI slowdown)
  • Having 50,000 + logistic containers and trying to render the logistic selection for all of them (Render slowdown)

Pushing the game well beyond what it can handle helps to show areas that can easily be improved but don't normally stick out due to how in-frequent they're used in a normal game.

If you're going to post a modded save please include the mods. The mods and save also need to run on 0.12.16.
If you want to get ahold of me I'm almost always on IRC.
My Github page with my mods: https://github.com/Rseding91?tab=repositories
Find my mods on the mod portal: https://mods.factorio.com/mods/Rseding91
Rseding91
Factorio Staff
Factorio Staff
 
Posts: 3959
Joined: Wed Jun 11, 2014 5:23 am

Re: Performance optimization - post your saves

Postby oLaudix » Mon Nov 02, 2015 2:38 pm

My first time sharing smth via dropbox so im not sure i did it right:
https://www.dropbox.com/s/mrdlfxtf9o3mt ... s.zip?dl=0 - mods
https://www.dropbox.com/s/5novyd5setfui ... 9.zip?dl=0 - save
Screen:
http://i.imgur.com/BUvJzRy.png

Its and old save but all mods should be updated and working.
Image
User avatar
oLaudix
Filter Inserter
Filter Inserter
 
Posts: 252
Joined: Sun Jun 14, 2015 3:24 pm

Re: Performance optimization - post your saves

Postby bobucles » Tue Nov 03, 2015 12:18 am

FYI, a beacon durning brownout will only output a fraction of the strength of its modules. This may explain the 5K slowdown, as every beacon is likely updating the status of its surroundings every tick.

You can get some really odd behavior when a beacon starts losing energy. For example when efficiency modules are installed, a loss of beacon power causes nearby structures to lose their efficiency. They consume more power, thus hurting the beacon even more, causing positive feedback and a potential total loss of function. If stuff shuts down the beacon may have power restored and you get a repeating cycle of this. It's cool to watch but I dunno if it really needs that kind of simulation.
bobucles
Filter Inserter
Filter Inserter
 
Posts: 612
Joined: Wed Jun 10, 2015 10:37 pm

Re: Performance optimization - post your saves

Postby driver » Tue Nov 03, 2015 9:59 am

Something should be done with the trees. Usually there are many of them and if I zoom out, the framerate goes down to 10 Fps. I don't know if this is only related to hardware, because my graphics card is quite poor (radeon Hd 5400 series).
driver
Inserter
Inserter
 
Posts: 27
Joined: Wed Oct 28, 2015 11:24 am

Re: Performance optimization - post your saves

Postby Rseding91 » Tue Nov 03, 2015 9:26 pm

driver wrote:Something should be done with the trees. Usually there are many of them and if I zoom out, the framerate goes down to 10 Fps. I don't know if this is only related to hardware, because my graphics card is quite poor (radeon Hd 5400 series).


If you can make a reproducible save file I can profile it. But as you said - it might just be your hardware. I can still profile to see if there's some obvious place to save performance if that's the only thing going on :) sometimes stuff shows up when *nothing else* is happening but that one thing.
If you want to get ahold of me I'm almost always on IRC.
My Github page with my mods: https://github.com/Rseding91?tab=repositories
Find my mods on the mod portal: https://mods.factorio.com/mods/Rseding91
Rseding91
Factorio Staff
Factorio Staff
 
Posts: 3959
Joined: Wed Jun 11, 2014 5:23 am

Re: Performance optimization - post your saves

Postby Rseding91 » Tue Nov 03, 2015 9:27 pm

bobucles wrote:FYI, a beacon durning brownout will only output a fraction of the strength of its modules. This may explain the 5K slowdown, as every beacon is likely updating the status of its surroundings every tick.

You can get some really odd behavior when a beacon starts losing energy. For example when efficiency modules are installed, a loss of beacon power causes nearby structures to lose their efficiency. They consume more power, thus hurting the beacon even more, causing positive feedback and a potential total loss of function. If stuff shuts down the beacon may have power restored and you get a repeating cycle of this. It's cool to watch but I dunno if it really needs that kind of simulation.


This is the type of thing that I was referring to :) Code that almost never runs but has some huge performance hit when it does. If I can get a save file that's having these weird issues I can profile it and see what there is to improve performance wise.
If you want to get ahold of me I'm almost always on IRC.
My Github page with my mods: https://github.com/Rseding91?tab=repositories
Find my mods on the mod portal: https://mods.factorio.com/mods/Rseding91
Rseding91
Factorio Staff
Factorio Staff
 
Posts: 3959
Joined: Wed Jun 11, 2014 5:23 am

Re: Performance optimization - post your saves

Postby oLaudix » Tue Nov 03, 2015 9:42 pm

Rseding91 wrote:
driver wrote:Something should be done with the trees. Usually there are many of them and if I zoom out, the framerate goes down to 10 Fps. I don't know if this is only related to hardware, because my graphics card is quite poor (radeon Hd 5400 series).


If you can make a reproducible save file I can profile it. But as you said - it might just be your hardware. I can still profile to see if there's some obvious place to save performance if that's the only thing going on :) sometimes stuff shows up when *nothing else* is happening but that one thing.

I dont know how much VRAM his GPU has, but i noticed that the trees eat quite a lot. When i was testing it it was something like 1500MB vs 1700MB of VRAM needed without and with a lot of trees on screen respectively.
Image
User avatar
oLaudix
Filter Inserter
Filter Inserter
 
Posts: 252
Joined: Sun Jun 14, 2015 3:24 pm

Re: Performance optimization - post your saves

Postby Xeteth » Wed Nov 04, 2015 1:47 am

I'm happy to send my save in - I'd rather not have it public at the moment since it's my stream save. Should I send a private message with a DL link to your inbox?
Xeteth
Fast Inserter
Fast Inserter
 
Posts: 132
Joined: Tue Feb 17, 2015 6:06 am

Re: Performance optimization - post your saves

Postby driver » Wed Nov 04, 2015 11:05 am

Concerning trees - it's mainly a problem of map generation. My first big game was mainly a desert map, which was absolutely fine, but now I often get maps with an insane amount of trees, but it already helps if I set the terrain variation to rich to get less trees.
Perhaps an option to choose a desert map would be fine, because I like to make use of the car.
I could limit the zoom, but if you like to look at your train network, you probably prefer to zoom out at max very often.
driver
Inserter
Inserter
 
Posts: 27
Joined: Wed Oct 28, 2015 11:24 am

Re: Performance optimization - post your saves

Postby nobodx » Thu Nov 05, 2015 8:37 am

Usually my game runs fine, but since the latest .15 update it starts to lag around my power engines.
I'm not on my computer right now sink can't give you a upload.

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)
nobodx
Fast Inserter
Fast Inserter
 
Posts: 151
Joined: Mon Jul 06, 2015 3:22 pm

Re: Performance optimization - post your saves

Postby AgentZero » Wed Apr 27, 2016 3:16 am

Are you still looking for save files?

I'm having some pretty serious performance issues on my system
FX-8320
32GB DDR3
2x nVidia GTX 660ti
- Problem occurs with SLI off, not as noticeable with SLI on however still seems evident.
I feel that I meet recommended requirements.
But, Full CPU-Z system info dump is available by PM on request.

GPU-Z shows extremely high peak Bus Interface Loads that accompany the studdering and shuddering that occurs in game.

Problem occurs when the steam engine boilers run low on fuel.
AgentZero
Manual Inserter
Manual Inserter
 
Posts: 1
Joined: Wed Apr 27, 2016 3:14 am

Re: Performance optimization - post your saves

Postby Rseding91 » Wed Apr 27, 2016 3:25 am

If you can provide the save file in the state when it's having issues and give steps to reproduce it yes.
If you want to get ahold of me I'm almost always on IRC.
My Github page with my mods: https://github.com/Rseding91?tab=repositories
Find my mods on the mod portal: https://mods.factorio.com/mods/Rseding91
Rseding91
Factorio Staff
Factorio Staff
 
Posts: 3959
Joined: Wed Jun 11, 2014 5:23 am

Re: Performance optimization - post your saves

Postby Rseding91 » Tue Nov 15, 2016 10:41 pm

I'm still interested in large save games (modded or not - if modded please also upload the mods) :)
If you want to get ahold of me I'm almost always on IRC.
My Github page with my mods: https://github.com/Rseding91?tab=repositories
Find my mods on the mod portal: https://mods.factorio.com/mods/Rseding91
Rseding91
Factorio Staff
Factorio Staff
 
Posts: 3959
Joined: Wed Jun 11, 2014 5:23 am

Re: Performance optimization - post your saves

Postby keyboardhack » Wed Nov 16, 2016 2:11 am

I assume it's the mass of bots that primarily slows down the game but i can't be sure. Here is some observation i have done of the performance.
Save and mods are attached below.

Observed problems:
  • FPS loss in the productions tab. Usually halves the fps to open the production tab.
  • FPS loss in the train preview when not set to map mode. The more the train preview camera is zoomed out the worse the fps gets.
  • When placing tracks that connects to the railway the whole game stops for a short moment.
  • Deconstructing or construction anything with a few hundred items will slow the game to 8-10ups.
  • Running this command
    Code: Select all
    /c local surface = game.player.surface; for coord in surface.get_chunks() do surface.pollute({coord.x * 32, coord.y * 32}, -10000000) end
    usually increases the ups by ~5.

SuperSaveS.zip
(110.75 MiB) Downloaded 20 times


SuperSaveS_mods.zip
(9.88 MiB) Downloaded 24 times
Waste of bytes : P
keyboardhack
Filter Inserter
Filter Inserter
 
Posts: 413
Joined: Sat Aug 23, 2014 11:43 pm

Re: Performance optimization - post your saves

Postby bk5115545 » Wed Nov 16, 2016 3:08 am

Hey Rsedsing you probably saw it but here's a massive save that has some lag because if the trains.
https://forums.factorio.com/viewtopic.php?f=49&t=35519

You have to turn on the copper ore and iron ore unloading via the circuit network at the train stations on right and top of the base.
bk5115545
Fast Inserter
Fast Inserter
 
Posts: 113
Joined: Sun Apr 03, 2016 7:00 pm

Re: Performance optimization - post your saves

Postby Rseding91 » Wed Nov 16, 2016 10:11 am

keyboardhack wrote:Observed problems:
  • FPS loss in the productions tab. Usually halves the fps to open the production tab.
  • FPS loss in the train preview when not set to map mode. The more the train preview camera is zoomed out the worse the fps gets.
  • When placing tracks that connects to the railway the whole game stops for a short moment.
  • Deconstructing or construction anything with a few hundred items will slow the game to 8-10ups.
  • Running this command
    Code: Select all
    /c local surface = game.player.surface; for coord in surface.get_chunks() do surface.pollute({coord.x * 32, coord.y * 32}, -10000000) end
    usually increases the ups by ~5.


What graphics card do you have? Most of those sound like your graphics card just isn't powerful enough since they're almost all render related.
If you want to get ahold of me I'm almost always on IRC.
My Github page with my mods: https://github.com/Rseding91?tab=repositories
Find my mods on the mod portal: https://mods.factorio.com/mods/Rseding91
Rseding91
Factorio Staff
Factorio Staff
 
Posts: 3959
Joined: Wed Jun 11, 2014 5:23 am

Re: Performance optimization - post your saves

Postby d4rkpl4y3r » Wed Nov 16, 2016 12:32 pm

FPS loss in the productions tab. Usually halves the fps to open the production tab.


I experience this as well, render time in my base is usually around 4 ms and when I open up the production screen it goes up to 25ms. Definitifely not a hardware issue since I just got a GTX 1070.
d4rkpl4y3r
Inserter
Inserter
 
Posts: 31
Joined: Wed Apr 27, 2016 8:24 pm

Re: Performance optimization - post your saves

Postby FunMaker » Wed Nov 16, 2016 5:41 pm

Attached a game with some bases connected to each other by train. Most bases are unloaded/loaded by Robots - 0.14.20.

my Spec:

i7-920
GTX 970 (4GB)
24 GB RAM.

FPS/UPS mostly linked to each other at 25-30 FPS/UPS. It does not matter if i am near a base with many robots or not - performance stays mostly the same.

Just run up in the game to see my smelters (10k+ Bots). To increase performance i was thinking about changing to belts - but 50-80 belts next to each other is not my cup of the and possibly it would make the performance even worse...

Main Problem: 1 core at 90%, 1 core at 20%, 6 cores at 10%. Seems that robots are not multithreaded and i think they are a great point to handle them concurrently.
Another approach that might be not a good idea:
Simulate robots as a whole:
Count of robots = c
delay for pickup from provider chest: x / c
delay for dropoff at provider chest: y / c
so the complete movement of robots would be eliminated. I know this might remove the feeling of "when does that dumb robot arrive?". But would increase performance alot.

Hopefully you are already at that point of optimization that robots are handled alot better in your dev version ;)
Attachments
Performance Prob.zip
(49.98 MiB) Downloaded 16 times
FunMaker
Inserter
Inserter
 
Posts: 38
Joined: Wed Jun 08, 2016 8:43 pm

Re: Performance optimization - post your saves

Postby Rseding91 » Wed Nov 16, 2016 6:25 pm

d4rkpl4y3r wrote:
FPS loss in the productions tab. Usually halves the fps to open the production tab.


I experience this as well, render time in my base is usually around 4 ms and when I open up the production screen it goes up to 25ms. Definitifely not a hardware issue since I just got a GTX 1070.


When I open the production window on the provided save it lowers the FPS by 4.

What graphics settings are you using?
If you want to get ahold of me I'm almost always on IRC.
My Github page with my mods: https://github.com/Rseding91?tab=repositories
Find my mods on the mod portal: https://mods.factorio.com/mods/Rseding91
Rseding91
Factorio Staff
Factorio Staff
 
Posts: 3959
Joined: Wed Jun 11, 2014 5:23 am

Re: Performance optimization - post your saves

Postby Rseding91 » Wed Nov 16, 2016 6:36 pm

FunMaker wrote:FPS/UPS mostly linked to each other at 25-30 FPS/UPS. It does not matter if i am near a base with many robots or not - performance stays mostly the same.


It runs at a solid 40 FPS/UPS for me on an i7-4790K with a GTX 970. Currently in 0.15 it runs at 53 FPS/UPS for me.

FunMaker wrote:Main Problem: 1 core at 90%, 1 core at 20%, 6 cores at 10%. Seems that robots are not multithreaded and i think they are a great point to handle them concurrently.


If you think that you know nothing about how Factorio works. The entire simulation is deterministic meaning you can't just update things in random orders on different threads even if that wouldn't cause concurrency issues with the robots as they moved around the map/interacted with data structures that don't support threading.

https://www.reddit.com/r/factorio/comme ... 4/d5mrewu/
If you want to get ahold of me I'm almost always on IRC.
My Github page with my mods: https://github.com/Rseding91?tab=repositories
Find my mods on the mod portal: https://mods.factorio.com/mods/Rseding91
Rseding91
Factorio Staff
Factorio Staff
 
Posts: 3959
Joined: Wed Jun 11, 2014 5:23 am

Next

Return to General discussion

Who is online

Users browsing this forum: zach2759 and 13 guests