Page 1 of 1

"Pre-Prepare" on time usage metrics taking up UPS

Posted: Mon Aug 04, 2025 10:41 pm
by Girisado
Image
Shown on the image above, the "Pre-prepare" metric will sometimes take up to 190 ish ms to process, lowering the game's UPS intermittently to ~48.
I tried looking at the performance metric using task manager and nothing seems to be overutilized, with the overall average utilization by all processes being:
  • CPU - 10~15%
  • RAM - approx. 15GB/32GB
  • GPU - 20~30%
There are no visible spikes or anything on the performance metrics when the UPS drop happens, and when I tried to look at the wiki to see if the "Pre-Prepare" metric was accounted for anything, I couldn't find much about it.

Only other programs open(at least the ones that I can account for) is chrome.

This is my first time posting, and I don't know if this is enough information to go off of, so if anybody needs anything else, please let me know.

Re: "Pre-Prepare" on time usage metrics taking up UPS

Posted: Tue Aug 05, 2025 12:04 am
by Rseding91
Can you post the log file?

Re: "Pre-Prepare" on time usage metrics taking up UPS

Posted: Tue Aug 05, 2025 12:29 am
by Girisado
Hello, I believe this is the log, this is the factorio-current.log file.
I couldn't figure out how to post a .txt file, so I copied everything. If there's a better way, please let me know.

