perf: Astroneer (PPSA27623) opening cutscene runs at ~10 FPS #21967

Open
opened 2026-11-16 23:36:42 +00:00 by talha-devp · 0 comments
talha-devp commented 2026-11-16 23:36:42 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by talha-devp on 2026-11-16T23:36:42Z.


Title and scene

PPSA27623 (Astroneer 1.0), the opening cutscene with no input: the planet-surface part, about 27–135 s after launch. The capture window is 30–60 s.

What is slow or what changed

The planet-surface part of the opening cutscene runs at 9.3–10.8 FPS (this window: 10.35 FPS, frame p50 93 ms) while the GPU is busy about 41 ms per frame, so the time is spent on the CPU side of AnyPS5. The space part that follows (from about 138 s) runs at 28–31 FPS.

Plain main cannot run the cutscene. On main 459f4f8c22, 7 of 11 launches aborted during the opening (six with guest sampler descriptor uses unnormalized coordinates with anisotropic filtering, one with unknown anisotropy ratio 7), and the survivors draw the cutscene upside down in wrong colours. That is the #16053 regression (#20835); with #20845's revert (87c75c1e7f) there were 0 aborts in 14 launches. The capture below is main 459f4f8c22 + 87c75c1e7f.

Where the time goes (separate profiled runs with APS5_PROFILE_DRAW, APS5_PIPELINE_STATS and worker sampling, so their absolute times are inflated; about 1,950 draws per frame):

  • Queue worker 0 is about 97 % occupied at about 49 µs per draw. Per-draw shader input preparation is about 39 ms per frame (capture 14.8, materialize 8.2, prepared invocation 5.7). Draw keys almost never repeat (189 of 200,787 within the last 4,096 draws) although 93 % of draws have the same shape as the previous draw: the runtime user-data words change every draw.
  • The draw committer is about 85 % occupied at 25–35 µs per commit.
  • Queue worker 0x20 mostly waits on labels; the presenter waits about 15 ms per frame on the render fence.
  • With APS5_DRAW_PIPELINE=1 APS5_PIPELINE_DISPATCH=1 APS5_PIPELINE_DISPATCH_MISSES=1 the cutscene runs at about 12.8 FPS and the committer is the limit.

Launches are bimodal. In some launches (4 of 8 warm, 1 of 8 cold) a per-frame CPU buffer fill of a 640 KiB range takes the CPU-store path (BufferFill.cpp, if (!stored) → WaitIdle) because FillBuffer finds no host import covering it, which costs about 14–19 ms per frame (−14 to −20 % FPS). The capture below is from such a launch (Vulkan.Retire exceeds its wait by about 14 ms per frame). In fast launches the import is made when the title maps that memory at the start of the cutscene. #18829 narrows that wait, but did not help here: every expensive wait was a pending GPU read of that same range.

I'm working on this: first on why the host import is missing in the slow launches.

Windows 10 22H2 (19045), RTX 4060 (NVIDIA 621.14), Ryzen 5 5600, MSYS2 UCRT64 GCC 16.2.0, Release.

Summary lines

