[17.31] massive FPS drop - want help figuring out what's causing it

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.
Post Reply
edavis6678
Burner Inserter
Burner Inserter
Posts: 7
Joined: Fri Mar 29, 2019 3:44 am
Contact:

[17.31] massive FPS drop - want help figuring out what's causing it

Post by edavis6678 »

I'm doing a co-op build for a mega base. We've been pretty much running 60FPS/60UPS throughout build (we are about 300 hours in). As we've been ramping up research we are starting to see massive drops in FPS at times (from 60 down to 8) -- sometimes the only way to get out of it, is to pause the game for it to catch up. (and a slight drop in UPS too, but mainly FPS). We are ramping slowly to our 10K RPM goal, currently at a solid 2.5K rpm. We never went into "Cheat" mode, but finally ran this command to see if it would help. (it helped on our .16 build)

/c game.player.surface.clear_pollution()
/c game.forces["enemy"].kill_all_units()

This did not help or give any relief.

I have captured the current save, log files, and some screen shots of "during bad perf" and "during good perf".

https://drive.google.com/open?id=1tcfSB ... OedP5R6nub

We especially see issues when our "mall" goes into full action - which also means our factory is out of buffer (we run very small buffers); we are thinking it's too many logistic bots. We have a lot of trains, and have made some efforts to reduce a circular track and make them closed loops. We also have one very large logistic area from our solar panels, but it's not active; not sure if that's an issue.

We all run high-end machines and the log file included is a comparable configuration to others on the team.

Any advice or settings changes would be welcome!
-E

edit: corrected google drive link

Dune
Fast Inserter
Fast Inserter
Posts: 201
Joined: Tue Dec 12, 2017 4:27 am
Contact:

Re: [17.31] massive FPS drop - want help figuring out what's causing it

Post by Dune »

My guess, from having built several megabases, is that when you put in the last science outpost and finally are able to get the production really cranking you lag.

What happens is while you are building the base, your outposts are barely ticking. The trains move infrequently. The miners barely ever turn. When you turn on that last outpost that lets everything flow is when you finally get UPS drop because everything is moving.

Throttle back your science output and you'll see recovery of UPS/FPS. You can do this in a number of ways, but the way I prefer is a (red) cable over the entire base network to a constant combinator somewhere that has a value, say in PPM. You set your inserters wherever your labs are to be enabled based on values on that constant combinator.

The 10K PPM is a wonderful goal, but I find it unrealistic at least with my machine. For me, the game at that point isn't the goal so much as to have a beautifully tuned and flowing machine of outposts and trains. Find a high number that lets you have UPS and has the most activity, and enjoy your craftsmanship for what it is.
Image

edavis6678
Burner Inserter
Burner Inserter
Posts: 7
Joined: Fri Mar 29, 2019 3:44 am
Contact:

Re: [17.31] massive FPS drop - want help figuring out what's causing it

Post by edavis6678 »

I appreciate the reply. Yes, 10K is lofty, but we'd like to know what's exactly causing it and/or how can we design around it? We already learned from our .16, 5K build that we needed all solar, no belts, and we saw improvements without active aliens.

Our new plant here has all of the sub-component designs to support 10K RPM. Last night we got a little anxious and, although we still have 3 more science outposts left to fully construct, we were able to "turn up the plant" to about 2.5K and we seeing some heavy FPS drops, (more than from our .16 build).

I have an I7-7700K 4.2GHz, NVMe, 32GB RAM, NVidia 980TI - i would think that would be enough to handle things...i'm wondering if there are some tweaks I can make to improve things. (and would also like to know what is really causing the FPS drop)

Zavian
Smart Inserter
Smart Inserter
Posts: 1641
Joined: Thu Mar 02, 2017 2:57 am
Contact:

Re: [17.31] massive FPS drop - want help figuring out what's causing it

Post by Zavian »

To me the massive fps drops look like a classic case of the client dropping frames as it struggles to keep up with the server. (Factorio is a lockstep simulation. Both server and clients run the same simulation every game update. The client needs to keep up with the server, otherwise the game will become unplayable, and the server will eventually disconnect the client. So to save cpu cycles for the update part of the game loop, the client starts skipping the rendering part. See the note about multiplayer in the performance section of viewtopic.php?f=49&t=4400).

To run as 60 ups + 60 fps, the game has 16.666ms to run the entity update, and render parts of the game loop. Looking at your bad_perf.jpg, the game update is taking 16.23 ms, leaving almost no time for the render part of the loop.

Here are a few approaches you can try.
1. Slow down the game using /c game.speed = 0.8 or so.
2. Run the server on a slower machine than the clients, that way the game will degrade gracefully when the server can no longer sustain 60 ups.
3. Build a smaller base, and/or a more ups efficient base.

edavis6678
Burner Inserter
Burner Inserter
Posts: 7
Joined: Fri Mar 29, 2019 3:44 am
Contact:

Re: [17.31] massive FPS drop - want help figuring out what's causing it

Post by edavis6678 »

Thanks for the reply.

Well, it sounds like for those that want to see end-game and the pursuit of RPM, they are pretty much capped at a certain point. That's too bad. I know there probably isn't a lot of people playing this way (or maybe, but eventually quit cause they can't go any farther), but it would be nice to have items added to the game, that help in efficiency so you can do more with less entities, and increase your RPM. For example; having research added that increases train count sizes, or box sizes, or the # of items a picker can do, or really expensive modules that increase output of factories, so you don't have to use as many...

Is there a way to find out which entities on my particular file are causing the most rendering and/or lag? We have all solar, very few belts. I'm wondering if there are some other changes we can make. Does the actually file size cause issues? or is it simply the actual entity count?

-E

Zavian
Smart Inserter
Smart Inserter
Posts: 1641
Joined: Thu Mar 02, 2017 2:57 am
Contact:

Re: [17.31] massive FPS drop - want help figuring out what's causing it

Post by Zavian »

You might get some idea what entities are using the most cpu time by loading the save under Microsoft's Visual studio profiler. The free version should be good enough. (Also note what I said above, the cause of the fps drops, and any lag is not a particular entity, but the client struggling to keep up with the server. Slow down the server and/or reduce the number of active entities and you should be back to fps = ups).

10k spm at 60 ups is pretty ambitious. You really need a ups efficient design. The best example I can recall seeing is fuxxx's 0.16 10k spm base. Save file linked in the reddit post at https://www.reddit.com/r/factorio/comme ... _megabase/ . Zoomable/scrollable map at https://factoriomaps.com/schaev/10kspm- ... 3.9564/Day . Exterminator did a video review https://www.youtube.com/watch?v=Av8DZo368Jw . Almost entirely train based, virtually no bots or belts.

You could load it up in single player and see what ups you get, then load it up in multiplayer and compare. (Playing in multiplayer adds a small amount of extra work for the processor compared to single player).

edavis6678
Burner Inserter
Burner Inserter
Posts: 7
Joined: Fri Mar 29, 2019 3:44 am
Contact:

Re: [17.31] massive FPS drop - want help figuring out what's causing it

Post by edavis6678 »

So, as a follow up to this...

Started pushing 700K+ plate per minute and getting really bad UPS (sustaining about 5k spm with the headroom to 10K -- just needed some tweets

The FPS was getting very bad...I decided to convert the headless windows server to a Linux distro...absolutely HUGE difference. (granted, it was slightly different CPU, but it's like night vs. day.


Sustaining 7K SPM about 56UPS/FPS -- working to 10K!

I used this Redit post to help me configure the server: https://www.reddit.com/r/factorio/comme ... ss_server/

Post Reply

Return to “Technical Help”