0.000 2025-08-04 16:08:18; Factorio 2.0.60 (build 83512, win64, steam, space-age)
0.000 Operating system: Windows 11 (build 22631)
0.000 Initializing Steam API.
0.000 Program arguments: "G:\SteamLibrary\steamapps\common\Factorio\bin\x64\Factorio.exe"
0.000 Config path: C:/Users/tresd/AppData/Roaming/Factorio/config/config.ini
0.001 Read data path: G:/SteamLibrary/steamapps/common/Factorio/data
0.001 Write data path: C:/Users/tresd/AppData/Roaming/Factorio [126026/953125MB]
0.001 Binaries path: G:/SteamLibrary/steamapps/common/Factorio/bin
0.034 System info: [CPU: 12th Gen Intel(R) Core(TM) i5-12600K, 16 cores, RAM: 9366/32509 MB, page: 15575/37373 MB, virtual: 4363/134217727 MB, extended virtual: 0 MB]
0.053 Memory info:
0.053 [0]: G Skill Intl F5-6000J3636F16G 16384 MB 6000 MHz 1.1 v 64|64
0.053 [1]: G Skill Intl F5-6000J3636F16G 16384 MB 6000 MHz 1.1 v 64|64
0.089 Display options: [FullScreen: true] [VSync: true] [UIScale: automatic (100.0%)] [Native DPI: true] [Screen: 255] [Special: lmw] [Lang: en]
0.211 Video driver: windows
0.211 Available displays: 2
0.211 [2]: \\.\DISPLAY3 - NVIDIA GeForce RTX 3070 {0x05, [0,0], 2560x1440, 32bit, 165Hz}
0.211 [0]: \\.\DISPLAY1 - NVIDIA GeForce RTX 3070 {0x8000001, [2560,0], 2560x1440, 32bit, 60Hz}
0.257 [Direct3D11] Display: 0, Output: 0, DisplayAdapter: 0, RenderingAdapter: -1; d3dcompiler_47.dll
0.475 Initialised Direct3D[0]: NVIDIA GeForce RTX 3070; id: 10de-2488; driver: nvldumdx.dll 32.0.15.7628
0.475 D3D Feature Level: 11.1, DXGI 1.5+, SwapChain: 3,flip-discard,-,-,-,none
0.475 [Local Video Memory] Budget: 7250MB, CurrentUsage: 6MB, Reservation: 0/3753MB
0.475 [Non-Local Vid.Mem.] Budget: 15486MB, CurrentUsage: 0MB, Reservation: 0/7871MB
0.475 Tiled resources: Tier 2
0.475 Unified Memory Architecture: No
0.475 BGR 565 Supported: Yes
0.475 MaximumFrameLatency: 3, GPUThreadPriority: 0
0.476 Graphics settings preset: very-high
0.476 Dedicated video memory size 8018 MB
0.574 Desktop composition is active.
0.574 Graphics options: [Graphics quality: high] [Video memory usage: all] [DXT: high-quality]
0.574 [Max threads (load/render): 32/16] [Max texture size: 0] [Tex.Stream.: false] [Rotation quality: normal] [Other: STDCWTl] [B:0,C:0,S:100]
0.612 [Audio] Driver:wasapi, Device:Default device, Depth:16, Frequency:44100, Channels:2, Interpolation:linear
0.991 Info ModManager.cpp:444: FeatureFlag expansion-shaders = true
0.991 Info ModManager.cpp:444: FeatureFlag freezing = true
0.991 Info ModManager.cpp:444: FeatureFlag quality = true
0.991 Info ModManager.cpp:444: FeatureFlag rail-bridges = true
0.991 Info ModManager.cpp:444: FeatureFlag segmented-units = true
0.991 Info ModManager.cpp:444: FeatureFlag space-travel = true
0.991 Info ModManager.cpp:444: FeatureFlag spoiling = true
1.020 Loading mod core 0.0.0 (data.lua)
1.216 Loading mod base 2.0.60 (data.lua)
3.820 Loading mod elevated-rails 2.0.60 (data.lua)
4.144 Loading mod quality 2.0.60 (data.lua)
4.392 Loading mod space-age 2.0.60 (data.lua)
10.447 Loading mod base 2.0.60 (data-updates.lua)
10.468 Loading mod quality 2.0.60 (data-updates.lua)
10.502 Loading mod space-age 2.0.60 (data-updates.lua)
10.632 Checksum for core: 4171658704
10.632 Checksum of base: 1534080171
10.632 Checksum of elevated-rails: 3379156108
10.632 Checksum of quality: 3594706471
10.632 Checksum of space-age: 1185576405
11.037 Prototype list checksum: 790204923
11.078 Loading sounds...
24.640 Info PlayerData.cpp:66: Local player-data.json unavailable
24.640 Info PlayerData.cpp:69: Cloud player-data.json available, timestamp 1754341601
24.681 Post-data load graphics options: [Light occlusion: YES]
25.073 Initial atlas bitmap size is 16384
25.084 Created an atlas bitmap (size 16384x16364) [none]
25.099 Created an atlas bitmap (size 16384x16384) [none]
25.121 Created an atlas bitmap (size 16384x16372) [none]
25.122 Created an atlas bitmap (size 16384x15084) [none]
25.128 Created an atlas bitmap (size 16384x16384) [low-object]
25.128 Created an atlas bitmap (size 4096x2496) [low-object]
25.129 Created an atlas bitmap (size 16384x14140) [corpse-decay]
25.129 Created an atlas bitmap (size 16384x9268) [decal]
25.129 Created an atlas bitmap (size 16384x5596) [none]
25.130 Created an atlas bitmap (size 1676x79) [not-compressed]
25.130 Created an atlas bitmap (size 16384x4240) [mipmap, linear-minification, linear-magnification, linear-mip-level]
25.130 Created an atlas bitmap (size 4096x3040) [smoke, mipmap, linear-minification, linear-magnification]
25.135 Created an atlas bitmap (size 16384x16352) [terrain, mipmap, linear-minification, linear-mip-level]
25.135 Created an atlas bitmap (size 16384x4944) [terrain, mipmap, linear-minification, linear-mip-level]
25.135 Created an atlas bitmap (size 8192x5728) [terrain-effect-map, mipmap, linear-minification, linear-mip-level]
25.135 Created an atlas bitmap (size 8192x2608) [mipmap]
25.135 Created an atlas bitmap (size 3504x768) [mipmap]
25.135 Created an atlas bitmap (size 4096x3152) [mipmap]
25.135 Created an atlas bitmap (size 4096x3152) [mipmap]
25.136 Created an atlas bitmap (size 4096x3152) [mipmap]
25.136 Created an atlas bitmap (size 8192x3888) [icon, not-compressed, mipmap, linear-minification, linear-magnification, linear-mip-level]
25.137 Created an atlas bitmap (size 16384x6120) [alpha-mask]
25.160 Created an atlas bitmap (size 16384x16384) [shadow, linear-magnification, alpha-mask]
25.163 Created an atlas bitmap (size 16384x16376) [shadow, linear-magnification, alpha-mask]
25.164 Created an atlas bitmap (size 16384x3856) [shadow, linear-magnification, alpha-mask]
25.164 Created an atlas bitmap (size 8192x4000) [shadow, mipmap, linear-magnification, alpha-mask]
25.164 Created an atlas bitmap (size 4096x336) [icon-background, not-compressed, mipmap, linear-minification, linear-magnification, linear-mip-level, ]
25.164 Loading 3D bitmaps.
25.286 Texture processor created (4096). GPU accelerated compression Supported: yes, Enabled: yes/yes. Test passed. YCoCgDXT PSNR: 35.83, BC3 PSNR: 33.82
25.330 Parallel sprite loader initialized (threads: 15, bitmaps: 8395)
40.997 Sprites loaded
41.018 Generated mipmaps (4) for atlas [4] of size 16384x16384
41.029 Generated mipmaps (4) for atlas [5] of size 4096x2496
41.040 Generated mipmaps (3) for atlas [10] of size 16384x4240
41.051 Generated mipmaps (3) for atlas [11] of size 4096x3040
41.062 Generated mipmaps (3) for atlas [12] of size 16384x16352
41.073 Generated mipmaps (3) for atlas [13] of size 16384x4944
41.083 Generated mipmaps (3) for atlas [14] of size 8192x5728
41.131 Generated mipmaps (3) for atlas [15] of size 8192x2608
41.142 Generated mipmaps (3) for atlas [16] of size 3504x768
41.153 Generated mipmaps (3) for atlas [17] of size 4096x3152
41.180 Generated mipmaps (3) for atlas [18] of size 4096x3152
41.191 Generated mipmaps (3) for atlas [19] of size 4096x3152
41.202 Generated mipmaps (5) for atlas [20] of size 8192x3888
41.212 Generated mipmaps (3) for atlas [25] of size 8192x4000
41.232 Custom mipmaps uploaded (3490)
41.248 Video memory usage: 3608.08 MB (Atlases: 3477.78 MB, Textures: 130.30 MB)
41.632 Factorio initialised
41.634 Steam Storage Quota: 22684/23841
44.589 Loading map C:\Users\tresd\AppData\Roaming\Factorio\saves\3-30.zip: 44157256 bytes.
44.640 Loading level.dat: 127481845 bytes.
44.640 Info Scenario.cpp:153: Map version 2.0.60-0
46.062 Loading blueprint storage: Local timestamp 1754169825, Cloud timestamp 1754169823
46.093 Loading script.dat: 1222 bytes.
46.096 Checksum for script __level__/control.lua: 356394540
66.591 Info AppManager.cpp:323: Saving to _autosave1 (blocking).
67.114 Info AppManagerStates.cpp:2110: Saving finished
314.549 Info AppManagerStates.cpp:2110: Saving finished
358.179 Info AppManagerStates.cpp:1433: Deleting active scenario.
358.460 Loading map C:\Users\tresd\AppData\Roaming\Factorio\saves\3-30.zip: 44625603 bytes.
358.492 Loading level.dat: 128596756 bytes.
358.492 Info Scenario.cpp:153: Map version 2.0.60-0
359.965 Loading blueprint storage: Local timestamp 1754169825, Cloud timestamp 1754169823
359.997 Loading script.dat: 1222 bytes.
360.000 Checksum for script __level__/control.lua: 356394540
414.491 Info AppManager.cpp:323: Saving to _autosave2 (blocking).
415.039 Info AppManagerStates.cpp:2110: Saving finished
578.816 Info AppManagerStates.cpp:2110: Saving finished
617.233 Info AppManagerStates.cpp:1433: Deleting active scenario.
617.523 Loading map C:\Users\tresd\AppData\Roaming\Factorio\saves\3-30.zip: 45035793 bytes.
617.568 Loading level.dat: 129300006 bytes.
617.568 Info Scenario.cpp:153: Map version 2.0.60-0
619.057 Loading blueprint storage: Local timestamp 1754169825, Cloud timestamp 1754169823
619.088 Loading script.dat: 1222 bytes.
619.123 Checksum for script __level__/control.lua: 356394540
759.059 Info AppManager.cpp:323: Saving to _autosave3 (blocking).
759.627 Info AppManagerStates.cpp:2110: Saving finished
884.949 Info AppManagerStates.cpp:2110: Saving finished
911.639 Info AppManagerStates.cpp:2110: Saving finished
923.445 Info AppManagerStates.cpp:2110: Saving finished
961.462 Info AppManagerStates.cpp:1433: Deleting active scenario.
961.796 Loading map C:\Users\tresd\AppData\Roaming\Factorio\saves\3-30.zip: 45656891 bytes.
961.827 Loading level.dat: 130825586 bytes.
961.827 Info Scenario.cpp:153: Map version 2.0.60-0
963.310 Loading blueprint storage: Local timestamp 1754169825, Cloud timestamp 1754169823
963.340 Loading script.dat: 1222 bytes.
963.344 Checksum for script __level__/control.lua: 356394540
1107.459 Info AppManager.cpp:323: Saving to _autosave1 (blocking).
1108.016 Info AppManagerStates.cpp:2110: Saving finished
1180.541 Info AppManagerStates.cpp:2110: Saving finished
1242.068 Info AppManagerStates.cpp:1433: Deleting active scenario.
1242.407 Loading map C:\Users\tresd\AppData\Roaming\Factorio\saves\3-30.zip: 45982489 bytes.
1242.440 Loading level.dat: 131712761 bytes.
1242.440 Info Scenario.cpp:153: Map version 2.0.60-0
1244.003 Loading blueprint storage: Local timestamp 1754169825, Cloud timestamp 1754169823
1244.034 Loading script.dat: 1222 bytes.
1244.037 Checksum for script __level__/control.lua: 356394540
1313.280 Info AppManagerStates.cpp:1433: Deleting active scenario.
1313.607 Loading map C:\Users\tresd\AppData\Roaming\Factorio\saves\_autosave1.zip: 46037114 bytes.
1313.640 Loading level.dat: 131455856 bytes.
1313.640 Info Scenario.cpp:153: Map version 2.0.60-0
1315.181 Loading blueprint storage: Local timestamp 1754169825, Cloud timestamp 1754169823
1315.213 Loading script.dat: 1222 bytes.
1315.216 Checksum for script __level__/control.lua: 356394540
1321.006 Info AppManagerStates.cpp:1433: Deleting active scenario.
1321.319 Loading map C:\Users\tresd\AppData\Roaming\Factorio\saves\_autosave3.zip: 45226060 bytes.
1321.351 Loading level.dat: 129589201 bytes.
1321.351 Info Scenario.cpp:153: Map version 2.0.60-0
1322.871 Loading blueprint storage: Local timestamp 1754169825, Cloud timestamp 1754169823
1322.904 Loading script.dat: 1222 bytes.
1322.906 Checksum for script __level__/control.lua: 356394540
1679.408 Info AppManager.cpp:323: Saving to _autosave1 (blocking).
1679.973 Info AppManagerStates.cpp:2110: Saving finished
1982.942 Info AppManager.cpp:323: Saving to _autosave2 (blocking).
1983.501 Info AppManagerStates.cpp:2110: Saving finished
2317.691 Info AppManager.cpp:323: Saving to _autosave3 (blocking).
2318.255 Info AppManagerStates.cpp:2110: Saving finished
2618.242 Info AppManager.cpp:323: Saving to _autosave1 (blocking).
2618.787 Info AppManagerStates.cpp:2110: Saving finished
2918.775 Info AppManager.cpp:323: Saving to _autosave2 (blocking).
2919.307 Info BlueprintShelf.cpp:723: Saving blueprint storage.
2919.327 Saved blueprint storage to cloud
2919.358 Info AppManagerStates.cpp:2110: Saving finished
3219.359 Info AppManager.cpp:323: Saving to _autosave3 (blocking).
3219.902 Info BlueprintShelf.cpp:723: Saving blueprint storage.
3219.921 Saved blueprint storage to cloud
3219.952 Info AppManagerStates.cpp:2110: Saving finished
3521.610 Info AppManager.cpp:323: Saving to _autosave1 (blocking).
3522.175 Info AppManagerStates.cpp:2110: Saving finished
3822.528 Info AppManager.cpp:323: Saving to _autosave2 (blocking).
3823.118 Info AppManagerStates.cpp:2110: Saving finished
4125.292 Info AppManager.cpp:323: Saving to _autosave3 (blocking).
4125.899 Info AppManagerStates.cpp:2110: Saving finished
4426.825 Info AppManager.cpp:323: Saving to _autosave1 (blocking).
4427.383 Info AppManagerStates.cpp:2110: Saving finished
4753.542 Info AppManager.cpp:323: Saving to _autosave2 (blocking).
4754.126 Info AppManagerStates.cpp:2110: Saving finished
5054.125 Info AppManager.cpp:323: Saving to _autosave3 (blocking).
5054.709 Info AppManagerStates.cpp:2110: Saving finished
5354.707 Info AppManager.cpp:323: Saving to _autosave1 (blocking).
5355.289 Info AppManagerStates.cpp:2110: Saving finished
5655.275 Info AppManager.cpp:323: Saving to _autosave2 (blocking).
5655.847 Info AppManagerStates.cpp:2110: Saving finished
5955.841 Info AppManager.cpp:323: Saving to _autosave3 (blocking).
5956.396 Info AppManagerStates.cpp:2110: Saving finished
6257.742 Info AppManager.cpp:323: Saving to _autosave1 (blocking).
6258.314 Info AppManagerStates.cpp:2110: Saving finished
6558.575 Info AppManager.cpp:323: Saving to _autosave2 (blocking).
6559.151 Info AppManagerStates.cpp:2110: Saving finished
6863.091 Info AppManager.cpp:323: Saving to _autosave3 (blocking).
6863.664 Info AppManagerStates.cpp:2110: Saving finished
7163.658 Info AppManager.cpp:323: Saving to _autosave1 (blocking).
7164.208 Info AppManagerStates.cpp:2110: Saving finished
7464.208 Info AppManager.cpp:323: Saving to _autosave2 (blocking).
7464.764 Info AppManagerStates.cpp:2110: Saving finished
7764.759 Info AppManager.cpp:323: Saving to _autosave3 (blocking).
7765.303 Info AppManagerStates.cpp:2110: Saving finished
8065.308 Info AppManager.cpp:323: Saving to _autosave1 (blocking).
8065.874 Info AppManagerStates.cpp:2110: Saving finished
8365.875 Info AppManager.cpp:323: Saving to _autosave2 (blocking).
8366.442 Info AppManagerStates.cpp:2110: Saving finished
8666.441 Info AppManager.cpp:323: Saving to _autosave3 (blocking).
8667.029 Info AppManagerStates.cpp:2110: Saving finished
8967.442 Info AppManager.cpp:323: Saving to _autosave1 (blocking).
8968.004 Info AppManagerStates.cpp:2110: Saving finished
9267.991 Info AppManager.cpp:323: Saving to _autosave2 (blocking).
9268.566 Info AppManagerStates.cpp:2110: Saving finished
9568.974 Info AppManager.cpp:323: Saving to _autosave3 (blocking).
9569.556 Info AppManagerStates.cpp:2110: Saving finished
9869.557 Info AppManager.cpp:323: Saving to _autosave1 (blocking).
9870.105 Info AppManagerStates.cpp:2110: Saving finished
10229.508 Info AppManager.cpp:323: Saving to _autosave2 (blocking).
10230.085 Info AppManagerStates.cpp:2110: Saving finished
10597.525 Info AppManager.cpp:323: Saving to _autosave3 (blocking).
10598.080 Info AppManagerStates.cpp:2110: Saving finished
10913.791 Info AppManager.cpp:323: Saving to _autosave1 (blocking).
10914.355 Info AppManagerStates.cpp:2110: Saving finished
11272.874 Info AppManager.cpp:323: Saving to _autosave2 (blocking).
11273.436 Info AppManagerStates.cpp:2110: Saving finished
11577.628 Info AppManager.cpp:323: Saving to _autosave3 (blocking).
11578.219 Info AppManagerStates.cpp:2110: Saving finished
11765.148 Info AppManagerStates.cpp:2110: Saving finished
11766.050 Info AppManager.cpp:352: Deleting active scenario.
11766.932 Quitting: user-quit.
11767.254 Steam API shutdown.
11767.260 Goodbye

