AGC: pipelines first built after the journal reaches APS5_PIPELINE_JOURNAL_MAX_MIB are compiled again on every warm boot #8309
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 SleglJan on 2026-10-20T09:40:09Z.
What happens
PipelineJournalrefuses any append that would take the journal pastAPS5_PIPELINE_JOURNAL_MAX_MIB(default 1024 MiB), and it evicts nothing (core/libs/prx/libSceAgcDriver/Graphics/src/PipelineJournal.cpp:777onmain3fd1cc393b).Module records are almost all of the bytes. In the 2 GiB journal below:
#8213 notes that Ghost of Tsushima's journal is 1023 MiB, with 940 pipelines and 979 modules. So at least one more title's journal is within 1 MiB of the cap. I haven't measured that one.
Measured on PPSA11386 (007 First Light)
One run each:
The warm run always used the default cap.
APS5_PIPELINE_JOURNAL_MAX_MIB=2048Options, none of them tested:
The replay keeps at most
APS5_PIPELINE_JOURNAL_ENTRIES(default 1024) entries (PipelineJournal.cpp:908); the 2 GiB journal holds 958.Storing references to the shader disk cache's entries instead of the modules wouldn't shrink this journal much. Only 4 of its 924 modules have SPIR-V identical to an artifact in the disk cache written by the same run.
Setup:
main68323bae7plus the open PRs PPSA11386 needs (#5799, #6868, #5372, #6918, #7643, #6679), with draw profiling (APS5_PROFILE_DRAW=1) and scripted input.PipelineJournal.cpp.AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-20T10:42:26Z.
A third option, on the module side: compress the module records. They're SPIR-V. On Ghost of Tsushima's 1023 MiB journal (the one #8213 mentions), the first 256 MiB compress with
zstd -1to 22% (0.39 s single-threaded) and withzstd -3to 20%. zstd is already vendored (3rdparty/zstd, built for ZArchive). Since #8213 the replay reads each module from the file when its entry is built, so decompression would also happen per module, at the replay thread that needs it. The same cap would then hold about 4 to 5 times as many modules, and the boot would read less.That can sit beside eviction rather than replace it. I'd build it on #8213, since it changes the same module read path. @SleglJan, if you're already working on the cap, say so and I'll leave it.
AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by SleglJan on 2026-10-20T10:59:18Z.
@milescoviello I'm not working on a fix for the cap, so go ahead.
The same check on PPSA11386, using the 2 GiB journal from the issue's second seed:
-1-1-3So everything that seed recorded, which runs past the level's entry, would fit under the default 1 GiB cap at about 0.55 GiB, about 3.6 times smaller. These are whole-stream numbers, so compressing each record on its own may come out a little larger. When you have a branch, I can run the issue's two seeds on it.
AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-20T11:09:27Z.
@SleglJan thanks, and thanks for the 007 numbers. The branch is up as #8365 (stacked on #8213; its own commit is f5504d2ec4). On MXGP 26, a 200 s seed gives a 30.15 MB journal for 445 modules, against 105.75 MB uncompressed. Per-record compression came to 28.8 MiB of module payloads against 100.9 MiB, so close to your whole-stream ratio. A warm load takes about 48 ms longer, since each module is expanded once to be checked, and the replay time is unchanged. Your two seeds would be very welcome, especially whether the second one now fits under the default cap and how the warm level entry compares.
AI-assisted: yes (Claude Code)