Page 1 of 1

[posila] [0.17.79/0.18.19] Microstutter at random intervals

Posted: Thu Dec 26, 2019 3:06 pm
by MrBurd
Edit: still appears to be a thing in 0.18.19.
Description:
Singleplayer game experiences a stutter at random intervals. This is very noticeable and hinders gameplay. The stutter episodes last about 10 to 40 seconds. Walking around is no longer smooth and instead stutters as if the game is running on a slow connection in multiplayer(say, 200 ms latency).
This also happens in new saves without any factory buildings, and in older, larger saved games.
The FPS/UPS counter is usually stable around 60.0/60.0. During the stutter episodes, these numbers frequently jump back and forth between 59.9 and 60.1.

When does this occur?
Walking around in my base during regular gameplay. I don't explore any new chunks, nor do I have any active radars. This stutter occurs during just plain walking around, having machine GUIs or inventory open does not seem to make a difference.
What I've tried so far:
- Change various graphics settings, such as:
-- Wait for VSync
-- Show smoke / clouds / decoratives / shadows
-- Texture streaming
-- Use flip presentation model
- Reinstalled the game
- Different savegames.

None of these settings had any effect.

Game is unmodded; no mods active, runs vanilla.
Reproducing:
I have not found a way to reproduce this bug on demand. From testing with a stopwatch it seems to occur first about 4 minutes into the game (04:05), lasting about 30 seconds (until 4:35).
It disappears as quickly as it appears; after 30 seconds, lag is gone. The next stutter happened at 9:33, until about 10:10.
Hardware information:
CPU: AMD Ryzen 7 3700X, 16 cores / 8 physical, @ 3.5 - 4.2 GHz
GPU: MSI RTX 2080 (8GB VRAM) @ 3840 x 2160 resolution (4K), fullscreen
RAM: 32GB DDR4 @ 3200 MHz
Game drive: 1TB SSD (Samsung 860 EVO)

Temperatures are stable below 70°C for CPU and GPU, below 45°C for SSD and RAM.
Debug information:
Screenshot taken while no stutter is being experienced:
Image

While stutter is being experienced:
Image
Log files:
The factorio-current.log is in the attachments and can be seen in the code box below.
I have also attached a performance log CSV file recorded while experiencing the stuttering issue, as well as my saved game.

Savegame:
download/file.php?mode=view&id=55724

Log file:
download/file.php?mode=view&id=55725

Performance log file:
download/file.php?mode=view&id=55726
factorio-current.log:

