perf: ASTRO BOT (PPSA21567) first level drops from 3 to 0.7 FPS as the device-local heap fills; with the staging switches off it holds 3.3 FPS #18020
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by BunnyFl on 2026-11-10T04:53:09Z.
Title and scene
PPSA21567 (ASTRO BOT, 01.019.000), first level
aerial_garden("Sky Garden"): the fly-in after DIVE IN on the galaxy map, entered by hand from a save made after the opening cutscene. Windows, 3840x2160.What is slow or what changed
Two play sessions of
main32b292ba38on one machine (RX 9070 XT 16 GB, AMD 26.10.2, Ryzen 7 5800X3D), one per setting. This is one run per setting: an observation, not a reproduction.Run A, default settings. In the level the title presents at about 3 FPS for about 90 s (frame p50 about 325 ms, GPU busy about 200 ms per present), then at about 0.7 FPS until the session ends (frame p50 about 1450 ms, GPU busy 400 to 630 ms per present). The fly-in never finishes.
Run B, the same with
APS5_NO_WRITTEN_SHADOW=1 APS5_NO_ATOMIC_STAGING=1 APS5_NO_DRAW_STAGING=1 APS5_NO_BDA_STAGING=1. 3.1 to 3.6 FPS for the whole 6.4 minutes in the level (two intervals at 2.8), the fly-in finishes, the title card shows and the character spawns.FPS per
APS5_TRACE_SUMMARY_EVERY=10interval, from the level's first present to the end of each session (presents / interval seconds):Device-local heap 1 from the
[gpu-memory]blocks ofAPS5_TRACE_MEMORY_BUDGET=1, in MiB (active plus retained):vkAllocateMemory buffervkAllocateMemory texturevkAllocateMemory storage texturevkAllocateMemory device bufferunit shadowIn Run A the
vkAllocateMemory buffercategory grows through the level; among its values in successive blocks are 223, 836, 1075, 1868, 2386, 2779, 3285, 3722, 4006 and 4068, and it stays at 4068 for the last five blocks. Over the same blocksvkAllocateMemory texturegoes from 5208 down to between 3053 and 3966.Log lines of Run A in the level:
Run A prints 17 "sampled texture cache budget" lines after the level starts, and the last four of them give a budget of 2048 MiB; Run B prints 2. The "staging shadow ... refused" line appears 4 times in Run A (the code prints it at most four times) and not in Run B.
What I read in
main32b292ba38, without running it under a debugger:main32b292ba38core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp:5832isstagingBuffer(): it returns nothing whendeviceLocalHasRoom()(:5812) says no, otherwise allocates throughBuffer::WithinDeviceLocalHeadroom, and prints the "staging shadow ... refused" line at most four times (:5840).deviceLocalHasRoom()compares the device-local heap's reported usage plus an eighth of its budget with the budget, re-reading both at most every 250 ms.:6150,:6584and:6659.deviceLocalHasRoom()at:5808reads "shadow is its own VkDeviceMemory, retained by cached builds".What I did not establish: which cached builds hold the 4068 MiB, whether those buffers are the ones the four switches disable one by one (all four were set together), and why the frame time rises again once the heap is near its budget. The entry into the level also stalled for longer in Run A (one present in 27 s, after 179 presents in 116 s) than in Run B (one interval at 8.9 FPS with a 5.2 s frame). Run B ran second, with whatever shader cache Run A left. I did not control for that and do not attribute the difference in the entry to the switches.
Not run:
APS5_WRITTEN_SHADOW_MAX_KIBon its own, each of the four switches on its own, a second run of either setting, another GPU.Summary lines
Two intervals of each run, from
aps5-summary.jsonl: Run A at about 3 FPS and at about 0.7 FPS, Run B at the same points of its session.Traces
None. Both sessions were recorded with
APS5_TRACE_SUMMARY_EVERY=10, not withAPS5_TRACE_FRAMES. Neither wrote anaps5-trace-*.json.gz. I can capture one of a fixed window in the level if that helps; say which window.Digest
None, for the same reason. The per-class GPU time of
APS5_PROFILE_GPU=1in Run A, per present, while it was at about 3 FPS: draw about 120 ms for about 950 to 1000 draws, staging-in about 8.5 ms and staging-out about 11 ms for about 130 MiB each way, label-run about 5.5 ms.Capture
APS5_TRACE_MEMORY_BUDGET=1,APS5_PROFILE_GPU=1,APS5_TRACE_SUMMARY_EVERY=10and frame dumps (APS5_DUMP_FRAMES=120, every 50), and the log was written to a file. The memory table above comes from those switches. I have not measured what these switches cost. Both runs carry the same ones.AI-assisted: yes. The measurements are from the runs above; the reading of the source is mine and is marked as such.