Memory accounting at world entry on NVIDIA: what private bytes, commit and the working set count (RTX 4060 Laptop, 32 GB) #1244

Open
opened 2026-11-26 04:00:14 +00:00 by github-bot · 0 comments
Owner

@⁠j-fuxa on GitHub · 2026-11-26 01:41 UTC · original

Measurement notes, in case they help when memory numbers are compared (#54, #424, #689). Windows 11, RTX 4060 Laptop 8 GB, 32 GB RAM, measured at world entry on our tree.

Commit and private bytes

  • The NVIDIA driver charges D3D12 default-heap textures (VRAM) to the process's commit at full size: 8 textures of 16 MiB added 128 MiB of private bytes. About 4.3 GB of commit at world entry is that, so a job-object commit limit trips on VRAM use as well as RAM use.
  • The private working set misses title memory held in pagefile-backed sections: it counts as shareable (about 7 GiB here).
  • The whole working set counts a page mapped at two addresses twice (0.6 to 1.0 GiB here). QueryWorkingSet's share count saturates at 7, so it cannot deduplicate. Walking the working set over the known views and counting each section page once does.

Where the RAM goes

  • The title holds 7.1 GB of physical pages, mapped as 11.5 GB of its own views plus 2.3 to 2.5 GB of GPU page-mapping copies. The "~20 GB mapped" figure is address space. Only 1.9 to 2.7 GB of distinct title pages are resident, and a zero-page scan found no eager touching.
  • The layer's own private memory (about 8 GB) dominates. Host buffer copies are 2.8 to 3.0 GB, of which loose 4 MiB windows are 1.76 to 1.99 GB, but submissions touched only 665 to 838 MiB of them. The windows barely overlap (24 to 48 MiB). The snapshot pool peaks at 1.2 to 1.3 GB out at once.

Why it may matter: a "private at N GB" comparison between switches on NVIDIA includes roughly 4 GB of VRAM textures, and neither the private nor the whole working set gives the title's section memory once. The touched-against-held window figures (roughly a third to a half) suggest an upper bound on what a finer window grid can save (#54).

Caveats: one machine, one scene. "Touched" means touched by a submission, not by a CPU access. Numbers are from our tree, not main.

**@⁠j-fuxa** on GitHub · 2026-11-26 01:41 UTC · [original](https://github.com/fxceless/victory-fork/issues/1244) Measurement notes, in case they help when memory numbers are compared (#54, #424, #689). Windows 11, RTX 4060 Laptop 8 GB, 32 GB RAM, measured at world entry on our tree. Commit and private bytes - The NVIDIA driver charges D3D12 default-heap textures (VRAM) to the process's commit at full size: 8 textures of 16 MiB added 128 MiB of private bytes. About 4.3 GB of commit at world entry is that, so a job-object commit limit trips on VRAM use as well as RAM use. - The private working set misses title memory held in pagefile-backed sections: it counts as shareable (about 7 GiB here). - The whole working set counts a page mapped at two addresses twice (0.6 to 1.0 GiB here). `QueryWorkingSet`'s share count saturates at 7, so it cannot deduplicate. Walking the working set over the known views and counting each section page once does. Where the RAM goes - The title holds 7.1 GB of physical pages, mapped as 11.5 GB of its own views plus 2.3 to 2.5 GB of GPU page-mapping copies. The "~20 GB mapped" figure is address space. Only 1.9 to 2.7 GB of distinct title pages are resident, and a zero-page scan found no eager touching. - The layer's own private memory (about 8 GB) dominates. Host buffer copies are 2.8 to 3.0 GB, of which loose 4 MiB windows are 1.76 to 1.99 GB, but submissions touched only 665 to 838 MiB of them. The windows barely overlap (24 to 48 MiB). The snapshot pool peaks at 1.2 to 1.3 GB out at once. Why it may matter: a "private at N GB" comparison between switches on NVIDIA includes roughly 4 GB of VRAM textures, and neither the private nor the whole working set gives the title's section memory once. The touched-against-held window figures (roughly a third to a half) suggest an upper bound on what a finer window grid can save (#54). Caveats: one machine, one scene. "Touched" means touched by a submission, not by a CPU access. Numbers are from our tree, not main.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:00:14 +00:00
This discussion has been locked. Commenting is limited to contributors.
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.

Dependencies

No dependencies set

Reference
github/fxceless--victory-fork#1244
No description provided.