{"commit":"36c6a3aa421c","dirty":false,"env":{"APS5_DUMP_FRAMES":"100000","APS5_DUMP_FRAMES_EVERY":"30","APS5_DUMP_SCALE":"8","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"30:30","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 4060","driver":"NVIDIA 621.14","os":"Windows 10.0.19045","cpu":"AMD Ryzen 5 5600 6-Core Processor","cpu_threads":12,"memory_mib":32678,"title_id":"PPSA27623","title":"ASTRONEER","content_version":"01.015.000","resolution":"3840x2160","window":{"spec":"seconds 30:30","first_present":864,"ms":30037.002},"presents":311,"frame_ms":{"p50":93.051,"p90":110.016,"p99":130.471,"max":157.564},"gpu_busy_ms_per_present":41.415,"worker_busy_pct":{"queue worker 0x0":98.072,"queue worker 0x20":100.016},"phase_totals_ms":{"Driver.Completion":4.055,"Driver.Dispatch":1335.019,"Driver.Dispatch.capture_resources":293.065,"Driver.Dispatch.decode_key_device_setup":221.375,"Driver.Dispatch.lookup_cache":2.419,"Driver.Dispatch.materialize":13.967,"Driver.Dispatch.prepared_invocation":13.713,"Driver.Draw":23755.926,"Driver.Draw.device_setup":1007.545,"Driver.Draw.draw_enqueued":11008.638,"Driver.Draw.post_compile_prepare":120.114,"Driver.Draw.prepare":1636.099,"Driver.Draw.shader_compile_and_link":9579.572,"Driver.EndSubmission":216.058,"Driver.Packet":59279.428,"Driver.Packet.device_lock":214.000,"Driver.Packet.dispatch":2013.297,"Driver.Packet.draw":23947.369,"Driver.Packet.execute":843.853,"Driver.Packet.flip_flush":15.655,"Driver.Packet.flush_between_packets":505.461,"Driver.Packet.memory_wait":28899.543,"Driver.Packet.pipeline_drain":1361.864,"Driver.Packet.pipeline_prepare":333.235,"Driver.Packet.prepare_memory":487.962,"Driver.Packet.rendering_wait":0.718,"Driver.Present":4852.819,"Driver.Present.acquire_image":5.278,"Driver.Present.device_setup":0.186,"Driver.Present.gpu_mutex_wait":10.537,"Driver.Present.inflight_wait":0.935,"Driver.Present.present_display_buffer":57.608,"Driver.Present.queue_present":105.704,"Driver.Present.release_and_callback":0.678,"Driver.Present.render_fence_wait":4671.007,"Driver.Present.resize":0.533,"Driver.Present.validate":0.104,"Driver.Suspend":0.106,"GpuMutex.wait.dispatch":184.730,"GpuMutex.wait.draw":169.819,"GpuMutex.wait.end":78.219,"GpuMutex.wait.fill":35.020,"GpuMutex.wait.flush":2.187,"GpuMutex.wait.hook":310.254,"GpuMutex.wait.label":223.200,"GpuMutex.wait.other":241.093,"GpuMutex.wait.present":9.858,"GpuMutex.wait.wait":10.221,"Graphics.Draw":18649.708,"Graphics.Draw.draw_and_resource_release":14826.528,"Graphics.Draw.index_upload":955.317,"Graphics.Draw.validate":1083.857,"Graphics.Draw.vertex_upload":1496.745,"Recorder.Reap":208.228,"Recorder.Submit":746.256,"Recorder.Sync":583.050,"Resources.Complete":80.371,"Resources.Prepare":101.166,"Shader.DrawStage":7139.957,"Shader.DrawStage.capture_resources":3540.957,"Shader.DrawStage.materialize":2033.557,"Shader.DrawStage.prepared_invocation":1460.759,"VideoOut.Flip":4891.425,"VideoOut.Flip.completion_mutex_wait":0.664,"VideoOut.Flip.config_mutex_wait":0.029,"VideoOut.Flip.frame_limit":0.220,"VideoOut.Flip.notify_game":11.185,"VideoOut.Flip.present":4854.944,"VideoOut.Flip.validate":0.410,"VideoOut.Flip.vblank_wait":0.239,"VideoOut.Flip.window_prepare":0.534,"VideoOut.Flip.window_title":22.425,"VideoOut.Readiness":0.863,"VideoOut.Readiness.locks_validate":0.359,"Vulkan.Acquire":4.838,"Vulkan.Acquire.acquire_fence_wait":0.783,"Vulkan.Acquire.acquire_image":3.035,"Vulkan.Acquire.fence_reset":0.681,"Vulkan.Acquire.retired_swapchains":0.202,"Vulkan.Dispatch":207.215,"Vulkan.Dispatch.command_record":98.144,"Vulkan.Dispatch.shader_resources":105.459,"Vulkan.Present":33.101,"Vulkan.Present.command_record_scale":14.961,"Vulkan.Present.pixel_upload":1.554,"Vulkan.Present.queue_submit":16.262,"Vulkan.QueuePresent":104.366,"Vulkan.QueuePresent.queue_present":103.823,"Vulkan.Retire":9221.513,"Vulkan.Retire.dump":1.190,"Vulkan.Retire.wait":4662.526},"top_phases_ms_per_frame":{"Driver.Packet":190.609,"Driver.Packet.memory_wait":92.925,"Driver.Packet.draw":77.001,"Driver.Draw":76.386,"Graphics.Draw":59.967,"Graphics.Draw.draw_and_resource_release":47.674,"Driver.Draw.draw_enqueued":35.398,"Driver.Draw.shader_compile_and_link":30.802},"owned_draw_counts":{"OwnedDraw.evicted_other":28589},"graphics_track":{"Graphics.Barrier.copy":4079,"Graphics.Barrier.dcc-clear":4354,"Graphics.Barrier.dcc-keys":1866,"Graphics.Barrier.dispatch-lead":2490,"Graphics.Barrier.dispatch-trail":4043,"Graphics.Barrier.draw":46649,"Graphics.Barrier.fill":2675,"Graphics.Barrier.fill-clear":1866,"Graphics.Barrier.input-mirror":3448,"Graphics.Barrier.label-run":93563,"Graphics.Barrier.present-blit":622,"Graphics.Barrier.shadow-publish":622,"Graphics.Barrier.staging-in":2177,"Graphics.Barrier.staging-out":933,"Graphics.Barrier.storage-upload":8,"Graphics.Barrier.storage-writeback":8475,"Graphics.BarrierMerged.dispatch-lead":1553,"Graphics.BarrierMerged.fill":2301,"Graphics.BarrierMerged.label-run":1392,"Graphics.BarrierMerged.shadow-publish":622,"Graphics.BarrierMerged.staging-in":622,"Graphics.BarrierMerged.staging-out":933,"Graphics.BarrierMerged.storage-writeback":2099,"Graphics.Copy":6869,"Graphics.Copy.bytes":9127911314,"Graphics.RenderPass":25444,"Graphics.RenderPass.Close.command":7611,"Graphics.RenderPass.Close.image":3145,"Graphics.RenderPass.Close.key":1809,"Graphics.RenderPass.Close.label":1392,"Graphics.RenderPass.Close.new-batch":11487,"Graphics.RenderPass.Continued":556923},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":6.713,"events_lost":931688,"totals_full":false},"draw committer":{"events_full_after_s":16.060,"events_lost":243915,"totals_full":false}},"trace":"aps5-trace-36c6a3aa421c-15332.json.gz"}

