[GH-ISSUE #185] Windows: RAM tier stops at ~45 GB on a 64 GB PC, ~7 GB stays free (pinning cap) - can it be raised? #71

Open
opened 2026-10-29 21:20:08 +07:00 by bsakaguchi · 4 comments
Owner

Originally created by @Hosein20000 on GitHub (Oct 14, 2026).
Original GitHub issue: https://github.com/mw00/project-maya/issues/185

Setup

  • Windows 11 Pro for Workstations, build 26200
  • i5-13600KF, 64 GB DDR4 (63.8 GB total), ASUS TUF B660-PLUS WIFI D4
  • RTX 3090 24 GB (1 GPU), CUDA 12.8
  • Page file 64 GB (custom, X:), commit limit 128 GB
  • Virtualization-based security / HVCI is running
  • Model on NVMe (MSI Spatium M450, PCIe 4.0, DRAM-less)
  • Maya-S24 (IQ2_XXS_S), --max-context 32768, --kv-streaming on, --prefill auto

Problem
About 6.7-7 GB of RAM stays "Available" the whole time, while about a third of the experts are read from the SSD. Decode is ~8 tok/s with exact decoding (no DISK_SKIP).

What the log shows

glm fast: CUDA0 a pinning cap: 33.00 GB more pin, the RAM tier sized to it
glm fast: CUDA0 RAM tier 45.08 GB pinned, 6768 slots
glm fast: CUDA0 layers [0,45) expert pool 15.94 GB, 2408 slots total
glm fast: CUDA0 tiers warm: 9042 experts (64.5 GB) in 46 s
glm fast: CUDA0 CPU lane: 14 threads, an expert 0.249 ms on the CPU vs 0.315 ms over PCIe

9042 of the 13248 experts are held; the rest come from disk.

What I tried

  • STRATA_GLM_RAM_GB=60 and 61: the tier is still 45.08 GB
  • STRATA_GLM_RAM_HEADROOM_GB=1, 2: no change in the tier size
  • Page file raised to 64 GB, Windows restarted: no change

What I found in the code
glm_fast_path.cu (pin_alloc / pin_room) measures a pinning cap at the first refused cudaHostAlloc and sizes the tier to it. A comment mentions a Windows laptop with 64 GB hitting the cap at a 45.3 GB tier (#67), which is almost my number (45.08 GB, about 70.7% of RAM). STRATA_GLM_PIN_CAP_MB only lowers the cap for tests, so it can't raise it. So I think the limit comes from Windows or the NVIDIA driver, not from Maya's defaults.

Questions

  1. Is this the same limit as #67, and is there a known way to raise it on Windows (driver version, a setting, turning off HVCI/VBS, WDDM vs TCC)?
  2. Does a Linux install of the same PC get a larger tier on 64 GB?
  3. Would a smaller tier with larger DISK_SKIP-like options be the recommended way on 64 GB Windows systems?

I can run any test or send the full log (--report) if it helps.

Originally created by @Hosein20000 on GitHub (Oct 14, 2026). Original GitHub issue: https://github.com/mw00/project-maya/issues/185 **Setup** - Windows 11 Pro for Workstations, build 26200 - i5-13600KF, 64 GB DDR4 (63.8 GB total), ASUS TUF B660-PLUS WIFI D4 - RTX 3090 24 GB (1 GPU), CUDA 12.8 - Page file 64 GB (custom, X:), commit limit 128 GB - Virtualization-based security / HVCI is running - Model on NVMe (MSI Spatium M450, PCIe 4.0, DRAM-less) - Maya-S24 (IQ2_XXS_S), --max-context 32768, --kv-streaming on, --prefill auto **Problem** About 6.7-7 GB of RAM stays "Available" the whole time, while about a third of the experts are read from the SSD. Decode is ~8 tok/s with exact decoding (no DISK_SKIP). **What the log shows** glm fast: CUDA0 a pinning cap: 33.00 GB more pin, the RAM tier sized to it glm fast: CUDA0 RAM tier 45.08 GB pinned, 6768 slots glm fast: CUDA0 layers [0,45) expert pool 15.94 GB, 2408 slots total glm fast: CUDA0 tiers warm: 9042 experts (64.5 GB) in 46 s glm fast: CUDA0 CPU lane: 14 threads, an expert 0.249 ms on the CPU vs 0.315 ms over PCIe 9042 of the 13248 experts are held; the rest come from disk. **What I tried** - STRATA_GLM_RAM_GB=60 and 61: the tier is still 45.08 GB - STRATA_GLM_RAM_HEADROOM_GB=1, 2: no change in the tier size - Page file raised to 64 GB, Windows restarted: no change **What I found in the code** glm_fast_path.cu (pin_alloc / pin_room) measures a pinning cap at the first refused cudaHostAlloc and sizes the tier to it. A comment mentions a Windows laptop with 64 GB hitting the cap at a 45.3 GB tier (#67), which is almost my number (45.08 GB, about 70.7% of RAM). STRATA_GLM_PIN_CAP_MB only lowers the cap for tests, so it can't raise it. So I think the limit comes from Windows or the NVIDIA driver, not from Maya's defaults. **Questions** 1. Is this the same limit as #67, and is there a known way to raise it on Windows (driver version, a setting, turning off HVCI/VBS, WDDM vs TCC)? 2. Does a Linux install of the same PC get a larger tier on 64 GB? 3. Would a smaller tier with larger DISK_SKIP-like options be the recommended way on 64 GB Windows systems? I can run any test or send the full log (--report) if it helps.
Author
Owner

@technerd-official commented on GitHub (Oct 15, 2026):

Im on Windows 10 (i7-6700K, 64GB DDR4 RAM, RTX3090) Im getting 6 tok/s with Maya-S24 but I see in windows task-manager that only 39 GB out of my 64GB are used the rest is free. Why is that? The VRAM is used correctly 23.1GB out of 24GB. Any hints?

<!-- gh-comment-id:6181883036 --> @technerd-official commented on GitHub (Oct 15, 2026): Im on Windows 10 (i7-6700K, 64GB DDR4 RAM, RTX3090) Im getting 6 tok/s with Maya-S24 but I see in windows task-manager that only 39 GB out of my 64GB are used the rest is free. Why is that? The VRAM is used correctly 23.1GB out of 24GB. Any hints?
Author
Owner

@uvtzxpm commented on GitHub (Oct 15, 2026):

It's not something that can be fixed by any kind of setting on Windows on a 3090. It's not a problem on Linux, it will just work.

It's up to the project author if he wants to support Windows in this, by allocating memory differently (it seems complicated and the project is Linux focused mostly).

AI explanation:

The issue is that glm_fast_path.cu insists on storing its RAM-tier experts in GPU-mapped, page-locked memory (cudaHostAlloc), which the Windows WDDM driver strictly hard-caps to ~70% of physical RAM (~45 GB on a 64 GB machine) to protect kernel stability. Because the engine was ported from Linux—where nearly 100% of RAM can be pinned—it lacks a secondary tier for standard pageable memory and uses unbuffered Direct I/O (FILE_FLAG_NO_BUFFERING), which actively prevents Windows from using the remaining ~15 GB of free RAM as an OS file cache. As a result, rather than buffering the overflow experts in that empty system memory, the engine prematurely treats them as hard disk misses, forcing continuous NVMe reads that throttle generation performance from a potential 20+ tok/s down to 6–8 tok/s.

<!-- gh-comment-id:6182168071 --> @uvtzxpm commented on GitHub (Oct 15, 2026): It's not something that can be fixed by any kind of setting on Windows on a 3090. It's not a problem on Linux, it will just work. It's up to the project author if he wants to support Windows in this, by allocating memory differently (it seems complicated and the project is Linux focused mostly). AI explanation: > The issue is that glm_fast_path.cu insists on storing its RAM-tier experts in GPU-mapped, page-locked memory (cudaHostAlloc), which the Windows WDDM driver strictly hard-caps to ~70% of physical RAM (~45 GB on a 64 GB machine) to protect kernel stability. Because the engine was ported from Linux—where nearly 100% of RAM can be pinned—it lacks a secondary tier for standard pageable memory and uses unbuffered Direct I/O (FILE_FLAG_NO_BUFFERING), which actively prevents Windows from using the remaining ~15 GB of free RAM as an OS file cache. As a result, rather than buffering the overflow experts in that empty system memory, the engine prematurely treats them as hard disk misses, forcing continuous NVMe reads that throttle generation performance from a potential 20+ tok/s down to 6–8 tok/s.
Author
Owner

@hiroki-abe-58 commented on GitHub (Oct 15, 2026):

A data point from the other side of this question, with a small tool to separate the two possible causes.

Setup: Windows 11 build 26200, RTX 5090 (WDDM, driver 610.88), 63.4 GB RAM (4x16 GB), page file system-managed (~21-26 GB), VBS and HVCI running (as in the report above). Maya v1.1.11, Maya-S-v2-IQ2_XXS.

Pinning outside Maya. A 150-line CUDA program (tools/pin_probe, MIT) calls cudaHostAlloc(..., cudaHostAllocPortable) in chunks and prints RAM and commit before and at the end:

chunk pinned stopped by RAM available at end commit available (before -> end)
1 GiB 30.0 GB my --max-gb 30 16.7 GB 62.5 -> 32.2 GB
512 MiB 44.5 GB (70.2% of RAM) my --max-gb 44.5 2.1 GB 62.5 -> 17.6 GB
  • On this PC cudaHostAlloc was not refused at 44.5 GB (the ~45 GB / ~70% point of this issue and of #67). The probe stopped because free RAM was almost gone, so I cannot say whether a cap exists above 44.5 GB here.
  • Pinned memory was charged to the commit limit 1:1 (62.5 -> 17.6 GB available for 44.5 GB pinned), which agrees with Maya's start-up warning that a small page file caps the tier.

So "WDDM caps pinning at ~70% of RAM" does not look like a rule that holds on every Windows PC. It may still be what happens on the reporter's RTX 3090 (different GPU generation and driver; and their page file is 64 GB, so commit is not the limit there). The probe takes a few seconds and would tell the two cases apart on those PCs:

nvcc -O2 -arch=sm_86 -o pin_probe.exe pin_probe.cu     # sm_XX for your card
pin_probe.exe --max-gb 44 --chunk-mb 512               # keep --max-gb below your free RAM: it really pins

If stopped_by names a CUDA error while phys_avail_gb and commit_avail_gb are both still large, that is a driver refusal; if it runs to --max-gb, the limit is somewhere else (commit, or Maya's own sizing).

What I did not test: anything above 44.5 GB pinned, a 3090, other drivers, cudaHostRegister on this card (the tool has --mode register, I only ran alloc). For context, with the tier pinned to 26 GB here (the commit limit), 10 / 18 / 26 GB tiers gave 6.9 / 8.8 / 11.2 tokens/s on --bench (n=3 each, interleaved): https://github.com/hiroki-abe-58/moe-tiering-lab/blob/main/docs/findings.md

I am not proposing a code change from this; it is only meant to help narrow down where the limit sits.

<!-- gh-comment-id:6191964007 --> @hiroki-abe-58 commented on GitHub (Oct 15, 2026): A data point from the other side of this question, with a small tool to separate the two possible causes. **Setup:** Windows 11 build 26200, RTX 5090 (WDDM, driver 610.88), 63.4 GB RAM (4x16 GB), page file system-managed (~21-26 GB), **VBS and HVCI running** (as in the report above). Maya v1.1.11, Maya-S-v2-IQ2_XXS. **Pinning outside Maya.** A 150-line CUDA program ([`tools/pin_probe`](https://github.com/hiroki-abe-58/moe-tiering-lab/blob/main/tools/pin_probe/pin_probe.cu), MIT) calls `cudaHostAlloc(..., cudaHostAllocPortable)` in chunks and prints RAM and commit before and at the end: | chunk | pinned | stopped by | RAM available at end | commit available (before -> end) | |---|---|---|---|---| | 1 GiB | 30.0 GB | my `--max-gb 30` | 16.7 GB | 62.5 -> 32.2 GB | | 512 MiB | **44.5 GB (70.2% of RAM)** | my `--max-gb 44.5` | 2.1 GB | 62.5 -> 17.6 GB | - On this PC `cudaHostAlloc` was **not refused at 44.5 GB** (the ~45 GB / ~70% point of this issue and of #67). The probe stopped because free RAM was almost gone, so I cannot say whether a cap exists above 44.5 GB here. - Pinned memory was charged to the commit limit **1:1** (62.5 -> 17.6 GB available for 44.5 GB pinned), which agrees with Maya's start-up warning that a small page file caps the tier. So "WDDM caps pinning at ~70% of RAM" does not look like a rule that holds on every Windows PC. It may still be what happens on the reporter's RTX 3090 (different GPU generation and driver; and their page file is 64 GB, so commit is not the limit there). The probe takes a few seconds and would tell the two cases apart on those PCs: ``` nvcc -O2 -arch=sm_86 -o pin_probe.exe pin_probe.cu # sm_XX for your card pin_probe.exe --max-gb 44 --chunk-mb 512 # keep --max-gb below your free RAM: it really pins ``` If `stopped_by` names a CUDA error while `phys_avail_gb` and `commit_avail_gb` are both still large, that is a driver refusal; if it runs to `--max-gb`, the limit is somewhere else (commit, or Maya's own sizing). **What I did not test:** anything above 44.5 GB pinned, a 3090, other drivers, `cudaHostRegister` on this card (the tool has `--mode register`, I only ran `alloc`). For context, with the tier pinned to 26 GB here (the commit limit), 10 / 18 / 26 GB tiers gave 6.9 / 8.8 / 11.2 tokens/s on `--bench` (n=3 each, interleaved): https://github.com/hiroki-abe-58/moe-tiering-lab/blob/main/docs/findings.md I am not proposing a code change from this; it is only meant to help narrow down where the limit sits.
Author
Owner

@hiroki-abe-58 commented on GitHub (Oct 15, 2026):

Follow-up to my earlier comment with the part I could not do then: what a bigger RAM tier is worth, and what limited it on my PC.

Setup: RTX 5090 (32 GB, driver 610.88, WDDM), Core Ultra 9 285K, 64 GB DDR5, Windows 11 26200 with VBS/HVCI on, Maya v1.1.11, Maya-S-v2-IQ2_XXS, 32K context, STRATA_GLM_RAM_GB pinned per arm, 3 interleaved rounds per arm, greedy.

What limited the tier here: the commit limit, not a refusal by the driver. Before: system-managed page file (~21-26 GB), commit limit ~84-90 GB, and Maya's start-up line said the commit limit capped the tier 17 GB below free RAM (my pin_probe also showed pinned memory is charged 1:1 to commit). After: a fixed 48 GiB page file (commit limit 111.4 GB), one reboot.

STRATA_GLM_RAM_GB pinned by the engine decode tok/s (median of 3) vs 26 GB disk ms/token lowest free RAM
26 25.99 GB 11.66 - 49.2 26.2 GB
32 32.0 GB 13.76 +17.9% 36.1 20.1 GB
38 38.0 GB 16.70 +43.2% 23.9 14.1 GB
42 41.99 GB 18.80 +61.2% 17.6 10.1 GB

Spread inside each arm was <= ~1%. The VRAM hit rate stayed at ~65% in all arms; the gain is fewer SSD waits per token (24 -> 13) and shorter ones (2.03 -> 1.33 ms). The engine pinned 42 GB without any refusal (VBS/HVCI on).

What this does and does not show:

  • On this PC a 70%-of-RAM cap (44.4 GB) did not appear up to 42 GB in the engine and 44.5 GB in pin_probe; I stopped there because free RAM was down to 2-10 GB. I did not test above that, so I cannot say whether a driver cap exists above 44.5 GB on this card, and this says nothing about the RTX 3090 / the driver in your report.
  • It does suggest that on Windows a tier that stops near 70% of RAM is worth checking against the commit limit first (pin_probe prints both).

One side finding that may matter for anyone comparing runs: with the default CPU lane, greedy output depends on the RAM tier size (tier 26 and 42 diverge within the first ~200 tokens), because the CPU path and the GPU path of an expert differ at quantisation level (relative L2 error against a double-precision reference on one calibration expert, from STRATA_GLM_CPU_LANE_CHECK=1: GPU 1.63%, CPU lane 2.89%). With STRATA_GLM_CPU_LANE=0 tier 26 and 42 gave bit-identical tokens on 6/6 prompts (also with STRATA_GLM_MTP_DECODE=1), at -4% (tier 26) / -10% (tier 42) decode. A 42-task graded quality check showed no difference (39/42 vs 40/42), but that is too small to detect a small one. I did not compare logits at the divergence points.

Scripts, raw token ids and the exact commands are in https://github.com/hiroki-abe-58/moe-tiering-lab (v0.2.0; results/phase2/exp4-summary.md, results/phase3/exp5-determinism/SUMMARY.md). One PC, one model; no claim about other hardware.

<!-- gh-comment-id:6199150059 --> @hiroki-abe-58 commented on GitHub (Oct 15, 2026): Follow-up to [my earlier comment](https://github.com/mw00/project-maya/issues/185#issuecomment-6191964007) with the part I could not do then: what a bigger RAM tier is worth, and what limited it on my PC. **Setup:** RTX 5090 (32 GB, driver 610.88, WDDM), Core Ultra 9 285K, 64 GB DDR5, Windows 11 26200 with VBS/HVCI on, Maya v1.1.11, Maya-S-v2-IQ2_XXS, 32K context, `STRATA_GLM_RAM_GB` pinned per arm, 3 interleaved rounds per arm, greedy. **What limited the tier here:** the commit limit, not a refusal by the driver. Before: system-managed page file (~21-26 GB), commit limit ~84-90 GB, and Maya's start-up line said the commit limit capped the tier 17 GB below free RAM (my `pin_probe` also showed pinned memory is charged 1:1 to commit). After: a fixed 48 GiB page file (commit limit 111.4 GB), one reboot. | `STRATA_GLM_RAM_GB` | pinned by the engine | decode tok/s (median of 3) | vs 26 GB | disk ms/token | lowest free RAM | |---|---|---|---|---|---| | 26 | 25.99 GB | 11.66 | - | 49.2 | 26.2 GB | | 32 | 32.0 GB | 13.76 | +17.9% | 36.1 | 20.1 GB | | 38 | 38.0 GB | 16.70 | +43.2% | 23.9 | 14.1 GB | | 42 | 41.99 GB | 18.80 | +61.2% | 17.6 | 10.1 GB | Spread inside each arm was <= ~1%. The VRAM hit rate stayed at ~65% in all arms; the gain is fewer SSD waits per token (24 -> 13) and shorter ones (2.03 -> 1.33 ms). The engine pinned 42 GB without any refusal (VBS/HVCI on). **What this does and does not show:** - On this PC a 70%-of-RAM cap (44.4 GB) did not appear up to 42 GB in the engine and 44.5 GB in `pin_probe`; I stopped there because free RAM was down to 2-10 GB. I did not test above that, so I cannot say whether a driver cap exists above 44.5 GB on this card, and this says nothing about the RTX 3090 / the driver in your report. - It does suggest that on Windows a tier that stops near 70% of RAM is worth checking against the commit limit first (`pin_probe` prints both). **One side finding that may matter for anyone comparing runs:** with the default CPU lane, greedy output depends on the RAM tier size (tier 26 and 42 diverge within the first ~200 tokens), because the CPU path and the GPU path of an expert differ at quantisation level (relative L2 error against a double-precision reference on one calibration expert, from `STRATA_GLM_CPU_LANE_CHECK=1`: GPU 1.63%, CPU lane 2.89%). With `STRATA_GLM_CPU_LANE=0` tier 26 and 42 gave bit-identical tokens on 6/6 prompts (also with `STRATA_GLM_MTP_DECODE=1`), at -4% (tier 26) / -10% (tier 42) decode. A 42-task graded quality check showed no difference (39/42 vs 40/42), but that is too small to detect a small one. I did not compare logits at the divergence points. Scripts, raw token ids and the exact commands are in https://github.com/hiroki-abe-58/moe-tiering-lab (v0.2.0; `results/phase2/exp4-summary.md`, `results/phase3/exp5-determinism/SUMMARY.md`). One PC, one model; no claim about other hardware.
Sign in to join this conversation.
No labels
pull-request
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
mw00/project-maya#71
No description provided.