Repository navigation
perf(agc): keep draw snapshots in resizable BAR memory - #9712
panicDa3m0n wants to merge 12 commits into
Conversation
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
|
Traces of the four runs whose summary lines are in the description, in run order (main, this PR, main, this PR). GitHub did not take the .json.gz files as attachments here, so they are stored unchanged in one zip; trace_digest.py and performance_compare.py read them as they are.
|
|
Preparing a Windows 007 cross-test of b5b8d4e, not a duplicate implementation. Source-only integration merges cleanly on current main 4777cac with our existing bring-up stack; conventions pass and original authorship is retained: UNBUILT/UNTESTED here so far; our pinned same-build input-policy control is running first. Planned checks are the same native draw/vertex/index/snapshot selection on the base and candidate, actual Khronos layer, no shader cache, plus the disabled-BAR control before a title comparison. Hardware is Windows 11 / RTX 5070 Ti 617.42 / 7800X3D / 32 GiB. One concern from your stated limitation: our 007 runs are already memory-constrained. Before I stress the title, are you planning the Buffer/slab host-memory fallback in this branch? I will not attribute an allocation failure under VRAM pressure to the title itself. No speed claim yet; raw title code/captures stay local. AI-assisted: Codex. |
|
One source-review question before my native run: HostReadableInput takes a second GuestMemory::Read for BAR-backed index buffers, after CopyDrawInput already populated the draw snapshot. If the guest writes those indices between the copy and the highest-index/restart-table scan, the CPU can scan different indices from the snapshot bound for this draw. The host-memory path scans copy.buffer itself, so it preserves that relationship. Could we retain a host shadow of the exact index snapshot (or read back the snapshot for these scans), rather than re-read mutable guest memory? A focused regression could copy indices, mutate the guest source, then check that the derived highest index / restart table still match the bound snapshot. This is a source-review concern; I have not reproduced it in a title or run that regression yet. AI-assisted: Codex. |
|
Thanks, both points are right.
I will push both today with their tests, the validation runs on |
MarcZX10
left a comment
There was a problem hiding this comment.
I reviewed exact head b5b8d4e. Two blocking issues remain in this head: the BAR index path scans guest memory again after creating the GPU-bound snapshot, and BAR-backed Buffer allocations have no host-memory fallback when the selected heap cannot satisfy them. Both were already raised in the discussion, and the author acknowledged both with a plan to address them; those fixes are not present in the reviewed head. Please keep the index snapshot and all derived index metadata from the same byte copy, and add the agreed allocation fallback before treating this as ready. The branch is also 15 commits behind current upstream/main, so update it and rerun the focused draw/index tests plus the documented main-vs-change validation run on the updated tree. The current GitHub check list contains successful conventions/intake/label checks but no product build or test job; I could not run a local build because there is no configured build tree and the filesystem is full. I have not independently reproduced the performance figures. Please also coordinate the already-disclosed interaction with open #8756 and confirm the landing/rebase order.
2befd75 to
8231521
Compare
|
Rebased onto current @Scramblrrrr, both of your points are fixed:
@MarcZX10, both blocking points are fixed in those two commits. On the updated tree:
On the order with #8756: whichever is merged first stays as it is, and the other rebases its neighbouring lines in The description has the new performance numbers for the head, measured against |
|
Traces of the six runs in the description (rounds 1, 2 and 3 there), each with its aps5-traces-pr9712-round1.zip
|
There was a problem hiding this comment.
The PR contains title-specific Astro Bot performance measurements, so I am not treating it as a title-agnostic change. However, the baseline uses main 3ca07d0, not current main, and current main has since changed AGC draw code. Please rerun the comparison on current main so the reported performance evidence can be evaluated against the current code.
The branch is 19 commits behind main. Please update it and rerun the focused snapshot, draw-input and buffer-pool tests plus the main-vs-change performance run on the updated tree. Current hosted checks show conventions and labels passing, with no product build/test run. The author-reported AGC tests and Astro Bot A/B results have not been independently reproduced here.
The review also found a portability issue in Context::MappedBufferProperties: snapshot memory selection uses device-wide physical properties, but the buffer’s VkMemoryRequirements::memoryTypeBits may exclude the selected BAR type while allowing a host-visible type. In that case MemoryType(mask, flags) throws rather than falling back to HostBufferProperties. Please add a regression where the BAR type is excluded but a compatible host type remains. I syntax-checked the relevant production and test sources, and git diff --check and current-main conventions pass. The current hosted checks have no product build/test run.
|
Follow-up: I reproduced the per-buffer compatibility case in a small executable built against the exact PR-head Context.hpp. The physical properties exposed both a host-visible/coherent host type and a host-visible/coherent/device-local BAR type, while the buffer memoryTypeBits mask contained only the host type. Calling MappedBufferProperties(mask, MappedDeviceProperties, 4096) throws “AGC graphics: required Vulkan memory type is unavailable” instead of selecting the compatible host type. |
|
Thanks for reproducing it. I'll make |
Draw snapshots of read-only storage buffers and the vertex and index copies of draws now live in device-local host-visible memory when the device exposes it through a resizable BAR (a heap of at least 4 GiB), and in host memory otherwise. The CPU still fills them with memcpy, but the GPU reads them from VRAM instead of over PCIe. The CPU never reads that memory back: refreshing a stale snapshot rewrites its changed blocks without comparing them, and the highest index of a copied index buffer is scanned from a host copy. APS5_NO_BAR_SNAPSHOTS keeps the previous host memory. On an RTX 4070 Ti SUPER (driver 616.64, PCIe 4.0 x16), shaders read host memory at 6-8 GB/s sequentially and 1.4 GB/s scattered, against 650 and 92 GB/s from VRAM. AI-assisted: yes.
The CPU scans an index copy for its highest index and, for mesh strips, its restart table. With the copy in device-local memory the scans read the guest's index buffer a second time, so a store between the copy and the scan gave a highest index or restart table that did not match the bound copy. Index copies now stay in host memory and the scans read the copy itself; vertex copies stay in BAR memory. agc_draw_input_memory copies indices, stores to the guest source, and checks that the copy is in host memory and keeps its highest index.
A Buffer asked for device-local host-visible memory now takes host memory when the reported budget of the device-local heap has no room for it, as DeviceMemoryType places device buffers. It also takes host memory when its allocation, or the allocation of its slab block, is still refused after the pool trim and the cache reclaim, as device buffers and images do through RefusedDeviceMemoryFallback. Properties() then reports host memory, so refreshing such a snapshot compares its blocks again. MappedDevicePlacement in tests/BufferPool.cpp checks both placements for a buffer and for a slab.
…ry types is mapped device-local MappedBufferProperties looked up the BAR type with MemoryType(mask, flags), which throws when the buffer's memoryTypeBits exclude it, and returned the flags unchanged without VK_EXT_memory_budget, so BufferMemoryType threw the same way. The buffer's own memory types are checked first now: a mask with no mapped device-local type takes HostBufferProperties, with a rate-limited line. MappedDevicePlacement checks a buffer and a slab whose mask excludes the BAR type and keeps the host type, with and without the budget extension.
|
I’ve noticed that asking you to hold this PR was unnecessary. It’s fine to keep submitting PRs; maintainers will handle them in due course. |
8231521 to
b8663c5
Compare
|
Rebased onto current @MarcZX10, thanks for the reproduction. On the updated tree:
|
|
Traces of the six runs in the description, one zip per round, each with its aps5-traces-pr9712-v4-round1.zip
|
…ativeFrame main The line carried the first BAR snapshot port with HostReadableInput, which read index bytes back from the guest after the copy. It now has the reviewed pull request: index copies in host memory scanned from the copy the draw binds, MatchingMemoryType and the host fallbacks of mapped buffers and slabs. The stack's snapshot shadow stays: storage snapshots still fill through FillDrawSnapshot, and a device-local snapshot with a shadow is still compared on refresh.
|
@savvaniss, this pull request also lists only NVIDIA. If you have time for a run like the one you did on #8756, your RX 9070 XT would cover AMD here. What would help most:
No title run is needed. Thanks either way. |
|
tl;dr: Soul Hackers 2 gameplay on an RTX 5090 (Windows): with this PR, GPU time per present drops from about 38 ms to 12 ms and the frame rate rises 7 to 10%. 1 of 11 launches stopped during startup; I could not make that happen again. Setup: Windows 11 (26200), RTX 5090 with driver 617.42 and resizable BAR on, Ryzen 9 9950X3D, WinLibs GCC 15.2, Release. Head 601e9e9 merged onto Different builds, back to back (gameplay windows from 50 to 90 s of each run):
Same build, earlier block (median of each run's gameplay windows): 230.5, 244, 236 and 241 with the BAR path (GPU 11.9-12.4 ms). With This scene's shadow pass draws about 210 meshes of about 90k indices per frame. Before this PR the GPU read every vertex from host memory over PCIe, which kept it busy about 38 ms per present. With the BAR path the frame is limited by the CPU thread that records the draws, not the GPU. Together with #16897, which removes part of that CPU cost, this PR goes from 228/238 to 261/260 presents per 10 s. Stability: 1 of 11 launches stopped about 6.6 s in, during startup. The log ends while shaders are being prepared, and no frame came after that. The other 10 launches, including the 8 after it, reached gameplay. Tests (Windows, same machine): AI-assisted: yes. Written with AI assistance and reviewed by me. |
|
A follow-up data point on index copies, for whenever this lands or as a later PR. This PR keeps index copies in host memory because the CPU scans them for the highest index and the mesh restart table. As an experiment I put index copies through Soul Hackers 2, RTX 5090, alternating runs of the same build: GPU busy per present goes from 12.1/12.0 ms to 10.5/10.4 ms, so about 13% less GPU time. Presents per 10 s don't change (roughly 245-300 in both, noisy), because this scene is now bound by the draw committer's CPU time, not the GPU. I haven't checked the other CPU readers of index snapshots (the refresh compare goes through your shadow copy, so that one should be fine), so this is a measurement, not a ready change. AI-assisted: yes. Written with AI assistance and reviewed by me. |
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
Nothing blocks this change; the points below are optional.
What I ran
Reviewed head d2c6c50c18b1dddaea609fd51ab83e722c4aaafe using the prepared diff and repo_read.py for targeted source context. No tests were run by me. The description reports Windows hardware tests and performance captures; those are author-reported.
Results
| Check | Result | Note |
|---|---|---|
| Diff and targeted source review | passed | Memory placement and refresh paths inspected |
| Tests run by reviewer | not run | Author reports focused and full AGC test runs |
| Performance captures | not run | Author reports three alternating rounds |
Findings
Blocking
None.
Non-blocking
- The
SnapshotMemoryPropertiesthreshold treats any device-local heap of at least 4 GiB with a host-visible device-local type as a full resizable BAR. This is a heuristic; the description’s GPU testing supports the target device, while behavior on other Vulkan devices is not established here. Consider documenting the heuristic’s limits or using an explicit BAR capability signal if one is available.
Not verified
No tests, builds, or hardware runs were performed by me. The full text for Graphics/src/ShaderResources.cpp, tests/Graphics.cpp, and tests/Recorder.cpp was excluded from the review bundle; their changed hunks were inspected using repo_read.py. Other file contents were read from the bundle or targeted source ranges. Author-reported test and performance claims were not independently verified.
To get this to a good state
Nothing is required. The heuristic limitation above is optional feedback.
|
This passed review on d2c6c50, but it now conflicts with main in Context.hpp, Recorder.hpp, Draw.cpp and 2 more. Please merge main into the branch and push; it goes back to the merge queue on the new head. |
What
Summary. Draw snapshots of read-only storage buffers and vertex copies go to resizable BAR memory when the device exposes one, and stay in host memory otherwise or with
APS5_NO_BAR_SNAPSHOTS=1; index copies stay in host memory. On an RTX 4070 Ti SUPER at Astro Bot's Crash Site, three alternating rounds againstmain8499ea5 give a frame p50 of 152.8-160.3 ms instead of 174.5-174.6 ms, and GPU time per present of 91.6-96.4 ms instead of about 152 ms. New tests cover the memory choice, the index copies and the mapped-buffer fallbacks, and each fails on a deliberate mistake.Draw snapshots of read-only storage buffers and the vertex copies of draws now live in device-local host-visible memory when the device exposes a resizable BAR over its device-local heap (a host-visible device-local type on a heap of at least 4 GiB), and in host memory otherwise. The CPU still fills them with
memcpy, but the GPU reads them from VRAM instead of over PCIe. Index copies stay in host memory: the CPU scans them for the highest index and the mesh restart table, and those scans read the same copy the draw binds.The CPU never reads BAR memory back on the draw path: refreshing a stale snapshot rewrites its changed blocks without comparing them.
APS5_NO_BAR_SNAPSHOTS=1keeps the snapshots and vertex copies in host memory as before.A mapped device-local
Buffertakes host memory in three cases:memoryTypeBitsis mapped device-local, since Vulkan reports the supported types per resource and they may exclude the BAR type the device lists;DeviceMemoryTypeplaces device buffers;RefusedDeviceMemoryFallback.Properties()then reports host memory, so refreshing such a snapshot compares its blocks again. The kept snapshots stay within the existing budgets: 1 GiB for storage snapshots and 1 GiB for draw inputs.Why: on an RTX 4070 Ti SUPER (driver 616.64, PCIe 4.0 x16) shaders read host memory at 6-8 GB/s sequentially and 1.4 GB/s scattered, against 650 and 92 GB/s from VRAM.
Tests:
snapshotMemoryTestsintests/Graphics.cppchecks the choice of memory:agc_draw_input_memorycopies indices, stores to the guest source, and checks that the copy is in host memory and keeps its highest index.MappedDevicePlacementintests/BufferPool.cppplaces a mapped device-local buffer and a slab within the budget, over it, after a refused allocation, and with the BAR type excluded from theirmemoryTypeBits, with and withoutVK_EXT_memory_budget.Related:
PrepareDrawBindings, so the second to land needs a small rebase.Context::HeapFitsfor the budget check thatDeviceMemoryTypeandMappedBufferPropertiesboth write inline, and takes a host type only when its heap has room. Whichever of the two lands second can use it inMappedBufferPropertiesandRefusedMappedMemoryFallback.CopyDrawInputas this pull request: this one picks the copy's memory, perf(agc): copy only the vertex records a draw fetches #9875 the bytes it reads. Merged together they conflict there, inCMakeLists.txtand intests/Recorder.cpp, and the second to land keeps both.add_library_test. If it lands first,agc_draw_input_memorymoves to that helper and the Depends line below names it.verifySnapshotscheck reads snapshots back on the CPU. With this change that read is uncached on device memory, slower but still correct.Tested
Windows 11 (10.0.26200), NVIDIA GeForce RTX 4070 Ti SUPER (driver 616.64, PCIe 4.0 x16), i7-11700K, 32 GB; Astro Bot (PPSA21567, 01.019.000) at Crash Site with its default settings, 3840x2160.
mainbelow is 8499ea5, the base of this PR.snapshotMemoryTests, without the heap-size check ofSnapshotMemoryProperties:a 256 MiB BAR window was taken. This ran on b5b8d4e, which has the same check and test.agc_draw_input_memory, with index copies in snapshot memory:an index copy left host memory, so its highest index would be scanned from the guest instead of the copy.agc_buffer_pool(MappedDevicePlacement):a mapped device-local buffer over the device-local budget was not placed in host memory;Buffer: the refused allocation throws (vkAllocateMemory buffer ... Vulkan result -2);vkAllocateMemory buffer slab ... Vulkan result -2);a mapped device-local slab whose block exceeds the device-local budget was not placed in host memory;VK_EXT_memory_budget: the buffer whose mask excludes the BAR type throws (AGC graphics: required Vulkan memory type is unavailable);MemoryTypelookup in place of the mask check: the same throw with the budget extension.ctest -R ^agc_on this PR's head (895 tests): all pass except four, and three skip on this device (sparse host import, dma-buf import, stencil reference export).agc_driver_sample_order,agc_driver_sample_order_grid_referenceandagc_driver_sample_order_recipe_depth_locationsfail the same way onmain's build at 3ca07d0 on this machine ("the slopes did not leave depth both at and below the clear value").agc_compute_pipeline_capture_optional_byte_captimed out in the parallel run: it writes 256 MiB to this machine's slow temporary folder.VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation,ANYPS5_NO_SHADER_CACHE=1,ANYPS5_REQUIRE_VULKAN=1andctest -V:agc_driver_draw_*,agc_driver_vertex_*,agc_driver_rect_list_*,agc_driver_mesh_index_cache,agc_driver_graphics,agc_driver_zero_stride_vertex_fetch), plusagc_draw_input_memoryon the head.main's build at 8499ea5 (26 tests), on this PR's head (27) and on the head withAPS5_NO_BAR_SNAPSHOTS=1(27).VUID-error or awas not found but was requested by env var VK_INSTANCE_LAYERSline.Undefined-Value-ShaderOutputNotConsumed-DynamicRenderingand 1Undefined-Value-ShaderOutputNotConsumed.APS5_TRACE_SECONDS=150:5and no otherAPS5_TRACE_*orAPS5_PROFILE_*switch, with warm shader caches. Builds alternatemainand this PR in one session.Start-Process -RedirectStandardOutput), the same for all runs.APS5_HOST_IMPORT_MIB=13312. On this 32 GB machine the default host import budget is 8149 MiB, below what Crash Site's largest heaps need, so they fall back to copies. fix(agc): keep half the host heap out of the host import budget #6472 set that budget; fix(agc): keep at most 4 GiB of the host heap from the host import budget #7844 changes it.performance_compare.pylistswindow.first_presentas the only configuration difference. The absolute times include the trace's own cost.Over the three rounds, frame p50 goes from 174.5-174.6 ms on
mainto 152.8-160.3 ms with this PR (−19.2, −14.3 and −21.7 ms per round), and GPU busy time per present from 152.0-152.6 ms to 91.6-96.4 ms. Index copies in host memory account for about 12-15 ms of GPU time per present against the first version of this PR, which kept them in BAR memory (83.5-88.1 ms against 98.3-99.7 ms, both on d6eafa5).8499ea52eb8663c5148499ea52eb8663c5148499ea52eb8663c514Summary lines, in run order:
{"commit":"8499ea52e571","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"13312","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"150:5"},"gpu":"NVIDIA GeForce RTX 4070 Ti SUPER","driver":"NVIDIA 616.64","os":"Windows 10.0.26200","cpu":"11th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz","cpu_threads":16,"memory_mib":32599,"title_id":"PPSA21567","title":"ASTRO BOT","content_version":"01.019.000","resolution":"3840x2160","window":{"spec":"seconds 150:5","first_present":2938,"ms":5090.897},"presents":29,"frame_ms":{"p50":174.458,"p90":183.441,"p99":189.159,"max":189.159},"gpu_busy_ms_per_present":152.250,"worker_busy_pct":{"queue worker 0x0":98.786,"queue worker 0x40":97.544,"queue worker 0x48":94.148,"queue worker 0x46":10.122},"top_phases_ms_per_frame":{"Driver.Packet":527.312,"Driver.Packet.memory_wait":302.260,"Driver.Packet.draw":91.258,"Driver.Draw":90.090,"Graphics.Draw":83.514,"Graphics.Draw.draw_and_resource_release":66.774,"Driver.Packet.prepare_memory":60.030,"Driver.Draw.shader_compile_and_link":55.787},"trace_dropped":false,"trace":"aps5-trace-8499ea52e571-25288.json.gz"} {"commit":"b8663c514ef5","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"13312","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"150:5"},"gpu":"NVIDIA GeForce RTX 4070 Ti SUPER","driver":"NVIDIA 616.64","os":"Windows 10.0.26200","cpu":"11th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz","cpu_threads":16,"memory_mib":32599,"title_id":"PPSA21567","title":"ASTRO BOT","content_version":"01.019.000","resolution":"3840x2160","window":{"spec":"seconds 150:5","first_present":2753,"ms":5110.320},"presents":33,"frame_ms":{"p50":155.333,"p90":164.003,"p99":165.208,"max":165.208},"gpu_busy_ms_per_present":96.173,"worker_busy_pct":{"queue worker 0x0":98.684,"queue worker 0x40":97.781,"queue worker 0x48":94.318,"queue worker 0x46":11.173},"top_phases_ms_per_frame":{"Driver.Packet":467.172,"Driver.Packet.memory_wait":275.849,"Driver.Packet.draw":87.205,"Graphics.Draw":86.542,"Driver.Draw":86.075,"Graphics.Draw.draw_and_resource_release":69.994,"Driver.Draw.shader_compile_and_link":52.713,"Driver.Packet.dispatch":43.352},"trace_dropped":false,"trace":"aps5-trace-b8663c514ef5-26736.json.gz"} {"commit":"8499ea52e571","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"13312","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"150:5"},"gpu":"NVIDIA GeForce RTX 4070 Ti SUPER","driver":"NVIDIA 616.64","os":"Windows 10.0.26200","cpu":"11th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz","cpu_threads":16,"memory_mib":32599,"title_id":"PPSA21567","title":"ASTRO BOT","content_version":"01.019.000","resolution":"3840x2160","window":{"spec":"seconds 150:5","first_present":2660,"ms":5017.386},"presents":29,"frame_ms":{"p50":174.619,"p90":182.895,"p99":185.561,"max":185.561},"gpu_busy_ms_per_present":152.577,"worker_busy_pct":{"queue worker 0x0":98.804,"queue worker 0x40":97.803,"queue worker 0x48":93.909,"queue worker 0x46":9.464},"top_phases_ms_per_frame":{"Driver.Packet":518.590,"Driver.Packet.memory_wait":298.946,"Driver.Packet.draw":86.549,"Driver.Draw":85.458,"Graphics.Draw":81.895,"Driver.Packet.prepare_memory":65.500,"Graphics.Draw.draw_and_resource_release":65.075,"Driver.Draw.shader_compile_and_link":52.003},"trace_dropped":false,"trace":"aps5-trace-8499ea52e571-12684.json.gz"} {"commit":"b8663c514ef5","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"13312","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"150:5"},"gpu":"NVIDIA GeForce RTX 4070 Ti SUPER","driver":"NVIDIA 616.64","os":"Windows 10.0.26200","cpu":"11th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz","cpu_threads":16,"memory_mib":32599,"title_id":"PPSA21567","title":"ASTRO BOT","content_version":"01.019.000","resolution":"3840x2160","window":{"spec":"seconds 150:5","first_present":4310,"ms":5118.256},"presents":32,"frame_ms":{"p50":160.333,"p90":167.439,"p99":172.874,"max":172.874},"gpu_busy_ms_per_present":91.612,"worker_busy_pct":{"queue worker 0x0":98.652,"queue worker 0x40":97.934,"queue worker 0x48":94.517,"queue worker 0x46":9.894},"top_phases_ms_per_frame":{"Driver.Packet":481.041,"Driver.Packet.memory_wait":286.595,"Driver.Packet.draw":92.170,"Graphics.Draw":91.690,"Driver.Draw":90.991,"Graphics.Draw.draw_and_resource_release":75.211,"Driver.Draw.shader_compile_and_link":55.081,"Shader.DrawStage":44.516},"trace_dropped":false,"trace":"aps5-trace-b8663c514ef5-3760.json.gz"} {"commit":"8499ea52e571","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"13312","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"150:5"},"gpu":"NVIDIA GeForce RTX 4070 Ti SUPER","driver":"NVIDIA 616.64","os":"Windows 10.0.26200","cpu":"11th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz","cpu_threads":16,"memory_mib":32599,"title_id":"PPSA21567","title":"ASTRO BOT","content_version":"01.019.000","resolution":"3840x2160","window":{"spec":"seconds 150:5","first_present":2658,"ms":5045.459},"presents":29,"frame_ms":{"p50":174.497,"p90":183.493,"p99":184.907,"max":184.907},"gpu_busy_ms_per_present":151.991,"worker_busy_pct":{"queue worker 0x0":98.787,"queue worker 0x40":97.445,"queue worker 0x48":94.411,"queue worker 0x46":9.031},"top_phases_ms_per_frame":{"Driver.Packet":520.917,"Driver.Packet.memory_wait":298.770,"Driver.Packet.draw":91.749,"Driver.Draw":90.597,"Graphics.Draw":83.471,"Graphics.Draw.draw_and_resource_release":66.106,"Driver.Packet.prepare_memory":55.606,"Driver.Draw.shader_compile_and_link":53.222},"trace_dropped":false,"trace":"aps5-trace-8499ea52e571-25028.json.gz"} {"commit":"b8663c514ef5","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"13312","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"150:5"},"gpu":"NVIDIA GeForce RTX 4070 Ti SUPER","driver":"NVIDIA 616.64","os":"Windows 10.0.26200","cpu":"11th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz","cpu_threads":16,"memory_mib":32599,"title_id":"PPSA21567","title":"ASTRO BOT","content_version":"01.019.000","resolution":"3840x2160","window":{"spec":"seconds 150:5","first_present":2779,"ms":5089.771},"presents":33,"frame_ms":{"p50":152.754,"p90":161.061,"p99":166.455,"max":166.455},"gpu_busy_ms_per_present":96.415,"worker_busy_pct":{"queue worker 0x0":98.647,"queue worker 0x40":97.920,"queue worker 0x48":94.465,"queue worker 0x46":11.271},"top_phases_ms_per_frame":{"Driver.Packet":465.854,"Driver.Packet.memory_wait":274.814,"Driver.Packet.draw":87.031,"Graphics.Draw":86.515,"Driver.Draw":85.879,"Graphics.Draw.draw_and_resource_release":70.117,"Driver.Draw.shader_compile_and_link":51.299,"Driver.Packet.dispatch":43.309},"trace_dropped":false,"trace":"aps5-trace-b8663c514ef5-27560.json.gz"}performance_compare.py, round 1
Performance comparison
Configuration differences
Frame and GPU times (ms)
Top phases (ms per frame)
performance_compare.py, round 2
Performance comparison
Configuration differences
Frame and GPU times (ms)
Top phases (ms per frame)
performance_compare.py, round 3
Performance comparison
Configuration differences
Frame and GPU times (ms)
Top phases (ms per frame)
trace_digest.py, run 1 (main)
seconds 150:5 from present 2938: 29 presents, frame p50 174.5 / p90 183.4 / p99 189.2 / max 189.2 ms, GPU busy 152.2 ms per present
NVIDIA GeForce RTX 4070 Ti SUPER, NVIDIA 616.64, Windows 10.0.26200, 3840x2160, commit 8499ea5, dropped: no
{"commit":"8499ea52e571","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"13312","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"150:5"},"gpu":"NVIDIA GeForce RTX 4070 Ti SUPER","driver":"NVIDIA 616.64","os":"Windows 10.0.26200","cpu":"11th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz","cpu_threads":16,"memory_mib":32599,"title_id":"PPSA21567","title":"ASTRO BOT","content_version":"01.019.000","resolution":"3840x2160","window":{"spec":"seconds 150:5","first_present":2938,"ms":5090.897},"presents":29,"frame_ms":{"p50":174.458,"p90":183.441,"p99":189.159,"max":189.159},"gpu_busy_ms_per_present":152.25,"worker_busy_pct":{"queue worker 0x0":98.786,"queue worker 0x40":97.544,"queue worker 0x48":94.148,"queue worker 0x46":10.122},"top_phases_ms_per_frame":{"Driver.Packet":527.312,"Driver.Packet.memory_wait":302.26,"Driver.Packet.draw":91.258,"Driver.Draw":90.09,"Graphics.Draw":83.514,"Graphics.Draw.draw_and_resource_release":66.774,"Driver.Packet.prepare_memory":60.03,"Driver.Draw.shader_compile_and_link":55.787},"trace_dropped":false,"trace":"aps5-trace-8499ea52e571-25288.json.gz"}Slowest frames (largest slices inside each, inclusive)
Threads (ms per frame)
Largest slices (ms per frame, inclusive, all threads): Driver.Packet 506.8, Driver.Packet.memory_wait 302.3, Driver.WorkerWait 156.6, batch 152.1, Driver.WorkerWait.dequeue_order 144.8, Driver.Packet.draw 78.7, Driver.Draw 77.5, Graphics.Draw 70.5, Driver.Packet.prepare_memory 58.7, Graphics.Draw.draw_and_resource_release 56.9
Longest waits
Largest GPU batches (GPU ranges inside, and the CPU slices that recorded each, inclusive)
trace_digest.py, run 2 (this PR)
seconds 150:5 from present 2753: 33 presents, frame p50 155.3 / p90 164.0 / p99 165.2 / max 165.2 ms, GPU busy 96.2 ms per present
NVIDIA GeForce RTX 4070 Ti SUPER, NVIDIA 616.64, Windows 10.0.26200, 3840x2160, commit b8663c5, dropped: no
{"commit":"b8663c514ef5","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"13312","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"150:5"},"gpu":"NVIDIA GeForce RTX 4070 Ti SUPER","driver":"NVIDIA 616.64","os":"Windows 10.0.26200","cpu":"11th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz","cpu_threads":16,"memory_mib":32599,"title_id":"PPSA21567","title":"ASTRO BOT","content_version":"01.019.000","resolution":"3840x2160","window":{"spec":"seconds 150:5","first_present":2753,"ms":5110.32},"presents":33,"frame_ms":{"p50":155.333,"p90":164.003,"p99":165.208,"max":165.208},"gpu_busy_ms_per_present":96.173,"worker_busy_pct":{"queue worker 0x0":98.684,"queue worker 0x40":97.781,"queue worker 0x48":94.318,"queue worker 0x46":11.173},"top_phases_ms_per_frame":{"Driver.Packet":467.172,"Driver.Packet.memory_wait":275.849,"Driver.Packet.draw":87.205,"Graphics.Draw":86.542,"Driver.Draw":86.075,"Graphics.Draw.draw_and_resource_release":69.994,"Driver.Draw.shader_compile_and_link":52.713,"Driver.Packet.dispatch":43.352},"trace_dropped":false,"trace":"aps5-trace-b8663c514ef5-26736.json.gz"}Slowest frames (largest slices inside each, inclusive)
Threads (ms per frame)
Largest slices (ms per frame, inclusive, all threads): Driver.Packet 446.9, Driver.Packet.memory_wait 275.8, Driver.WorkerWait 137.4, Driver.WorkerWait.dequeue_order 128.4, batch 96.2, Driver.Packet.draw 74.6, Graphics.Draw 73.5, Driver.Draw 73.4, Graphics.Draw.draw_and_resource_release 59.9, Driver.Packet.dispatch 43.2
Longest waits
Largest GPU batches (GPU ranges inside, and the CPU slices that recorded each, inclusive)
trace_digest.py, run 3 (main)
seconds 150:5 from present 2660: 29 presents, frame p50 174.6 / p90 182.9 / p99 185.6 / max 185.6 ms, GPU busy 152.6 ms per present
NVIDIA GeForce RTX 4070 Ti SUPER, NVIDIA 616.64, Windows 10.0.26200, 3840x2160, commit 8499ea5, dropped: no
{"commit":"8499ea52e571","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"13312","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"150:5"},"gpu":"NVIDIA GeForce RTX 4070 Ti SUPER","driver":"NVIDIA 616.64","os":"Windows 10.0.26200","cpu":"11th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz","cpu_threads":16,"memory_mib":32599,"title_id":"PPSA21567","title":"ASTRO BOT","content_version":"01.019.000","resolution":"3840x2160","window":{"spec":"seconds 150:5","first_present":2660,"ms":5017.386},"presents":29,"frame_ms":{"p50":174.619,"p90":182.895,"p99":185.561,"max":185.561},"gpu_busy_ms_per_present":152.577,"worker_busy_pct":{"queue worker 0x0":98.804,"queue worker 0x40":97.803,"queue worker 0x48":93.909,"queue worker 0x46":9.464},"top_phases_ms_per_frame":{"Driver.Packet":518.59,"Driver.Packet.memory_wait":298.946,"Driver.Packet.draw":86.549,"Driver.Draw":85.458,"Graphics.Draw":81.895,"Driver.Packet.prepare_memory":65.5,"Graphics.Draw.draw_and_resource_release":65.075,"Driver.Draw.shader_compile_and_link":52.003},"trace_dropped":false,"trace":"aps5-trace-8499ea52e571-12684.json.gz"}Slowest frames (largest slices inside each, inclusive)
Threads (ms per frame)
Largest slices (ms per frame, inclusive, all threads): Driver.Packet 497.9, Driver.Packet.memory_wait 298.9, Driver.WorkerWait 153.5, batch 152.4, Driver.WorkerWait.dequeue_order 138.5, Driver.Packet.draw 73.7, Driver.Draw 72.6, Graphics.Draw 68.9, Driver.Packet.prepare_memory 64.2, Graphics.Draw.draw_and_resource_release 55.0
Longest waits
Largest GPU batches (GPU ranges inside, and the CPU slices that recorded each, inclusive)
trace_digest.py, run 4 (this PR)
seconds 150:5 from present 4310: 32 presents, frame p50 160.3 / p90 167.4 / p99 172.9 / max 172.9 ms, GPU busy 91.6 ms per present
NVIDIA GeForce RTX 4070 Ti SUPER, NVIDIA 616.64, Windows 10.0.26200, 3840x2160, commit b8663c5, dropped: no
{"commit":"b8663c514ef5","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"13312","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"150:5"},"gpu":"NVIDIA GeForce RTX 4070 Ti SUPER","driver":"NVIDIA 616.64","os":"Windows 10.0.26200","cpu":"11th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz","cpu_threads":16,"memory_mib":32599,"title_id":"PPSA21567","title":"ASTRO BOT","content_version":"01.019.000","resolution":"3840x2160","window":{"spec":"seconds 150:5","first_present":4310,"ms":5118.256},"presents":32,"frame_ms":{"p50":160.333,"p90":167.439,"p99":172.874,"max":172.874},"gpu_busy_ms_per_present":91.612,"worker_busy_pct":{"queue worker 0x0":98.652,"queue worker 0x40":97.934,"queue worker 0x48":94.517,"queue worker 0x46":9.894},"top_phases_ms_per_frame":{"Driver.Packet":481.041,"Driver.Packet.memory_wait":286.595,"Driver.Packet.draw":92.17,"Graphics.Draw":91.69,"Driver.Draw":90.991,"Graphics.Draw.draw_and_resource_release":75.211,"Driver.Draw.shader_compile_and_link":55.081,"Shader.DrawStage":44.516},"trace_dropped":false,"trace":"aps5-trace-b8663c514ef5-3760.json.gz"}Slowest frames (largest slices inside each, inclusive)
Threads (ms per frame)
Largest slices (ms per frame, inclusive, all threads): Driver.Packet 460.9, Driver.Packet.memory_wait 286.6, Driver.WorkerWait 144.0, Driver.WorkerWait.dequeue_order 134.5, batch 94.7, Driver.Packet.draw 79.7, Graphics.Draw 78.8, Driver.Draw 78.5, Graphics.Draw.draw_and_resource_release 65.5, Driver.Draw.shader_compile_and_link 44.4
Longest waits
Largest GPU batches (GPU ranges inside, and the CPU slices that recorded each, inclusive)
trace_digest.py, run 5 (main)
seconds 150:5 from present 2658: 29 presents, frame p50 174.5 / p90 183.5 / p99 184.9 / max 184.9 ms, GPU busy 152.0 ms per present
NVIDIA GeForce RTX 4070 Ti SUPER, NVIDIA 616.64, Windows 10.0.26200, 3840x2160, commit 8499ea5, dropped: no
{"commit":"8499ea52e571","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"13312","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"150:5"},"gpu":"NVIDIA GeForce RTX 4070 Ti SUPER","driver":"NVIDIA 616.64","os":"Windows 10.0.26200","cpu":"11th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz","cpu_threads":16,"memory_mib":32599,"title_id":"PPSA21567","title":"ASTRO BOT","content_version":"01.019.000","resolution":"3840x2160","window":{"spec":"seconds 150:5","first_present":2658,"ms":5045.459},"presents":29,"frame_ms":{"p50":174.497,"p90":183.493,"p99":184.907,"max":184.907},"gpu_busy_ms_per_present":151.991,"worker_busy_pct":{"queue worker 0x0":98.787,"queue worker 0x40":97.445,"queue worker 0x48":94.411,"queue worker 0x46":9.031},"top_phases_ms_per_frame":{"Driver.Packet":520.917,"Driver.Packet.memory_wait":298.77,"Driver.Packet.draw":91.749,"Driver.Draw":90.597,"Graphics.Draw":83.471,"Graphics.Draw.draw_and_resource_release":66.106,"Driver.Packet.prepare_memory":55.606,"Driver.Draw.shader_compile_and_link":53.222},"trace_dropped":false,"trace":"aps5-trace-8499ea52e571-25028.json.gz"}Slowest frames (largest slices inside each, inclusive)
Threads (ms per frame)
Largest slices (ms per frame, inclusive, all threads): Driver.Packet 500.3, Driver.Packet.memory_wait 298.8, Driver.WorkerWait 157.2, batch 151.0, Driver.WorkerWait.dequeue_order 143.9, Driver.Packet.draw 79.0, Driver.Draw 77.9, Graphics.Draw 70.5, Graphics.Draw.draw_and_resource_release 56.1, Driver.Packet.prepare_memory 54.3
Longest waits
Largest GPU batches (GPU ranges inside, and the CPU slices that recorded each, inclusive)
trace_digest.py, run 6 (this PR)
seconds 150:5 from present 2779: 33 presents, frame p50 152.8 / p90 161.1 / p99 166.5 / max 166.5 ms, GPU busy 96.4 ms per present
NVIDIA GeForce RTX 4070 Ti SUPER, NVIDIA 616.64, Windows 10.0.26200, 3840x2160, commit b8663c5, dropped: no
{"commit":"b8663c514ef5","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"13312","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"150:5"},"gpu":"NVIDIA GeForce RTX 4070 Ti SUPER","driver":"NVIDIA 616.64","os":"Windows 10.0.26200","cpu":"11th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz","cpu_threads":16,"memory_mib":32599,"title_id":"PPSA21567","title":"ASTRO BOT","content_version":"01.019.000","resolution":"3840x2160","window":{"spec":"seconds 150:5","first_present":2779,"ms":5089.771},"presents":33,"frame_ms":{"p50":152.754,"p90":161.061,"p99":166.455,"max":166.455},"gpu_busy_ms_per_present":96.415,"worker_busy_pct":{"queue worker 0x0":98.647,"queue worker 0x40":97.92,"queue worker 0x48":94.465,"queue worker 0x46":11.271},"top_phases_ms_per_frame":{"Driver.Packet":465.854,"Driver.Packet.memory_wait":274.814,"Driver.Packet.draw":87.031,"Graphics.Draw":86.515,"Driver.Draw":85.879,"Graphics.Draw.draw_and_resource_release":70.117,"Driver.Draw.shader_compile_and_link":51.299,"Driver.Packet.dispatch":43.309},"trace_dropped":false,"trace":"aps5-trace-b8663c514ef5-27560.json.gz"}Slowest frames (largest slices inside each, inclusive)
Threads (ms per frame)
Largest slices (ms per frame, inclusive, all threads): Driver.Packet 445.3, Driver.Packet.memory_wait 274.8, Driver.WorkerWait 136.7, Driver.WorkerWait.dequeue_order 127.8, batch 96.5, Driver.Packet.draw 74.1, Graphics.Draw 73.1, Driver.Draw 72.8, Graphics.Draw.draw_and_resource_release 60.0, Driver.Packet.dispatch 43.1
Longest waits
Largest GPU batches (GPU ranges inside, and the CPU slices that recorded each, inclusive)
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)