Re: "Pre-Prepare" on time usage metrics taking up UPS

Posted: Tue Aug 05, 2025 12:42 am
by Jap2.0
Girisado wrote: Mon Aug 04, 2025 10:41 pm Shown on the image above, the "Pre-prepare" metric will sometimes take up to 190 ish ms to process, lowering the game's UPS intermittently to ~48.
I see a max of 7ms? Up to 17ms for prepare.

(Speculation, but I'm curious if that's from chart refresh, which is occasionally 16ms but not reflected up in the update times.)

Re: "Pre-Prepare" on time usage metrics taking up UPS

Posted: Tue Aug 05, 2025 1:13 am
by Girisado
Jap2.0 wrote: Tue Aug 05, 2025 12:42 am
Girisado wrote: Mon Aug 04, 2025 10:41 pm Shown on the image above, the "Pre-prepare" metric will sometimes take up to 190 ish ms to process, lowering the game's UPS intermittently to ~48.
I see a max of 7ms? Up to 17ms for prepare.

(Speculation, but I'm curious if that's from chart refresh, which is occasionally 16ms but not reflected up in the update times.)
It refreshed the metrics every once in a while and I lost the point where it said 190 something on the pre-prepare, and I couldn't reproduce the effect.
But this wasn't the only time the dip in UPS happened for me, it happened at least 5 times in the course of me playing the game since I bought it, and every time I checked my task manager to see if there's any maxed out component, which I never found any. When it happens, it happens consistently for a while until I restart the PC.

