Looking for help locating the cause of a ballooning Entity Update time

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.
fwyrl
Inserter
Inserter
Posts: 49
Joined: Fri Jul 01, 2016 10:54 pm
Contact:

Looking for help locating the cause of a ballooning Entity Update time

Post by fwyrl »

To preface; was unsure if this went here or in technical help, sorry if it's in the wrong forums!

I have a (very old; circa 0.16 iirc) save that I've pulled across every update since, and, twice now, I've had this weird.... thing, where the UPS will suddenly fall sharply while seemingly nothing unusual is happening. The first time this happened when I was updating a version and I thought the factory was just killed by the update, but after leaving it running for a few days IRL it figured itself out and went back up from 2 UPS to 45-50 (at the time).

This time, it happened in the middle of a play session, and the only event that I could see even remotely near the timing was parking about 200 spidertrons in my logistics network with requests, but I've done that before with no issue.

I pulled up the time breakdown, and of the ~400 ms each frame was taking, over 350 were spent on Entity update. As I write this, the UPS is recovering, and is now back up to 5 (Still >90% Entity update).

Having waited to see if the UPS recovery continues, it has; Entity update has dropped back to about 60ms, bringing the game nearly back to its previous UPS of 12-15. Fortunately only took ~30 minutes this time instead of days.

In the interest of being able to solve this if it happens again (and, dare I dream, bring my base back towards real time speed), is there any way to get an idea of what entities were pulling so much compute?

This is in vanilla, in the latest update.

Edit: Can post the file if needed, but as it's >270 mb, I figure I should wait until someone requests it before wasting Wube's bandwidth and storage.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14408
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Looking for help locating the cause of a ballooning Entity Update time

Post by Rseding91 »

Use the show-entity-time-usage debug option instead of show-time-usage.
If you want to get ahold of me I'm almost always on Discord.
fwyrl
Inserter
Inserter
Posts: 49
Joined: Fri Jul 01, 2016 10:54 pm
Contact:

Re: Looking for help locating the cause of a ballooning Entity Update time

Post by fwyrl »

Awesome, thank you! Don't know how I missed that the first few times I skimmed the debug options!

Although I see some improvements I can make to my nominal UPS (when it's running properly, <1/5th of my entity update is spent on turrets, and <1/5th on bots), I don't see anything even close to matching the inflated update time on the listed times; is there any way to see a time breakdown of items not on this shortlist?

I have a save from during this lag spike to keep testing; though it has since returned to nominal levels, like last time.

Edit: Nevermind, I spotted it while looking to make sure the screenshots were in order. Any idea why spidertrons would suddenly be using 300+ MS of entity time? What did I do wrong? :o
Attachments
Entity Frame Time Breakdown during nominal UPS
Entity Frame Time Breakdown during nominal UPS
frametimesnominal.png (290.7 KiB) Viewed 315 times
Entity Frame Time Breakdown during anomalous lag spike
Entity Frame Time Breakdown during anomalous lag spike
frametimes.png (275.84 KiB) Viewed 315 times
fwyrl
Inserter
Inserter
Posts: 49
Joined: Fri Jul 01, 2016 10:54 pm
Contact:

Re: Looking for help locating the cause of a ballooning Entity Update time

Post by fwyrl »

Some further testing shows that this is likely something to do with a large number of spidertrons making logistics requests all at once? Although it's not as bad this time, when I return my builder fleet (I think somewhere between 200 and 400 spiders) to my main base and they enter the logistics network, they start taking over 80 ms/tick, until the logistics network's dispatched robots for their logistics requests, at which point their extra lag decreases as tasks are marked as "on the way", proportionally to the number of tasks that are no longer pending a request.

Edit: Ok, I think I've located the issue. The nearest spot to my base is a solar panel field, so they've been entering the solar field at the same time as the logistics network. Unsure why the lag dies down over time, but I asked them to walk along the field, and my UPS is crying now. Oops. Going to say this is probably the same spidertron foot lag issue brought up in a recent FFF, shown at the basically worst case scenario.
Post Reply

Return to “Technical Help”