pressure: with JAXE_PRESSURE_PHYSICAL=1, physical memory decides the pressure level #171

Open
github-bot wants to merge 1 commit from github-bot/gh-171 into amd AGit
Owner

@⁠mahhnameisjeff on GitHub · 2026-12-03 14:28 UTC · original
mahhnameisjeff:amd-pressure-physical → amd · +189 −1 · 3 files · 1 commits · open

Base: origin/amd (0902398). Independent of the other PRs from this batch.

JAXE_PRESSURE_PHYSICAL=1 already exists (residency.rs), but
host::current_pressure_level still classified by commit headroom. On AMD
the driver keeps every command allocator's memory for the process,
committed and write-combined but mostly never touched (a release returns
it to the driver's pool, never to Windows: alloc_cap::tests::probe_reuse,
an ignored test that measures this), and a page file that grows on demand
is counted at its present size. So commit headroom sat at 0.6-1.5 GB from
the world's load on, with RAM free, and the layer stayed in emergency or
elevated pressure: recording on one or two threads, emergency reclaims,
pool trims.

With the switch on, free physical memory decides (emergency below 512 MiB,
elevated below 1 GiB), commit only near its real end (256 / 768 MiB), and
the shared-memory percentage as before. Measured on RX 6700 XT 12 GB /
32 GB RAM: emergency reclaims 97 -> 2 per run, frame rate after the load
10 -> 11.3-12.6 fps.

Default behaviour is unchanged (the switch is off unless set).
Related: #133 (2211 emergency reclaims), #61, #64. Only tested with 32 GB
of RAM; 16 GB machines may want other thresholds.

🤖 Generated with Claude Code

**@⁠mahhnameisjeff** on GitHub · 2026-12-03 14:28 UTC · [original](https://github.com/eikkapine/jaxe/pull/171) `mahhnameisjeff:amd-pressure-physical` → `amd` · +189 −1 · 3 files · 1 commits · open Base: origin/amd (0902398). Independent of the other PRs from this batch. `JAXE_PRESSURE_PHYSICAL=1` already exists (residency.rs), but `host::current_pressure_level` still classified by commit headroom. On AMD the driver keeps every command allocator's memory for the process, committed and write-combined but mostly never touched (a release returns it to the driver's pool, never to Windows: `alloc_cap::tests::probe_reuse`, an ignored test that measures this), and a page file that grows on demand is counted at its present size. So commit headroom sat at 0.6-1.5 GB from the world's load on, with RAM free, and the layer stayed in emergency or elevated pressure: recording on one or two threads, emergency reclaims, pool trims. With the switch on, free physical memory decides (emergency below 512 MiB, elevated below 1 GiB), commit only near its real end (256 / 768 MiB), and the shared-memory percentage as before. Measured on RX 6700 XT 12 GB / 32 GB RAM: emergency reclaims 97 -> 2 per run, frame rate after the load 10 -> 11.3-12.6 fps. Default behaviour is unchanged (the switch is off unless set). Related: #133 (2211 emergency reclaims), #61, #64. Only tested with 32 GB of RAM; 16 GB machines may want other thresholds. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Base: origin/amd (0902398). Independent of the other PRs from this batch.

`JAXE_PRESSURE_PHYSICAL=1` already exists (residency.rs), but
`host::current_pressure_level` still classified by commit headroom. On AMD
the driver keeps every command allocator's memory for the process,
committed and write-combined but mostly never touched (a release returns
it to the driver's pool, never to Windows: `alloc_cap::tests::probe_reuse`,
an ignored test that measures this), and a page file that grows on demand
is counted at its present size. So commit headroom sat at 0.6-1.5 GB from
the world's load on, with RAM free, and the layer stayed in emergency or
elevated pressure: recording on one or two threads, emergency reclaims,
pool trims.

With the switch on, free physical memory decides (emergency below 512 MiB,
elevated below 1 GiB), commit only near its real end (256 / 768 MiB), and
the shared-memory percentage as before. Measured on RX 6700 XT 12 GB /
32 GB RAM: emergency reclaims 97 -> 2 per run, frame rate after the load
10 -> 11.3-12.6 fps.

Default behaviour is unchanged (the switch is off unless set).
Related: #133 (2211 emergency reclaims), #61, #64. Only tested with 32 GB
of RAM; 16 GB machines may want other thresholds.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-03 14:35:17 +00:00
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/171/head:github-bot/gh-171'
git switch 'github-bot/gh-171'

Merge

Merge the changes and update on Forgejo.
git switch 'amd'
git merge --no-ff 'github-bot/gh-171'
git switch 'github-bot/gh-171'
git rebase 'amd'
git switch 'amd'
git merge --ff-only 'github-bot/gh-171'
git switch 'github-bot/gh-171'
git rebase 'amd'
git switch 'amd'
git merge --no-ff 'github-bot/gh-171'
git switch 'amd'
git merge --squash 'github-bot/gh-171'
git switch 'amd'
git merge --ff-only 'github-bot/gh-171'
git switch 'amd'
git merge 'github-bot/gh-171'
git push origin 'amd'
This discussion has been locked. Commenting is limited to contributors.
No description provided.