[0.17.5] huge about 10 second lag every few minutes fps and ups drops to around 30 then goes back up

Bugs that we were not able to reproduce, and/or are waiting for more detailed info.
User avatar
TruePikachu
Filter Inserter
Filter Inserter
Posts: 978
Joined: Sat Apr 09, 2016 8:39 pm
Contact:

Re: [0.17.5] huge about 10 second lag every few minutes fps and ups drops to around 30 then goes back up

Post by TruePikachu »

NOTE: This is a coincidence, and likely unrelated to the original issue.

Ran a six minute trace to disk, before it decided it was "excessively long" and stopped. I did notice an interesting behaviour, though it might just be a side effect of my current configuration.
[attachment=1]normal_cycle.png[/attachment]
Here is a snapshot of the GPU's actual activity within Factorio under semi-normal circumstances (copy presentation model under dwm, 3 buffers in chain, max latency of 4, everything else defaults). Notably, this differs from what I would have expected from memory -- while DWM wakes up during vblank to render (yellow), Factorio (super early game, so very few entities in play) runs the main update loop, and queues up a render packet of its own (thin blue) followed by the present packet (red). A bit later, Factorio queues some other render packet (thick blue, flush-related???). This is all fine and dandy, but sometimes...
[attachment=0]music_load.PNG[/attachment]
Here, that larger render packet got delayed by a lot. What was the main loop doing? Waiting on the hard drive to load music. Why is music being loaded via the main thread instead of by a helper? I don't know, but this was a blocking call, resulting in delay. Actually, doesn't the music change "every few minutes"?

Can people who are getting this issue check what Factorio's "page fault delta" is around the time of severe issues? (This can be seen in the Task Manager, though the column isn't enabled by default). My current theory is that bigger bases, which require more RAM, might be using the page file to some degree; if the page file is on the same physical disk as Factorio's installation, that page file disk access will slow down the music-loading disk access and cause an even longer delay. Then, more-intensive graphics in larger bases can cause the "normal" less-than-60FPS graphics render packets to pile up as frames get computed but the GPU gets backlogged, resulting in a longer visual delay until load manages to return to normal.

EDIT: This isn't the full reason, since I just found a similar dropped-frame situation earlier in the trace, but without Factorio loading any data from disk. Further analysis might be required, it appears.

EDIT: Music appears to be a coincidence, and the long packet does appear to be the flush.
Attachments
music_load.PNG
music_load.PNG (38.95 KiB) Viewed 947 times
normal_cycle.png
normal_cycle.png (22.19 KiB) Viewed 947 times
Last edited by TruePikachu on Mon Mar 25, 2019 1:04 pm, edited 1 time in total.
posila
Factorio Staff
Factorio Staff
Posts: 5359
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [0.17.5] huge about 10 second lag every few minutes fps and ups drops to around 30 then goes back up

Post by posila »

I need to solve some other issues this week, but perhaps next week I will be able to dive into learning GPUView. Also I am quite not sure how to interpret those WPA graphs. Music is loaded and played in the background thread,
User avatar
TruePikachu
Filter Inserter
Filter Inserter
Posts: 978
Joined: Sat Apr 09, 2016 8:39 pm
Contact:

Re: [0.17.5] huge about 10 second lag every few minutes fps and ups drops to around 30 then goes back up

Post by TruePikachu »

I thought I had deleted that message, honestly. I had since determined that it's likely an unrelated issue with 100% CPU load and process scheduling.
Post Reply

Return to “Pending”