Code: Select all

   0.000 2019-12-26 15:13:16; Factorio 0.17.79 (build 47865, win64, steam)
   0.000 Operating system: Windows 10 (version 1903) 
   0.001 Program arguments: "D:\SteamLibrary\steamapps\common\Factorio\bin\x64\Factorio.exe" 
   0.001 Read data path: D:/SteamLibrary/steamapps/common/Factorio/data
   0.001 Write data path: C:/Users/username/AppData/Roaming/Factorio [388028/953223MB]
   0.001 Binaries path: D:/SteamLibrary/steamapps/common/Factorio/bin
   0.016 System info: [CPU: AMD Ryzen 7 3700X 8-Core Processor, 16 cores, RAM: 8387/32717 MB, page: 12023/37581 MB, virtual: 4330/134217727 MB, extended virtual: 0 MB]
   0.016 Display options: [FullScreen: 1] [VSync: 1] [UIScale: automatic (100.0%)] [Native DPI: 1] [Screen: 255] [Special: lmw] [Lang: en]
   0.024 Available displays: 2
   0.024  [1]: \\.\DISPLAY2 - NVIDIA GeForce RTX 2080 {0x05, [0,0], 3840x2160, 32bit, 60Hz}
   0.024  [0]: \\.\DISPLAY1 - NVIDIA GeForce RTX 2080 {0x01, [-1920,367], 1920x1080, 32bit, 60Hz}
   0.063 [Direct3D11] Display: 0, Output: 0, DisplayAdapter: 0, RenderingAdapter: 0; d3dcompiler_47.dll
   0.135 Initialised Direct3D[0]: NVIDIA GeForce RTX 2080; id: 10de-1e87; driver: nvldumdx.dll 26.21.14.3602
   0.135   D3D Feature Level: 11.1, DXGI 1.5+, SwapChain: 3,flip-discard,-,-,-,none
   0.135   [Local Video Memory] Budget: 6808MB, CurrentUsage: 2MB, Reservation: 0/3604MB
   0.135   [Non-Local Vid.Mem.] Budget: 14722MB, CurrentUsage: 0MB, Reservation: 0/7770MB
   0.135   Tiled resources: Tier 2
   0.135   Unified Memory Architecture: No
   0.135   BGR 565 Supported: Yes
   0.135   MaximumFrameLatency: 3, GPUThreadPriority: 0
   0.135 Graphics settings preset: very-high
   0.135   Dedicated video memory size 8010 MB
   0.159 Desktop composition is active.
   0.159 Graphics options: [Graphics quality: high] [Video memory usage: all] [Light scale: 100%] [DXT: high-quality] [Color: 32bit]
   0.159                   [Max threads (load/render): 32/16] [Max texture size: 0] [Tex.Stream.: 0] [Rotation quality: normal] [Other: STDC]
   0.175 DSound: Starting _dsound_update thread
   0.175 DSound: Enter _dsound_update; tid=16784
   0.387 Loading mod core 0.0.0 (data.lua)
   0.470 Loading mod base 0.17.79 (data.lua)
   0.665 Loading mod base 0.17.79 (data-updates.lua)
   0.780 Checksum for core: 2035938594
   0.780 Checksum of base: 4156627525
   0.939 Prototype list checksum: 2767119397
   0.979 Loading sounds...
   1.010 Info PlayerData.cpp:70: Local player-data.json unavailable
   1.010 Info PlayerData.cpp:73: Cloud player-data.json available, timestamp 1577369578
   1.081 Crop bitmaps.
   1.534 Parallel Sprite Loader initialized (threads: 15)
   5.953 Initial atlas bitmap size is 16384
   5.989 Created atlas bitmap 16384x16380 [none]
   5.993 Created atlas bitmap 16384x11648 [none]
   5.993 Created atlas bitmap 8192x3872 [decal]
   5.994 Created atlas bitmap 16384x4896 [low-object, linear-minification]
   5.995 Created atlas bitmap 8192x3744 [mipmap, linear-minification, linear-magnification, linear-mip-level]
   5.995 Created atlas bitmap 16384x7168 [terrain, mipmap, linear-minification, linear-mip-level]
   5.996 Created atlas bitmap 4096x1600 [smoke, mipmap, linear-minification, linear-magnification]
   5.996 Created atlas bitmap 4096x1760 [icon, not-compressed, mipmap, linear-minification, linear-magnification, linear-mip-level]
   5.996 Created atlas bitmap 2048x192 [icon-background, not-compressed, mipmap, linear-minification, linear-magnification, linear-mip-level, ]
   5.996 Created atlas bitmap 8192x1632 [alpha-mask]
   5.999 Created atlas bitmap 16384x13332 [shadow, linear-magnification, alpha-mask]
   5.999 Created atlas bitmap 8192x2352 [shadow, mipmap, linear-magnification, alpha-mask]
   6.004 Texture processor created (2048). GPU accelerated compression Supported: yes, Enabled: yes/yes. Test passed. YCoCgDXT PSNR: 35.83, BC3 PSNR: 33.82
   6.475 Parallel Sprite Loader initialized (threads: 15)
  12.907 Sprites loaded
  12.920 Generated mipmaps (4) for atlas [3] of size 16384x4896   
  12.931 Generated mipmaps (3) for atlas [4] of size 8192x3744   
  12.943 Generated mipmaps (3) for atlas [5] of size 16384x7168   
  12.954 Generated mipmaps (3) for atlas [6] of size 4096x1600   
  12.965 Generated mipmaps (5) for atlas [7] of size 4096x1760   
  12.977 Generated mipmaps (3) for atlas [11] of size 8192x2352   
  12.977 Custom mipmaps uploaded.
  13.028 Factorio initialised
  27.155 Loading map C:\Users\username\AppData\Roaming\Factorio\saves\_autosavesdafasdff.zip: 4060678 bytes.
  27.211 Loading level.dat: 9050270 bytes.
  27.214 Info Scenario.cpp:187: Map version 0.17.79-0
  27.365 Loading script.dat: 328 bytes.
  27.368 Checksum for script C:/Users/username/AppData/Roaming/Factorio/temp/currently-playing/control.lua: 3265260072
 267.189 Info AppManager.cpp:287: Saving to _autosave1 (blocking).
 267.447 Info AppManagerStates.cpp:1802: Saving finished
 567.440 Info AppManager.cpp:287: Saving to _autosave2 (blocking).
 567.683 Info AppManagerStates.cpp:1802: Saving finished
 678.601 Info HttpSharedState.cpp:54: Downloading https://mods.factorio.com/api/mods?page_size=max&full=True&namelist=A%20Sea%20Block%20Config&namelist=aai-industry&namelist=aai-signal-transmission&namelist=alien-biomes&namelist=alien-biomes-hr-terrain&namelist=angelsaddons-warehouses&namelist=angelsbioprocessing&namelist=angelspetrochem&namelist=angelsrefining&namelist=angelssmelting&namelist=AsphaltRoads&namelist=AtomicArtillery&namelist=AutoDeconstruct&namelist=bobassembly&namelist=bobelectronics&namelist=bobenemies&namelist=bobequipment&namelist=bobinserters&namelist=boblibrary&namelist=boblogistics&namelist=bobmining&namelist=bobmodules&namelist=bobplates&namelist=bobpower&namelist=bobrevamp&namelist=bobtech&namelist=bobwarfare&namelist=bullet-trails&namelist=CircuitProcessing&namelist=DeadlockLargerLamp&namelist=Dectorio&namelist=Enhanced_Map_Colors&namelist=Explosive%20Excavation&namelist=FNEI&namelist=grappling-gun&namelist=IndustrialRevolution&namelist=KS_Power&namelist=LandfillPainting&namelist=Nanobots&namelist=Nuclear%20Fuel&namelist=PavementDriveAssist&namelist=quick-start&namelist=robot_attrition&namelist=scattergun_turret&namelist=ScienceCostTweakerM&namelist=SeaBlock&namelist=SeaBlockMetaPack&namelist=space-exploration&namelist=space-exploration-graphics&namelist=space-exploration-hr-graphics&namelist=space-exploration-postprocess&namelist=SpaceMod&namelist=stdlib&namelist=Todo-List&version=0.17.79&lang=en
 684.534 Info HttpSharedState.cpp:54: Downloading https://mods.factorio.com/api/mods?page_size=max&full=True&namelist=A%20Sea%20Block%20Config&namelist=aai-industry&namelist=aai-signal-transmission&namelist=alien-biomes&namelist=alien-biomes-hr-terrain&namelist=angelsaddons-warehouses&namelist=angelsbioprocessing&namelist=angelspetrochem&namelist=angelsrefining&namelist=angelssmelting&namelist=AsphaltRoads&namelist=AtomicArtillery&namelist=AutoDeconstruct&namelist=bobassembly&namelist=bobelectronics&namelist=bobenemies&namelist=bobequipment&namelist=bobinserters&namelist=boblibrary&namelist=boblogistics&namelist=bobmining&namelist=bobmodules&namelist=bobplates&namelist=bobpower&namelist=bobrevamp&namelist=bobtech&namelist=bobwarfare&namelist=bullet-trails&namelist=CircuitProcessing&namelist=DeadlockLargerLamp&namelist=Dectorio&namelist=Enhanced_Map_Colors&namelist=Explosive%20Excavation&namelist=FNEI&namelist=grappling-gun&namelist=IndustrialRevolution&namelist=KS_Power&namelist=LandfillPainting&namelist=Nanobots&namelist=Nuclear%20Fuel&namelist=PavementDriveAssist&namelist=quick-start&namelist=robot_attrition&namelist=scattergun_turret&namelist=ScienceCostTweakerM&namelist=SeaBlock&namelist=SeaBlockMetaPack&namelist=space-exploration&namelist=space-exploration-graphics&namelist=space-exploration-hr-graphics&namelist=space-exploration-postprocess&namelist=SpaceMod&namelist=stdlib&namelist=Todo-List&version=0.17.79&lang=en
 707.831 Info HttpSharedState.cpp:54: Downloading https://mods.factorio.com/api/categories?version=0.17.79&lang=en
 707.831 Info HttpSharedState.cpp:54: Downloading https://mods.factorio.com/api/mods?page_size=max&version=0.17&lang=en
 751.881 Loading level.dat: 1031023 bytes.
 751.882 Info Scenario.cpp:187: Map version 0.17.79-0
 751.905 Checksum for script C:/Users/username/AppData/Roaming/Factorio/temp/currently-playing/control.lua: 3265260072
