track down low fps on low gpu load as multiplayer client

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
snaep
Manual Inserter
Manual Inserter
Posts: 4
Joined: Thu May 03, 2018 3:59 pm
Contact:

track down low fps on low gpu load as multiplayer client

Post by snaep »

I've been playing a map with a friend for about a week.
a few days ago fps started to drop down for me to around 30 and down to 5 when moving around, yet the gpu was basically idle and the cpu not fully utilized.
After checking the faq I used the command to kill all enemies

Code: Select all

/c game.forces["enemy"].kill_all_units()
fps shortly went up to 60 afterwards but almost immideatly (1-3 seconds later) back down.

as the game is modded I suspect some mod doing funky stuff, but I'm unable to track down which one as the timings shown in debug mode seem kinda normal to me?
https://postimg.cc/gallery/g68cfcc6/
also.. is there a way to hide the UI (-buttons) so I'm able to properly read the first lines of debug output?

Changing various ingame options in the graphics tab to reduce gpu or cpu load had no significant effect on fps.

If I load the savegame as singleplayer game or host it myself it's fine for me and for all connected players.
If the savegame is hosted by my friend or a dedicated server (in my network or remote) I have low fps.
My friend has similar hardware to mine and the remote dedi has a weaker cpu.

What confuses me is that UPS continues to float around 59-60 but fps drops.

dedicated server log
https://pastebin.com/ddztUHyx
client log
https://pastebin.com/7bpALpUj
mod list
https://pastebin.com/dmxsyKc5

I don't know where to upload the savegame,
but I have the dedicated server hosting the game on version 16.41 under the name "tryandcatch".


What can I do to locate (or try to fix) the problem?

EDIT
uploaded mods and savegame to dropbox
mods
https://www.dropbox.com/s/oyi02ylhg0zb66w/mods.zip?dl=0
savegame
https://www.dropbox.com/s/zl17e7ba3w8ash3/main.zip?dl=0

ApocNL
Manual Inserter
Manual Inserter
Posts: 3
Joined: Tue May 08, 2018 2:28 pm
Contact:

Re: track down low fps on low gpu load as multiplayer client

Post by ApocNL »

Since a while now, friends have this same problem. Would love too hear that it is being looked into.

If more info is needed just give the word. (But its basicly the same as above post.)

Loewchen
Global Moderator
Global Moderator
Posts: 8284
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: track down low fps on low gpu load as multiplayer client

Post by Loewchen »

This is strange, UPS if fine so it is purely a graphics issue which I would not expect with the hardware and settings.
How is it if the save is started in SP?
How when started in SP without mods?
Do you have a GSync Monitor?

snaep
Manual Inserter
Manual Inserter
Posts: 4
Joined: Thu May 03, 2018 3:59 pm
Contact:

Re: track down low fps on low gpu load as multiplayer client

Post by snaep »

How is it if the save is started in SP?
Running the savegame in SP reduces the cpus max core load by ~30%.
The gpu load stays about the same but it's core clock is roughly doubled.
fps/ups is at 59.9
How when started in SP without mods?
Running the savegame in SP without mods reduces max cpu core load to ~20% while the gpu load doesn't change compared to SP with mods.
fps/ups is at 59.9
Do you have a GSync Monitor?
I don't have a GSync Monitor (or equivalent).
Toggling vsync on/off has no effect on fps or gpu/cpu load.

when I host the game locally, the cpu load is roughly the same (about ±3% max value) but the gpu clock is roughly doubled (same as SP with mods).
somehow fps/ups are at ~59 and players that join the locally hosted game do not observe any drops in fps/ups.
it seems fps only drop when I join a game as client.

Loewchen
Global Moderator
Global Moderator
Posts: 8284
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: track down low fps on low gpu load as multiplayer client

Post by Loewchen »

Is the multiplayer waiting icon constantly or almost constantly on when activated in the debug settings?

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: track down low fps on low gpu load as multiplayer client

Post by eradicator »

