[GH-ISSUE #5238] [Benchmark] Windows large pages (Lock pages in memory) on RTX 5080 + 96 GB, 0.2.10: arena on 2 MiB pages, no decode or prompt gain (ABAB) #3117

Closed
opened 2026-11-07 14:38:12 +07:00 by bsakaguchi · 3 comments
Owner

Originally created by @Retarel on GitHub (Nov 4, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/5238

What did you measure, or what went wrong

#1412 showed that "Lock pages in memory" moves the expert arena to 2 MiB large pages, and it noted that the effect on tok/s had not been measured. Here is an interleaved A/B of that effect on the 0.2.10 release.

Setup

  • RTX 5080 16 GB (sm_120, PCIe 5.0 x8, the only GPU), Ryzen 9 9950X3D, 96 GB DDR5-6400, Windows 11 Pro 10.0.26200, driver 617.42
  • Strata 0.2.10, Control and engine 0.1.56 windows-x86_64-cuda-cuda13 (release, c5ab5d40)
  • "Lock pages in memory" was granted to the account in secpol.msc, then the PC was rebooted. The test started 2 minutes after logon, with nothing else running. whoami /priv lists SeLockMemoryPrivilege; before the grant, the log said large pages refused ... VirtualAlloc error 1314.
  • Arm A: large pages, the engine's default once the privilege is held. Log: expert arena: cudaHostRegister PORTABLE ok; large pages (2097152 B).
  • Arm B: STRATA_NO_LARGEPAGES=1. Log: large pages skipped (STRATA_NO_LARGEPAGES); using 4 KB pages.
  • Everything else is identical between arms:
    • OrcaRouter Qwen3.8-Flash-Next-Uncensored IQ3_XXS, hand-made run config: 128K, MTP, cyrillic draft subset, --vram-reserve-mib 1472, 49.80 GiB arena, 4161 GPU slots.
    • The setup-made qwen-128k preset: Unsloth UD-IQ4_XS, DFlash2 Auto, 55.43 GiB arena, 2357 slots.

Method

  • Order: Orca A, B, A, B, then qwen-128k A, B. Each arm is a fresh start.
  • Each start runs strata bench run --url ... --skip-model-hash (standard-v1) and then a short Russian probe: 5 prompts × 3 seeds, thinking off, 220–700 tokens. The probe script is in #5107.
  • Values are medians in tok/s from the engine's timings.

Results

Model, pages starts Russian: code / text edit / JSON / prose / short English decode: short / 4K / 16K prompt 4K / 16K arena load sanity
Orca IQ3_XXS, 2 MiB 2 123 / 163 / 137 / 122 / 115 98 / 93 / 99 2159 / 4132 6.73, 6.75 GiB/s 12/12 ×2
Orca IQ3_XXS, 4 KB 2 129 / 165 / 134 / 128 / 120 103 / 99 / 100 2160 / 4123 6.74, 6.75 GiB/s 12/12 ×2
qwen-128k UD-IQ4_XS, 2 MiB 1 109 / 136 / 95 / 87 / 94 84 / 83 / 79 1874 / 3625 5.95 GiB/s 12/12
qwen-128k UD-IQ4_XS, 4 KB 1 113 / 136 / 101 / 87 / 91 85 / 86 / 82 1873 / 3625 6.27 GiB/s 12/12
  • No gain from large pages on decode, prompt or load speed. If anything, the 4 KB arm is 2–6 % faster. On the interleaved Orca pairs it is ahead in 7 of 8 decode metrics, which is within the 3–6 % spread I measured between two starts of the same config, but it points one way.
  • My guess: with most routed experts in the GPU cache and the rest read by the GPU from pinned host memory over PCIe, the CPU's page size is not on the hot path. I have not checked this beyond these numbers.
  • Reliability: all three large-page starts in this boot got their arena on 2 MiB pages, including the third start after two restarts. I did not see the 1450 from #2295 (same 5080 + 96 GB class of PC). That is a short session, not a soak.

Suggestion

Should docs/DETAILS.md, where it describes granting "Lock pages in memory", say that on this kind of PC it was measured with no speed gain? Then nobody grants a user right and logs off for nothing. STRATA_NO_LARGEPAGES=1 worked as the off switch.

The per-request data is kept; I can add it as a results-only PR if useful.

Reproduction status

Measured locally

Originally created by @Retarel on GitHub (Nov 4, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/5238 ### What did you measure, or what went wrong #1412 showed that "Lock pages in memory" moves the expert arena to 2 MiB large pages, and it noted that the effect on tok/s had not been measured. Here is an interleaved A/B of that effect on the 0.2.10 release. #### Setup - RTX 5080 16 GB (sm_120, PCIe 5.0 x8, the only GPU), Ryzen 9 9950X3D, 96 GB DDR5-6400, Windows 11 Pro 10.0.26200, driver 617.42 - Strata 0.2.10, Control and engine 0.1.56 `windows-x86_64-cuda-cuda13` (release, `c5ab5d40`) - "Lock pages in memory" was granted to the account in `secpol.msc`, then the PC was rebooted. The test started 2 minutes after logon, with nothing else running. `whoami /priv` lists `SeLockMemoryPrivilege`; before the grant, the log said `large pages refused ... VirtualAlloc error 1314`. - Arm A: large pages, the engine's default once the privilege is held. Log: `expert arena: cudaHostRegister PORTABLE ok; large pages (2097152 B)`. - Arm B: `STRATA_NO_LARGEPAGES=1`. Log: `large pages skipped (STRATA_NO_LARGEPAGES); using 4 KB pages`. - Everything else is identical between arms: - OrcaRouter Qwen3.8-Flash-Next-Uncensored IQ3_XXS, hand-made run config: 128K, MTP, `cyrillic` draft subset, `--vram-reserve-mib 1472`, 49.80 GiB arena, 4161 GPU slots. - The setup-made `qwen-128k` preset: Unsloth UD-IQ4_XS, DFlash2 Auto, 55.43 GiB arena, 2357 slots. #### Method - Order: Orca A, B, A, B, then qwen-128k A, B. Each arm is a fresh start. - Each start runs `strata bench run --url ... --skip-model-hash` (standard-v1) and then a short Russian probe: 5 prompts × 3 seeds, thinking off, 220–700 tokens. The probe script is in #5107. - Values are medians in tok/s from the engine's timings. #### Results | Model, pages | starts | Russian: code / text edit / JSON / prose / short | English decode: short / 4K / 16K | prompt 4K / 16K | arena load | sanity | |---|---|---|---|---|---|---| | Orca IQ3_XXS, **2 MiB** | 2 | 123 / 163 / 137 / 122 / 115 | 98 / 93 / 99 | 2159 / 4132 | 6.73, 6.75 GiB/s | 12/12 ×2 | | Orca IQ3_XXS, 4 KB | 2 | 129 / 165 / 134 / 128 / 120 | 103 / 99 / 100 | 2160 / 4123 | 6.74, 6.75 GiB/s | 12/12 ×2 | | qwen-128k UD-IQ4_XS, **2 MiB** | 1 | 109 / 136 / 95 / 87 / 94 | 84 / 83 / 79 | 1874 / 3625 | 5.95 GiB/s | 12/12 | | qwen-128k UD-IQ4_XS, 4 KB | 1 | 113 / 136 / 101 / 87 / 91 | 85 / 86 / 82 | 1873 / 3625 | 6.27 GiB/s | 12/12 | - **No gain from large pages** on decode, prompt or load speed. If anything, the 4 KB arm is 2–6 % faster. On the interleaved Orca pairs it is ahead in 7 of 8 decode metrics, which is within the 3–6 % spread I measured between two starts of the same config, but it points one way. - My guess: with most routed experts in the GPU cache and the rest read by the GPU from pinned host memory over PCIe, the CPU's page size is not on the hot path. I have not checked this beyond these numbers. - **Reliability:** all three large-page starts in this boot got their arena on 2 MiB pages, including the third start after two restarts. I did not see the 1450 from #2295 (same 5080 + 96 GB class of PC). That is a short session, not a soak. #### Suggestion Should `docs/DETAILS.md`, where it describes granting "Lock pages in memory", say that on this kind of PC it was measured with no speed gain? Then nobody grants a user right and logs off for nothing. `STRATA_NO_LARGEPAGES=1` worked as the off switch. The per-request data is kept; I can add it as a results-only PR if useful. ### Reproduction status Measured locally
Author
Owner

@udqe commented on GitHub (Nov 5, 2026):

Your Arm B is our box's permanent state, so this thread reads from here with unusual force: on our Windows pair the engine has printed large pages refused for 77022101504 B (GetLargePageMinimum=2097152, VirtualAlloc error 1314); using 4 KB pages on every one of the 162 boots in our log - the account was never granted the privilege, whoami /priv confirms SeLockMemoryPrivilege is absent - and your ABAB is the first measurement that says we have been giving up nothing. The failure mode #1412 noted is, on this box, the whole of the record; your result turns it from "unmeasured" into "measured, null".

Your log lines also complete a small taxonomy that neither of our boxes could close alone. The arena line has three shipped variants and yours is the third:

  • cudaHostRegister PORTABLE ok; large pages (2097152 B) - your box: single GPU, privilege held (full registration, large pages);
  • cudaHostRegister PORTABLE ok; large pages refused ... - our single-GPU-era boots: full registration, no privilege;
  • locked 33753 MiB via working-set minimum + VirtualLock; cudaHostRegister limited to 40 GiB by the engine (multi-GPU under WDDM, or remote experts); ... - our production pair: the cap clause appears whenever the registration is partial, and we carry its whole season history - the cap has read 8, 24, 40, 48, 52, 56, 60 and 64 GiB across the tuning log and 40 in production today.

So PORTABLE ok versus limited to N GiB is the single-vs-multi-GPU (WDDM) gate, not a privilege effect - worth knowing before anyone reads the line as a warning about their secpol settings.

The orthogonal lever, since page size is null: what does pay on Windows here is the working-set lock side, not the page side. Our pair runs under a pinned-arena cap (STRATA_ARENA_PIN_GIB=40) and when we lifted it in a pre-declared A/B the 150K-prompt median dropped 9.4 % (3,154-3,199 vs 3,495-3,647 tok/s) while decode sat inside our pre-declared no-difference band - one honest-window A/B, same shape as yours. Put your null and our non-null together and they agree on the mechanism you guessed: a 2 MiB page table helps the CPU walk memory, while both the GPU's DMA reads over PCIe and the WDDM-gated pinned-registration path never make the CPU's TLB a bottleneck; what bites is whether the arena is actually locked down and capped sensibly, which is a different knob than the one #1412 and the docs point people at.

Support the DETAILS.md suggestion, with wording that covers both halves: granting the privilege moves the arena onto 2 MiB pages (#1412, your arm A), no measurable tok/s gain was found on a single RTX 5080 (this thread), and multi-GPU Windows users should read the limited to N GiB ... (multi-GPU under WDDM) clause as the engine's normal gate rather than a fault. If the docs sentence wants one sentence, that is it.

Scope box: our numbers are one Windows pair (2x 4090, UD-Q4_K_XL, main engine, pw2 split), declared-before-data protocol as disclosed in the #3976/#5031 footers; the TLB mechanism paragraph is inference from both our measurements, not from the engine source - if someone can point at where large pages are actually requested, I would like to read that too.

(ai-assisted; our quoted lines from production log boots 2026-09 to 2026-11-04, 162 occurrences machine-counted)

<!-- gh-comment-id:6647278732 --> @udqe commented on GitHub (Nov 5, 2026): Your Arm B is our box's permanent state, so this thread reads from here with unusual force: on our Windows pair the engine has printed `large pages refused for 77022101504 B (GetLargePageMinimum=2097152, VirtualAlloc error 1314); using 4 KB pages` on every one of the 162 boots in our log - the account was never granted the privilege, `whoami /priv` confirms `SeLockMemoryPrivilege` is absent - and your ABAB is the first measurement that says we have been giving up nothing. The failure mode #1412 noted is, on this box, the whole of the record; your result turns it from "unmeasured" into "measured, null". Your log lines also complete a small taxonomy that neither of our boxes could close alone. The arena line has three shipped variants and yours is the third: - `cudaHostRegister PORTABLE ok; large pages (2097152 B)` - your box: single GPU, privilege held (full registration, large pages); - `cudaHostRegister PORTABLE ok; large pages refused ...` - our single-GPU-era boots: full registration, no privilege; - `locked 33753 MiB via working-set minimum + VirtualLock; cudaHostRegister limited to 40 GiB by the engine (multi-GPU under WDDM, or remote experts); ...` - our production pair: the cap clause appears whenever the registration is partial, and we carry its whole season history - the cap has read 8, 24, 40, 48, 52, 56, 60 and 64 GiB across the tuning log and 40 in production today. So `PORTABLE ok` versus `limited to N GiB` is the single-vs-multi-GPU (WDDM) gate, not a privilege effect - worth knowing before anyone reads the line as a warning about their secpol settings. The orthogonal lever, since page size is null: what does pay on Windows here is the working-set lock side, not the page side. Our pair runs under a pinned-arena cap (`STRATA_ARENA_PIN_GIB=40`) and when we lifted it in a pre-declared A/B the 150K-prompt median dropped 9.4 % (3,154-3,199 vs 3,495-3,647 tok/s) while decode sat inside our pre-declared no-difference band - one honest-window A/B, same shape as yours. Put your null and our non-null together and they agree on the mechanism you guessed: a 2 MiB page table helps the CPU walk memory, while both the GPU's DMA reads over PCIe and the WDDM-gated pinned-registration path never make the CPU's TLB a bottleneck; what bites is whether the arena is actually locked down and capped sensibly, which is a different knob than the one #1412 and the docs point people at. Support the DETAILS.md suggestion, with wording that covers both halves: granting the privilege moves the arena onto 2 MiB pages (#1412, your arm A), no measurable tok/s gain was found on a single RTX 5080 (this thread), and multi-GPU Windows users should read the `limited to N GiB ... (multi-GPU under WDDM)` clause as the engine's normal gate rather than a fault. If the docs sentence wants one sentence, that is it. Scope box: our numbers are one Windows pair (2x 4090, UD-Q4_K_XL, main engine, `pw2` split), declared-before-data protocol as disclosed in the #3976/#5031 footers; the TLB mechanism paragraph is inference from both our measurements, not from the engine source - if someone can point at where large pages are actually requested, I would like to read that too. (ai-assisted; our quoted lines from production log boots 2026-09 to 2026-11-04, 162 occurrences machine-counted)
Author
Owner

@Retarel commented on GitHub (Nov 5, 2026):

The large pages are requested in src/core/pinned.cu (and sycl/src/core/pinned.dp.cpp): VirtualAlloc(MEM_LARGE_PAGES) after the process enables SeLockMemoryPrivilege in its own token, with the STRATA_NO_LARGEPAGES skip in the same place. The reason for it is in include/strata/core/pinned.hpp, which talks about CPU TLB reach.

One correction to the mechanism, so it does not go into the docs: on this box the CPU does walk the arena. The decode lines read expert cache hit rate: 65–75 % of lookups; … 3–4 % of all routed read by the GPU over PCIe, so if I read them right, the remaining ~20–30 % of routed experts are computed by the CPU pool from the arena. The null is therefore not "the CPU never touches it". The CPU expert rows on this Zen 5 X3D part do not seem to be TLB-bound, which I have not profiled.

For DETAILS.md I'd keep the sentence to what was measured: "no measurable decode, prompt or load gain on a single RTX 5080 + 9950X3D", plus your multi-GPU note on limited to N GiB.

<!-- gh-comment-id:6658114967 --> @Retarel commented on GitHub (Nov 5, 2026): The large pages are requested in `src/core/pinned.cu` (and `sycl/src/core/pinned.dp.cpp`): `VirtualAlloc(MEM_LARGE_PAGES)` after the process enables `SeLockMemoryPrivilege` in its own token, with the `STRATA_NO_LARGEPAGES` skip in the same place. The reason for it is in `include/strata/core/pinned.hpp`, which talks about CPU TLB reach. One correction to the mechanism, so it does not go into the docs: on this box the CPU does walk the arena. The decode lines read `expert cache hit rate: 65–75 % of lookups; … 3–4 % of all routed read by the GPU over PCIe`, so if I read them right, the remaining ~20–30 % of routed experts are computed by the CPU pool from the arena. The null is therefore not "the CPU never touches it". The CPU expert rows on this Zen 5 X3D part do not seem to be TLB-bound, which I have not profiled. For DETAILS.md I'd keep the sentence to what was measured: "no measurable decode, prompt or load gain on a single RTX 5080 + 9950X3D", plus your multi-GPU note on `limited to N GiB`.
Author
Owner

@Niko1221 commented on GitHub (Nov 5, 2026):

Thank you for the benchmark. We have collected these results for the benchmarks page on the Strata website, so we are closing this here. If you measure again, for example on 0.2.11, you are welcome to open a new report.

The Strata project

<!-- gh-comment-id:6658811917 --> @Niko1221 commented on GitHub (Nov 5, 2026): Thank you for the benchmark. We have collected these results for the benchmarks page on the Strata website, so we are closing this here. If you measure again, for example on 0.2.11, you are welcome to open a new report. The Strata project
Sign in to join this conversation.
No milestone
No project
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
Niko1221/Strata#3117
No description provided.