1046.590 Info AppManagerStates.cpp:1802: Saving finished
1049.572 Quitting: user-quit.
1049.643 DSound: Stopping voice
1049.643 DSound: Joining thread
1049.647 DSound: Exit _dsound_update; tid=16784
1049.647 DSound: Waiting for voice to stop ... signaled
1049.648 DSound: Joined thread
1049.648 DSound: Destroying thread
1049.648 DSound: Thread destroyed
1049.648 DSound: Releasing buffer
1049.648 DSound: Voice stopped
1049.648 DSound: Deallocating voice
1049.648 DSound: Deallocated voice
1049.707 Steam API shutdown.
1049.710 Goodbye

Re: [0.17.79] Microstutter at random intervals

Posted: Thu Dec 26, 2019 6:35 pm
by TruePikachu
Attachments are not attached.

Re: [0.17.79] Microstutter at random intervals

Posted: Thu Dec 26, 2019 8:09 pm
by MrBurd

Re: [0.17.79] Microstutter at random intervals

Posted: Thu Dec 26, 2019 8:32 pm
by Honktown
Looking at the NVidia forums, a lot of people have reported stuttering on the 2080 cards and Windows 10. Suggestions are that it's a conflict with Windows 10 and the card switching into power saving. I don't know how Windows 10 does power saving, but there may be NVidia options to prevent power saving for a specific application, or you could try getting an overclock tool (MSI Afterburner), setting an overclock to the normal clocks (probably just click a checkbox and leave it), and always run those clocks while the game is running.