"FPS drops to single digit when joining a certain MP game" usually happens when your system is too slow to keep up with the host and the game subsequently skips rendering to try to catch up. Yet you say your CPU isn't fully utlized.

Does reducing the game speed have any effect on the situation at all?
/c game.speed = 0.85

snaep
Manual Inserter
Manual Inserter
Posts: 4
Joined: Thu May 03, 2018 3:59 pm
Contact:

Re: track down low fps on low gpu load as multiplayer client

Post by snaep »

Is the multiplayer waiting icon constantly or almost constantly on when activated in the debug settings?
the waiting icon does sometimes pop up but does not stay for long (less for a second, 8 times in ~5 minutes)
"FPS drops to single digit when joining a certain MP game" usually happens when your system is too slow to keep up with the host and the game subsequently skips rendering to try to catch up
thats what I thought at first, but the debug view lists time spent on Update below 16.6ms (1/60) so I figured my system is keeping up?
shouldn't it only skip frames if the time for an update exceeds that?

or is it required for time_to_update + time_to_render to be less or equal to 16.6ms?

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

Re: track down low fps on low gpu load as multiplayer client

Post by Zavian »

I suspect that factorio needs to do most of the rendering (at least enough to send the rendering instructions to the graphics driver/gpu) before it can start the update for the next tick. (If it tried to do both at once, there would be situations where sometimes something would be rendered just before it gets updated, then the next frame just after it gets updated, which could start to look jerky). Here the update is 15.98 ms, the render prep step is off the top of the screenshot, the Gui render prep step is 0.4ms, so I think the game probably is dropping frames because it is having trouble keeping up with the server. You could probably test that by dropping the speed down to 0.8. If the frame rate picks back up to match the up, then that would seem to confirm that hypothesis.

What is more surprising to me is that the CRC is 6 ms. That seems high to me.

snaep
Manual Inserter
Manual Inserter
Posts: 4
Joined: Thu May 03, 2018 3:59 pm
Contact:

Re: track down low fps on low gpu load as multiplayer client

Post by snaep »

totally forgot to test that. I used /c game.speed = 0.5 to see whats changing and the update increased to 20-21ms but fps matched ups at 30.0
so it seems it's just a problem that my computer can't keep up. FeelsBadMan
What is more surprising to me is that the CRC is 6 ms. That seems high to me.
if I set the gamespeed to .5 the update time for crc increased to 9.x ms
what values are to be expected for crc?

what is crc used for? (detecting desyncs?)
Is there a way to disable that feature or what can be done to reduce it's required time?

Jap2.0
Smart Inserter
Smart Inserter
Posts: 2339
Joined: Tue Jun 20, 2017 12:02 am
Contact:

Re: track down low fps on low gpu load as multiplayer client

Post by Jap2.0 »

snaep wrote:
What is more surprising to me is that the CRC is 6 ms. That seems high to me.
if I set the gamespeed to .5 the update time for crc increased to 9.x ms
what values are to be expected for crc?

what is crc used for? (detecting desyncs?)
Is there a way to disable that feature or what can be done to reduce it's required time?
Yes, it's used to find desyncs. It can't be disabled, but I've never seen it use anywhere near that much time.
There are 10 types of people: those who get this joke and those who don't.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: track down low fps on low gpu load as multiplayer client

Post by eradicator »

snaep wrote:totally forgot to test that. I used /c game.speed = 0.5 to see whats changing and the update increased to 20-21ms but fps matched ups at 30.0
What power profile have you set? The fact that the update time increases when you decrease the speed strongly suggests that your cpu is dynamically clocking down when there's less work to do. So you might have some minor improvements by adjusting your power profile to disallow dynamic clock speeds (i.e. "high performance" profile).

Btw on my largests map the CRC is still 0. You might want to have a look at your savegame.zip and check the size of script.dat, if it's very large then maybe a mod is storing too much data which might be a heavier burden on CRC than "vanilla" game data (pure speculation).

Post Reply

Return to “Technical Help”