Traces

aps5-trace-36c6a3aa421c-15332.json.gz is kept locally and I can attach it. Its buffers filled (queue worker 0 after 6.7 s, the committer after 16.1 s) at the default APS5_TRACE_EVENTS, so slice timings cover the retained events only; the summary statistics are complete.

Digest

**seconds 30:30** from present 864: 311 presents, frame p50 93.1 / p90 110.0 / p99 130.5 / max 157.6 ms, GPU busy 41.4 ms per present
NVIDIA GeForce RTX 4060, NVIDIA 621.14, Windows 10.0.19045, 3840x2160, commit 36c6a3aa421c, dropped: yes

Thread table (ms per frame, from the retained events): queue worker 0x20 busy 2.9 / wait 93.4, draw committer busy 35.3 / wait 0.6, presenter busy 0.7 / wait 15.0, GPU 41.3.

Capture

  • The caches were warm (the scene ran once and the title was restarted)
  • No other APS5_TRACE_* or APS5_PROFILE_* switch was set and the log was not redirected: no profiling switch was set, but my runner adds APS5_TRACE_SUMMARY_EVERY=10 and the frame-dump variables, and writes the log to a file.
  • Captures compared here come from the same machine, scene and settings
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:6433243515 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/21967). Originally posted by [talha-devp](https://github.com/talha-devp) on 2026-11-16T23:36:42Z. --- ### Title and scene PPSA27623 (Astroneer 1.0), the opening cutscene with no input: the planet-surface part, about 27–135 s after launch. The capture window is 30–60 s. ### What is slow or what changed The planet-surface part of the opening cutscene runs at 9.3–10.8 FPS (this window: 10.35 FPS, frame p50 93 ms) while the GPU is busy about 41 ms per frame, so the time is spent on the CPU side of AnyPS5. The space part that follows (from about 138 s) runs at 28–31 FPS. **Plain `main` cannot run the cutscene.** On `main` 459f4f8c22, 7 of 11 launches aborted during the opening (six with `guest sampler descriptor uses unnormalized coordinates with anisotropic filtering`, one with `unknown anisotropy ratio 7`), and the survivors draw the cutscene upside down in wrong colours. That is the #16053 regression (#20835); with #20845's revert (87c75c1e7f) there were 0 aborts in 14 launches. The capture below is `main` 459f4f8c22 + 87c75c1e7f. **Where the time goes** (separate profiled runs with `APS5_PROFILE_DRAW`, `APS5_PIPELINE_STATS` and worker sampling, so their absolute times are inflated; about 1,950 draws per frame): - Queue worker 0 is about 97 % occupied at about 49 µs per draw. Per-draw shader input preparation is about 39 ms per frame (capture 14.8, materialize 8.2, prepared invocation 5.7). Draw keys almost never repeat (189 of 200,787 within the last 4,096 draws) although 93 % of draws have the same shape as the previous draw: the runtime user-data words change every draw. - The draw committer is about 85 % occupied at 25–35 µs per commit. - Queue worker 0x20 mostly waits on labels; the presenter waits about 15 ms per frame on the render fence. - With `APS5_DRAW_PIPELINE=1 APS5_PIPELINE_DISPATCH=1 APS5_PIPELINE_DISPATCH_MISSES=1` the cutscene runs at about 12.8 FPS and the committer is the limit. **Launches are bimodal.** In some launches (4 of 8 warm, 1 of 8 cold) a per-frame CPU buffer fill of a 640 KiB range takes the CPU-store path (`BufferFill.cpp`, `if (!stored)` → `WaitIdle`) because `FillBuffer` finds no host import covering it, which costs about 14–19 ms per frame (−14 to −20 % FPS). The capture below is from such a launch (`Vulkan.Retire` exceeds its wait by about 14 ms per frame). In fast launches the import is made when the title maps that memory at the start of the cutscene. #18829 narrows that wait, but did not help here: every expensive wait was a pending GPU read of that same range. **I'm working on this:** first on why the host import is missing in the slow launches. Windows 10 22H2 (19045), RTX 4060 (NVIDIA 621.14), Ryzen 5 5600, MSYS2 UCRT64 GCC 16.2.0, Release. ### Summary lines ```json {"commit":"36c6a3aa421c","dirty":false,"env":{"APS5_DUMP_FRAMES":"100000","APS5_DUMP_FRAMES_EVERY":"30","APS5_DUMP_SCALE":"8","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"30:30","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"NVIDIA GeForce RTX 4060","driver":"NVIDIA 621.14","os":"Windows 10.0.19045","cpu":"AMD Ryzen 5 5600 6-Core Processor","cpu_threads":12,"memory_mib":32678,"title_id":"PPSA27623","title":"ASTRONEER","content_version":"01.015.000","resolution":"3840x2160","window":{"spec":"seconds 30:30","first_present":864,"ms":30037.002},"presents":311,"frame_ms":{"p50":93.051,"p90":110.016,"p99":130.471,"max":157.564},"gpu_busy_ms_per_present":41.415,"worker_busy_pct":{"queue worker 0x0":98.072,"queue worker 0x20":100.016},"phase_totals_ms":{"Driver.Completion":4.055,"Driver.Dispatch":1335.019,"Driver.Dispatch.capture_resources":293.065,"Driver.Dispatch.decode_key_device_setup":221.375,"Driver.Dispatch.lookup_cache":2.419,"Driver.Dispatch.materialize":13.967,"Driver.Dispatch.prepared_invocation":13.713,"Driver.Draw":23755.926,"Driver.Draw.device_setup":1007.545,"Driver.Draw.draw_enqueued":11008.638,"Driver.Draw.post_compile_prepare":120.114,"Driver.Draw.prepare":1636.099,"Driver.Draw.shader_compile_and_link":9579.572,"Driver.EndSubmission":216.058,"Driver.Packet":59279.428,"Driver.Packet.device_lock":214.000,"Driver.Packet.dispatch":2013.297,"Driver.Packet.draw":23947.369,"Driver.Packet.execute":843.853,"Driver.Packet.flip_flush":15.655,"Driver.Packet.flush_between_packets":505.461,"Driver.Packet.memory_wait":28899.543,"Driver.Packet.pipeline_drain":1361.864,"Driver.Packet.pipeline_prepare":333.235,"Driver.Packet.prepare_memory":487.962,"Driver.Packet.rendering_wait":0.718,"Driver.Present":4852.819,"Driver.Present.acquire_image":5.278,"Driver.Present.device_setup":0.186,"Driver.Present.gpu_mutex_wait":10.537,"Driver.Present.inflight_wait":0.935,"Driver.Present.present_display_buffer":57.608,"Driver.Present.queue_present":105.704,"Driver.Present.release_and_callback":0.678,"Driver.Present.render_fence_wait":4671.007,"Driver.Present.resize":0.533,"Driver.Present.validate":0.104,"Driver.Suspend":0.106,"GpuMutex.wait.dispatch":184.730,"GpuMutex.wait.draw":169.819,"GpuMutex.wait.end":78.219,"GpuMutex.wait.fill":35.020,"GpuMutex.wait.flush":2.187,"GpuMutex.wait.hook":310.254,"GpuMutex.wait.label":223.200,"GpuMutex.wait.other":241.093,"GpuMutex.wait.present":9.858,"GpuMutex.wait.wait":10.221,"Graphics.Draw":18649.708,"Graphics.Draw.draw_and_resource_release":14826.528,"Graphics.Draw.index_upload":955.317,"Graphics.Draw.validate":1083.857,"Graphics.Draw.vertex_upload":1496.745,"Recorder.Reap":208.228,"Recorder.Submit":746.256,"Recorder.Sync":583.050,"Resources.Complete":80.371,"Resources.Prepare":101.166,"Shader.DrawStage":7139.957,"Shader.DrawStage.capture_resources":3540.957,"Shader.DrawStage.materialize":2033.557,"Shader.DrawStage.prepared_invocation":1460.759,"VideoOut.Flip":4891.425,"VideoOut.Flip.completion_mutex_wait":0.664,"VideoOut.Flip.config_mutex_wait":0.029,"VideoOut.Flip.frame_limit":0.220,"VideoOut.Flip.notify_game":11.185,"VideoOut.Flip.present":4854.944,"VideoOut.Flip.validate":0.410,"VideoOut.Flip.vblank_wait":0.239,"VideoOut.Flip.window_prepare":0.534,"VideoOut.Flip.window_title":22.425,"VideoOut.Readiness":0.863,"VideoOut.Readiness.locks_validate":0.359,"Vulkan.Acquire":4.838,"Vulkan.Acquire.acquire_fence_wait":0.783,"Vulkan.Acquire.acquire_image":3.035,"Vulkan.Acquire.fence_reset":0.681,"Vulkan.Acquire.retired_swapchains":0.202,"Vulkan.Dispatch":207.215,"Vulkan.Dispatch.command_record":98.144,"Vulkan.Dispatch.shader_resources":105.459,"Vulkan.Present":33.101,"Vulkan.Present.command_record_scale":14.961,"Vulkan.Present.pixel_upload":1.554,"Vulkan.Present.queue_submit":16.262,"Vulkan.QueuePresent":104.366,"Vulkan.QueuePresent.queue_present":103.823,"Vulkan.Retire":9221.513,"Vulkan.Retire.dump":1.190,"Vulkan.Retire.wait":4662.526},"top_phases_ms_per_frame":{"Driver.Packet":190.609,"Driver.Packet.memory_wait":92.925,"Driver.Packet.draw":77.001,"Driver.Draw":76.386,"Graphics.Draw":59.967,"Graphics.Draw.draw_and_resource_release":47.674,"Driver.Draw.draw_enqueued":35.398,"Driver.Draw.shader_compile_and_link":30.802},"owned_draw_counts":{"OwnedDraw.evicted_other":28589},"graphics_track":{"Graphics.Barrier.copy":4079,"Graphics.Barrier.dcc-clear":4354,"Graphics.Barrier.dcc-keys":1866,"Graphics.Barrier.dispatch-lead":2490,"Graphics.Barrier.dispatch-trail":4043,"Graphics.Barrier.draw":46649,"Graphics.Barrier.fill":2675,"Graphics.Barrier.fill-clear":1866,"Graphics.Barrier.input-mirror":3448,"Graphics.Barrier.label-run":93563,"Graphics.Barrier.present-blit":622,"Graphics.Barrier.shadow-publish":622,"Graphics.Barrier.staging-in":2177,"Graphics.Barrier.staging-out":933,"Graphics.Barrier.storage-upload":8,"Graphics.Barrier.storage-writeback":8475,"Graphics.BarrierMerged.dispatch-lead":1553,"Graphics.BarrierMerged.fill":2301,"Graphics.BarrierMerged.label-run":1392,"Graphics.BarrierMerged.shadow-publish":622,"Graphics.BarrierMerged.staging-in":622,"Graphics.BarrierMerged.staging-out":933,"Graphics.BarrierMerged.storage-writeback":2099,"Graphics.Copy":6869,"Graphics.Copy.bytes":9127911314,"Graphics.RenderPass":25444,"Graphics.RenderPass.Close.command":7611,"Graphics.RenderPass.Close.image":3145,"Graphics.RenderPass.Close.key":1809,"Graphics.RenderPass.Close.label":1392,"Graphics.RenderPass.Close.new-batch":11487,"Graphics.RenderPass.Continued":556923},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":6.713,"events_lost":931688,"totals_full":false},"draw committer":{"events_full_after_s":16.060,"events_lost":243915,"totals_full":false}},"trace":"aps5-trace-36c6a3aa421c-15332.json.gz"} ``` ### Traces `aps5-trace-36c6a3aa421c-15332.json.gz` is kept locally and I can attach it. Its buffers filled (queue worker 0 after 6.7 s, the committer after 16.1 s) at the default `APS5_TRACE_EVENTS`, so slice timings cover the retained events only; the summary statistics are complete. ### Digest ``` **seconds 30:30** from present 864: 311 presents, frame p50 93.1 / p90 110.0 / p99 130.5 / max 157.6 ms, GPU busy 41.4 ms per present NVIDIA GeForce RTX 4060, NVIDIA 621.14, Windows 10.0.19045, 3840x2160, commit 36c6a3aa421c, dropped: yes ``` Thread table (ms per frame, from the retained events): queue worker 0x20 busy 2.9 / wait 93.4, draw committer busy 35.3 / wait 0.6, presenter busy 0.7 / wait 15.0, GPU 41.3. ### Capture - [x] The caches were warm (the scene ran once and the title was restarted) - [ ] No other APS5_TRACE_* or APS5_PROFILE_* switch was set and the log was not redirected: no profiling switch was set, but my runner adds `APS5_TRACE_SUMMARY_EVERY=10` and the frame-dump variables, and writes the log to a file. - [x] Captures compared here come from the same machine, scene and settings
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5#21967
No description provided.