Re: [0.17.79] Microstutter at random intervals

Posted: Fri Dec 27, 2019 8:15 pm
by MrBurd
Looking at the NVidia forums, a lot of people have reported stuttering on the 2080 cards and Windows 10. Suggestions are that it's a conflict with Windows 10 and the card switching into power saving. I don't know how Windows 10 does power saving, but there may be NVidia options to prevent power saving for a specific application, or you could try getting an overclock tool (MSI Afterburner), setting an overclock to the normal clocks (probably just click a checkbox and leave it), and always run those clocks while the game is running.
Considering it's only an issue in Factorio and in none of the other games I play I wouldn't say it's a card issue. All other things I use this computer for (demanding games, rendering) are issue-free. I've also checked in HWMonitor during gameplay; the card does not seem to be hitting any power or utilization limits.

Also, I've looked into the 'lots of people report stuttering on the 2080 cards' but couldn't really find anything. Could you link to the sources you referred to?

Re: [0.17.79] Microstutter at random intervals

Posted: Fri Dec 27, 2019 11:14 pm
by Honktown
MrBurd wrote:
Fri Dec 27, 2019 8:15 pm
Also, I've looked into the 'lots of people report stuttering on the 2080 cards' but couldn't really find anything. Could you link to the sources you referred to?
https://www.google.com/search?q=2080+stutter
stuff

If it's not stuttering in other games, I can see why you'd come to Factorio being at fault. Have you tried running in OpenGL mode?

Edit: I'm not trying to say you have a bad GPU, but it's not like one can change their cpu settings or ram as easily : P

Re: [0.17.79] Microstutter at random intervals

Posted: Fri Dec 27, 2019 11:28 pm
by Loewchen
Try non fullscreen.
Try disabling g-sync in general or only for factorio through the nvidia control panel.