Re: "Pre-Prepare" on time usage metrics taking up UPS

Posted: Tue Aug 05, 2025 1:15 am
by Girisado
Jap2.0 wrote: Tue Aug 05, 2025 12:42 am
Girisado wrote: Mon Aug 04, 2025 10:41 pm Shown on the image above, the "Pre-prepare" metric will sometimes take up to 190 ish ms to process, lowering the game's UPS intermittently to ~48.
I see a max of 7ms? Up to 17ms for prepare.

(Speculation, but I'm curious if that's from chart refresh, which is occasionally 16ms but not reflected up in the update times.)
While I was typing the previous reply, it happened again, which you could see here: https://imgur.com/a/xIEYlu6

Re: "Pre-Prepare" on time usage metrics taking up UPS

Posted: Tue Aug 05, 2025 1:16 am
by Girisado
Rseding91 wrote: Tue Aug 05, 2025 12:04 am Can you post the log file?
Hello, I didn't see there was a quote reply option and replied on my own post with the log.
While I was doing that, the dip in UPS happened again, which I was able to capture on this image:Image

Re: "Pre-Prepare" on time usage metrics taking up UPS

Posted: Tue Aug 05, 2025 2:11 pm
by Rseding91
Things done during pre-prepare:

* Poll events from the operating system (keys pressed, mouse movement) - typically takes zero time
* Process steam callbacks (join game requests) - typically takes zero time
* Update in-progress downloads - typically takes zero time (and downloads don't happen while in-game)
* Destroy flagged GUI elements no longer needed - typically takes zero time unless some huge GUI has been closed
* Reload game view - typically takes zero time and only happens rarely
* Process game GUI notifications - typically takes zero time but rarely can cause stutters if some huge number of game things happened in one tick (takes zero time on new saves)

Are you able to reproduce the slow pre-prepare if you save before it happens, and then once it happens reload and run the same amount of time?

Re: "Pre-Prepare" on time usage metrics taking up UPS

Posted: Tue Aug 05, 2025 9:39 pm
by Girisado
Rseding91 wrote: Tue Aug 05, 2025 2:11 pm Things done during pre-prepare:

* Poll events from the operating system (keys pressed, mouse movement) - typically takes zero time
* Process steam callbacks (join game requests) - typically takes zero time
* Update in-progress downloads - typically takes zero time (and downloads don't happen while in-game)
* Destroy flagged GUI elements no longer needed - typically takes zero time unless some huge GUI has been closed
* Reload game view - typically takes zero time and only happens rarely
* Process game GUI notifications - typically takes zero time but rarely can cause stutters if some huge number of game things happened in one tick (takes zero time on new saves)

Are you able to reproduce the slow pre-prepare if you save before it happens, and then once it happens reload and run the same amount of time?
Hello,

As for your question, in the state that the game is in right now I believe I can't recreate it by saving and such as the game is now installed in a totally different manner, but If you would like me to try recreating this issue by reversing the below steps, I would be willing to try.

I tried to fix the issue myself yesterday, messing with the config "read-data" and "write-data" values.
The reason why is because I actually realized a trend where my C drive SSD(where my OS is installed) was jumping up in utilization whenever the stutter happened.
That made me think since :
  1. The stutter happens whenever the disk is doing something, which is as far as I know, limited to reading/writing data
  • My copy of factorio is installed in the G drive, which is my dedicated games drive.
  • The steam version of factorio writes data such as saves on the C drive's User/Appdata/Roaming directory
I concluded that the stutter could be happening since the game directory and the save directory is in a separate drive, the delay is happening when the two drives tries to communicate.

But at first this didn't compute to me as both the drives are NVMe SSDs, and the disk space on both drives were plenty(at least in my eyes, 112GB on C drive and ~500GB on the G drive), I thought the drive shouldn't have any speed issues communicating with each other because I doubt that there are GBs worth of information being written at any moment in the game.(C drive is, to my memory, installed on the closest bus to the CPU(?) or whichever the manual of my motherboard recommended, and the G drive is on "bus 4", I believe)

When the stutter happens, only the C drive, which the save files and such are located, were utilized, ranging between 20~30% utilization. Which is weird because it's not trying to use its maximum speed, which I believed was causing "average response time" metric on task manager of the performance section to show anywhere between 16~40ms, which I also believe was close to what I was seeing on the "pre-prepare" metric in-game in terms of miliseconds.

To remedy this, I tried to change the "read data" and "write data" both to my root game directory(at least that's what the config-path.cfg file called it)to my installed drive, G drive, but it actually seemed to make it worse.

So I freshly installed the game on my C drive, since it's the fastest, but the problem still persisted.

Without much option, I decided to move some files from my C drive to my G drive so I would have even more space and see what happens. Now the C drive has 424 GB of space available. This somehow seems to fix the issue, at least as of right now when I'm writing this.

Was this just it all along, that I didn't have enough space in the C drive? I would like to know if this is a logical conclusion based on what the pre-prepare does and its correlation to the two drives trying to communicate.

Re: "Pre-Prepare" on time usage metrics taking up UPS

Posted: Wed Aug 06, 2025 4:51 am
by Jap2.0
Girisado wrote: Tue Aug 05, 2025 9:39 pm Was this just it all along, that I didn't have enough space in the C drive?
I'm not really qualified to give advice here but that doesn't sound right.

Re: "Pre-Prepare" on time usage metrics taking up UPS

Posted: Wed Aug 06, 2025 9:21 am
by Tertius
Girisado wrote: Tue Aug 05, 2025 9:39 pm
  1. The stutter happens whenever the disk is doing something, which is as far as I know, limited to reading/writing data
The game isn't accessing the disk drive at all while it is just running. Only during load/save.
So if the stutter happens whenever the disk is doing something, locate the app that's actually using the disk, because it isn't Factorio. It will probably use up other computing resources, so Factorio is degraded by that app and begins to stutter.

To see which apps are using the disk, use the Windows integrated Resource monitor tool. If you're unable to find it, start Windows task manager, go to the performance tab, and in the "..." menu you find a shortcut to Resource monitor.
Go to the disks tab, and you are shown which app is currently reading and writing how much data. Expand the activity section and you will even see the files currently begin read from and written to.

Re: "Pre-Prepare" on time usage metrics taking up UPS

Posted: Wed Aug 06, 2025 10:09 am
by Donion
Tertius wrote: Wed Aug 06, 2025 9:21 am The game isn't accessing the disk drive at all while it is just running. Only during load/save.
This is not entirely accurate, music audio files are read from disk "on demand".

Re: "Pre-Prepare" on time usage metrics taking up UPS

Posted: Wed Aug 06, 2025 6:16 pm
by Jap2.0
Donion wrote: Wed Aug 06, 2025 10:09 am
Tertius wrote: Wed Aug 06, 2025 9:21 am The game isn't accessing the disk drive at all while it is just running. Only during load/save.
This is not entirely accurate, music audio files are read from disk "on demand".
I assume you don't block a frame for that, though? (Especially on, say, a hard drive.)

Re: "Pre-Prepare" on time usage metrics taking up UPS

Posted: Thu Aug 07, 2025 9:00 am
by Donion
Jap2.0 wrote: Wed Aug 06, 2025 6:16 pm I assume you don't block a frame for that, though? (Especially on, say, a hard drive.)
By default, the reading from disk is done in a separate thread.