Re: [0.17.79] Microstutter at random intervals

Posted: Sat Dec 28, 2019 11:22 am
by MrBurd
Non-fullscreen and various settings for VSync inside factorio and in Nvidia Control Panel did not have any effect; the issue persists.

Edit: I have also experimented with the autosave time setting; saving every minute or every 10 minutes. Issue still occurs about once every 4 minutes regardless of autosaves.

Re: [0.17.79] Microstutter at random intervals

Posted: Thu Jan 02, 2020 11:14 pm
by MrBurd
Update: I have tried changing different NVidia settings, disabled Chrome's Software Reporter and various other services that seemed to have periodic high resource usage. Still stuttering, and only in Factorio.

I've recorded another performance log, and this time, graphed some of the values. I'm not sure on what time scale the log is performed (seems like about a second) or what any of the values actually mean, but I've noticed some odd behavior. See the attachment for reference. The X axis is the number of log lines from 1 to 995 (assuming the unit is milliseconds)

For one, the gpu-frame graph seems to start diverging into alternating low-high spikes right when the stutter starts; this diminishes when the stutter ends.
This is the same for the sync-interval graph; these are generally around 160, but once the stuttering starts, suddenly about half of the values are a lot higher(~330) than the other half of the values(0).
As far as I've checked the other recorded data in the CSV is stable and doesn't suddenly peak like the mentioned graphs.

Considering there is no information available on the capture-perf-stats tool in the F4 menu, could a Factorio dev perhaps explain what these values mean and if I'm interpreting them correctly?

Image

Re: [0.17.79] Microstutter at random intervals

Posted: Fri Jan 03, 2020 12:55 am
by TruePikachu
TruePikachu wrote:
Thu Dec 26, 2019 6:35 pm
Attachments are not attached.

Re: [0.17.79] Microstutter at random intervals

Posted: Fri Jan 03, 2020 2:03 am
by MrBurd
Right, when I checked right after posting it was. Not sure what's up with this forum or what I'm doing wrong.

Re: [0.17.79] Microstutter at random intervals

Posted: Fri Jan 03, 2020 5:46 am
by invisus
MrBurd wrote:
Fri Jan 03, 2020 2:03 am
Right, when I checked right after posting it was. Not sure what's up with this forum or what I'm doing wrong.
For what it's worth, "s.put.re" is being blocked by my pihole. It's possible this (or similar) is the issue for others as well.

"https://s.put.re/UjkWdjG9.png"

Re: [0.17.79] Microstutter at random intervals

Posted: Fri Jan 03, 2020 10:28 am
by MrBurd
Nope, used attachment feature originally.

Image

Re: [posila] [0.17.79] Microstutter at random intervals

Posted: Sun Apr 19, 2020 7:43 pm
by MrBurd
I'd like to add that this still occurs in 0.18.18.

Re: [posila] [0.17.79/0.18.19] Microstutter at random intervals

Posted: Sat May 09, 2020 11:02 pm
by Dupl3xxx
Strange. It might be that the game runs so easily on your GPU that it can slip into a lower power mode. To test, monitor your GPU memory and core clocks before, during and after a stutter. MSI Afterburner can do this really well, and you can set the graph to show whatever values and at whatever frequency you want. You don't need any MSI hardware to use that software.

If this turns out to be the issue, or to confirm a second way, try running some other 3D game in the background

Re: [posila] [0.17.79/0.18.19] Microstutter at random intervals

Posted: Wed May 20, 2020 8:43 pm
by MrBurd
Update: For some reason the issue resolved itself a week ago. I have not changed my configuration or game version.
I've not noticed the issue since.

I think this can now be marked as resolved?

Re: [posila] [0.17.79/0.18.19] Microstutter at random intervals

Posted: Wed Jun 03, 2020 5:24 pm
by posila
MrBurd wrote:
Wed May 20, 2020 8:43 pm
Update: For some reason the issue resolved itself a week ago. I have not changed my configuration or game version.
I've not noticed the issue since.
Thank you for letting us know, and I appologize for not being able to help you with this.