[GH-ISSUE #207] project Maya - Windows - RAM usage 39GB out of 64GB for Experts 🙈 #79

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

Originally created by @technerd-official on GitHub (Oct 15, 2026).
Original GitHub issue: https://github.com/mw00/project-maya/issues/207

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 for the experts, the rest is untouched. Why is that? The VRAM is used correctly 23.1GB out of 24GB. Any hints? Tried also modifying pagefile etc. but still it wont get past 39GB of usage.

Installed project Maya under Linux and did the same test, here it uses 58GB out of 64GB and it is considerably faster with 11 tok/s because of using more system RAM.

Windows: RAM usage 39GB out of 64GB = 6 tok/s
Linux: RAM usage 58GB out of 64GB = 11 tok/s

Originally created by @technerd-official on GitHub (Oct 15, 2026). Original GitHub issue: https://github.com/mw00/project-maya/issues/207 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 for the experts, the rest is untouched. Why is that? The VRAM is used correctly 23.1GB out of 24GB. Any hints? Tried also modifying pagefile etc. but still it wont get past 39GB of usage. Installed project Maya under Linux and did the same test, here it uses 58GB out of 64GB and it is considerably faster with 11 tok/s because of using more system RAM. Windows: RAM usage 39GB out of 64GB = 6 tok/s Linux: RAM usage 58GB out of 64GB = 11 tok/s
Author
Owner

@mw00 commented on GitHub (Oct 16, 2026):

On Windows the RAM tier is pinned memory, and two things can stop it below your free RAM: the commit limit (RAM + page file), which Windows charges pinned memory to, and a cap on how much one process may pin. The engine says which one it hit at start - look in the engine log for glm fast: WARNING - Windows' commit limit (RAM + page file) caps the RAM tier ... or glm fast: CUDA0 a pinning cap: ....

You mention trying the page file already. If it is the commit limit, the setup prints the size it needs (Windows' page file is ... GB; set it to at least ... GB); a fixed page file of that size and a restart should let the tier grow. In #185, @hiroki-abe-58 found the commit limit was what capped the tier on their PC, and a 42 GB tier instead of 26 GB gave +61% decode. If it is the pinning cap, that is the limit discussed in #185 and #147.

Either way, could you post the engine log's glm fast: lines? They tell the two apart.

<!-- gh-comment-id:6209703124 --> @mw00 commented on GitHub (Oct 16, 2026): On Windows the RAM tier is pinned memory, and two things can stop it below your free RAM: the commit limit (RAM + page file), which Windows charges pinned memory to, and a cap on how much one process may pin. The engine says which one it hit at start - look in the engine log for `glm fast: WARNING - Windows' commit limit (RAM + page file) caps the RAM tier ...` or `glm fast: CUDA0 a pinning cap: ...`. You mention trying the page file already. If it is the commit limit, the setup prints the size it needs (`Windows' page file is ... GB; set it to at least ... GB`); a fixed page file of that size and a restart should let the tier grow. In #185, @hiroki-abe-58 found the commit limit was what capped the tier on their PC, and a 42 GB tier instead of 26 GB gave +61% decode. If it is the pinning cap, that is the limit discussed in #185 and #147. Either way, could you post the engine log's `glm fast:` lines? They tell the two apart.
Author
Owner

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

I set my page file (Initial: 32 GB, Max: 64 GB) and rebooted. The log shows CUDA/Windows imposing a hard pinning cap of 19.00 GB (CUDA0 a pinning cap: 19.00 GB more pin, the RAM tier sized to it), which forces the RAM tier to cap at 28.83 GB (4305 slots).
Because only 56% of expert bytes are held pinned in RAM, the engine falls back to NVMe SSD reads for the rest (disk 40.91 reads/tok in 26.99 waits/tok, 120.37 ms/tok), accounting for over 60% of the token decode latency (203.22 ms/tok / 4.92 tok/s).

--
glm fast: CUDA0 VRAM before the expert pool: 7.42 of 24.00 GB in use - dense weights 5.24, state/KV (65536 ctx) 0.66, activations 0.06, other (context, MTP, scratch, prompt path) 1.46
glm fast: the expert profile M:\Temp\project-maya\data\expert-profile-glm.bin ranks 13248 (layer, expert) pairs
glm fast: CUDA0 layers [0,45) expert pool 15.89 GB, 50-77 slots/layer (2401 total)
glm fast: CUDA0 a pinning cap: 19.00 GB more pin, the RAM tier sized to it
glm fast: CUDA0 RAM tier 28.83 GB pinned, 4305 slots
glm prefill: CUDA0 56% of the experts' bytes are held pinned: the pool lends at most 85% of its slots
glm fast: CUDA0 warming the expert tiers 10% (4.8 of 47.1 GB, 2 s)
glm fast: CUDA0 warming the expert tiers 20% (9.5 of 47.1 GB, 4 s)
glm fast: CUDA0 warming the expert tiers 30% (14.2 of 47.1 GB, 6 s)
glm fast: CUDA0 warming the expert tiers 40% (18.8 of 47.1 GB, 8 s)
glm fast: CUDA0 warming the expert tiers 50% (23.5 of 47.1 GB, 10 s)
glm fast: CUDA0 warming the expert tiers 60% (28.3 of 47.1 GB, 12 s)
glm fast: CUDA0 warming the expert tiers 70% (33.0 of 47.1 GB, 14 s)
glm fast: CUDA0 warming the expert tiers 80% (37.7 of 47.1 GB, 16 s)
glm fast: CUDA0 warming the expert tiers 90% (42.4 of 47.1 GB, 18 s)
glm fast: CUDA0 warming the expert tiers 100% (47.1 of 47.1 GB, 19 s)
glm fast: CUDA0 tiers warm: 6572 experts (47.1 GB) in 19 s (2.41 GB/s)
glm fast: CUDA0 CPU lane: 4 threads, an expert 0.993 ms on the CPU vs 0.599 ms over PCIe -> of 0..8 RAM-tier experts the CPU takes 0 0 1 1 1 2 2 2 3
maya serve: CUDA0: 701 MiB of VRAM free with everything loaded
maya generate: glm5-next serve (M3.1): GEN <max_new> [keys] , GENI <max_new> [keys] ; QUIT to end
glm_batch: CUDA0 prompt attention on the tensor cores (mma.sync, 32 heads a block)
glm stat: decode 203.22 ms/tok (4.92 tok/s) | vram hit 62.80% | ram fetches 53.94/tok | disk 40.91 reads/tok in 26.99 waits/tok, 120.37 ms/tok | promotions 56.85/tok | cpu lane 24.56/tok in 28.09 ms/tok | prompt 8.7 ms/tok | vram 2345/2401 ram 4219/4305
glm kv: KV streaming: 98.97% of 727584 block reads hit VRAM, 29.4 MiB read from RAM

<!-- gh-comment-id:6216780830 --> @technerd-official commented on GitHub (Oct 16, 2026): I set my page file (Initial: 32 GB, Max: 64 GB) and rebooted. The log shows CUDA/Windows imposing a hard pinning cap of 19.00 GB (CUDA0 a pinning cap: 19.00 GB more pin, the RAM tier sized to it), which forces the RAM tier to cap at 28.83 GB (4305 slots). Because only 56% of expert bytes are held pinned in RAM, the engine falls back to NVMe SSD reads for the rest (disk 40.91 reads/tok in 26.99 waits/tok, 120.37 ms/tok), accounting for over 60% of the token decode latency (203.22 ms/tok / 4.92 tok/s). -- glm fast: CUDA0 VRAM before the expert pool: 7.42 of 24.00 GB in use - dense weights 5.24, state/KV (65536 ctx) 0.66, activations 0.06, other (context, MTP, scratch, prompt path) 1.46 glm fast: the expert profile M:\Temp\project-maya\data\expert-profile-glm.bin ranks 13248 (layer, expert) pairs glm fast: CUDA0 layers [0,45) expert pool 15.89 GB, 50-77 slots/layer (2401 total) glm fast: CUDA0 a pinning cap: 19.00 GB more pin, the RAM tier sized to it glm fast: CUDA0 RAM tier 28.83 GB pinned, 4305 slots glm prefill: CUDA0 56% of the experts' bytes are held pinned: the pool lends at most 85% of its slots glm fast: CUDA0 warming the expert tiers 10% (4.8 of 47.1 GB, 2 s) glm fast: CUDA0 warming the expert tiers 20% (9.5 of 47.1 GB, 4 s) glm fast: CUDA0 warming the expert tiers 30% (14.2 of 47.1 GB, 6 s) glm fast: CUDA0 warming the expert tiers 40% (18.8 of 47.1 GB, 8 s) glm fast: CUDA0 warming the expert tiers 50% (23.5 of 47.1 GB, 10 s) glm fast: CUDA0 warming the expert tiers 60% (28.3 of 47.1 GB, 12 s) glm fast: CUDA0 warming the expert tiers 70% (33.0 of 47.1 GB, 14 s) glm fast: CUDA0 warming the expert tiers 80% (37.7 of 47.1 GB, 16 s) glm fast: CUDA0 warming the expert tiers 90% (42.4 of 47.1 GB, 18 s) glm fast: CUDA0 warming the expert tiers 100% (47.1 of 47.1 GB, 19 s) glm fast: CUDA0 tiers warm: 6572 experts (47.1 GB) in 19 s (2.41 GB/s) glm fast: CUDA0 CPU lane: 4 threads, an expert 0.993 ms on the CPU vs 0.599 ms over PCIe -> of 0..8 RAM-tier experts the CPU takes 0 0 1 1 1 2 2 2 3 maya serve: CUDA0: 701 MiB of VRAM free with everything loaded maya generate: glm5-next serve (M3.1): GEN <max_new> [keys] <ids>, GENI <max_new> [keys] <embeddings> <ids>; QUIT to end glm_batch: CUDA0 prompt attention on the tensor cores (mma.sync, 32 heads a block) glm stat: decode 203.22 ms/tok (4.92 tok/s) | vram hit 62.80% | ram fetches 53.94/tok | disk 40.91 reads/tok in 26.99 waits/tok, 120.37 ms/tok | promotions 56.85/tok | cpu lane 24.56/tok in 28.09 ms/tok | prompt 8.7 ms/tok | vram 2345/2401 ram 4219/4305 glm kv: KV streaming: 98.97% of 727584 block reads hit VRAM, 29.4 MiB read from RAM
Author
Owner

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

Thanks for posting the detailed logs. This is an interesting contrast with my findings in #185.

On my Windows 11 / RTX 5090 / 64 GB RAM system, increasing the pagefile removed the commit-limit bottleneck and allowed a 42 GB RAM tier, improving decode throughput by 61% (11.7 → 18.8 tok/s).

In your case, increasing the pagefile did not resolve the reported pinning cap. The 120.37 ms/token of SSD wait time also suggests that the limited RAM tier is a major performance bottleneck.

One thing I’d like to investigate is whether the reported 19.00 GB more pin reflects a fixed CUDA/Windows limit or a limit derived from the memory already pinned or otherwise reserved by the process.

Would you be able to share your NVIDIA driver version and Windows commit charge/limit after reboot?

@mw00, I have been investigating Windows RAM-tier sizing and performance in moe-tiering-lab.

If useful, I’d be happy to investigate this further and submit a focused PR to improve the startup diagnostics, particularly distinguishing Windows commit-limit constraints from CUDA pinning constraints and reporting how the effective RAM-tier limit was determined.

I’d prefer to validate the underlying cause before proposing any change to the allocation logic.

<!-- gh-comment-id:6221923762 --> @hiroki-abe-58 commented on GitHub (Oct 16, 2026): Thanks for posting the detailed logs. This is an interesting contrast with my findings in #185. On my Windows 11 / RTX 5090 / 64 GB RAM system, increasing the pagefile removed the commit-limit bottleneck and allowed a 42 GB RAM tier, improving decode throughput by 61% (11.7 → 18.8 tok/s). In your case, increasing the pagefile did not resolve the reported pinning cap. The 120.37 ms/token of SSD wait time also suggests that the limited RAM tier is a major performance bottleneck. One thing I’d like to investigate is whether the reported 19.00 GB more pin reflects a fixed CUDA/Windows limit or a limit derived from the memory already pinned or otherwise reserved by the process. Would you be able to share your NVIDIA driver version and Windows commit charge/limit after reboot? @mw00, I have been investigating Windows RAM-tier sizing and performance in moe-tiering-lab. If useful, I’d be happy to investigate this further and submit a focused PR to improve the startup diagnostics, particularly distinguishing Windows commit-limit constraints from CUDA pinning constraints and reporting how the effective RAM-tier limit was determined. I’d prefer to validate the underlying cause before proposing any change to the allocation logic.
Author
Owner

@erratir commented on GitHub (Oct 20, 2026):

Another data point on the Windows pinning cap — and probe measurements showing it is a
per-process limit of about half the physical RAM, not commit and not free RAM.

Environment

  • Windows 10 Pro 19045, RTX 3090 24 GB, driver 617.42 (driver API 13040), CUDA 12.8
  • Maya v1.1.17 (8d9a9b5), GLM-5.3-Flash Maya-S24, 32K context, MTP draft
  • Xeon E5-2683 v4, 128 GB RAM; page file first 24 GB, then a fixed 64 GB + reboot
    (no change in any of the numbers below)

Symptom (identical across clean starts and both page files):
glm fast: CUDA0 a pinning cap: 47.00 GB more pin, the RAM tier sized to it
glm fast: CUDA0 RAM tier 61.49 GB pinned, 9256 slots
~866 experts stay disk-only; decode 13.3–13.7 tok/s with disk 1.6–2.0 reads/tok (~11 ms/tok).
The issue-#20 commit warning never prints (availPageFile ≥ availPhys), so commit is not
the binder. No STRATA_GLM_PIN_CAP_MB / RAM_GB set.

Standalone probe (pinned cudaHostAlloc in 1 GB chunks until refusal):

  • Idle box, engine stopped — phys avail 115.3 GB, commit 15.7/191.8 GB:
    refused at 63 GB with 58.7 GB still physically free. A single 80 GB
    cudaHostAlloc (Default and Portable) both fail with "out of memory".
  • Engine running (its 61.5 GB tier held): a second process pinned 50 GB more,
    stopping only at physical exhaustion (avail 1.4 GB) → the budget is per-process,
    not system-wide.
  • VirtualAlloc + cudaHostRegister(Portable|Mapped): 1 GB and 45 GB register fine
    (a D2H copy through the registered region verified), 90 GB is refused → the same
    budget. cudaDevAttrCanUseHostPointerForRegisteredMem = 0 on this setup.

Reading: the WDDM driver page-locks at most ≈ half the physical RAM per process on
this machine (63 of 127.8 GB), independently of commit, page file and free RAM. The
tier would need ~72 GB for all experts, so "everything in RAM" is unreachable here
whatever the settings — the engine already sits at the cap (61.5 ≈ 63 minus staging).

Is a driver version known where this per-process pin budget is higher? I can test
candidates and report the probe numbers. Full maya-report.txt and probe source
available.

upd:

  • Driver 596.36 Studio (driver API 13020): the identical 63.00 GB cap —
    the limit looks Windows-side (WDDM), not driver-branch-specific.
<!-- gh-comment-id:6291685682 --> @erratir commented on GitHub (Oct 20, 2026): Another data point on the Windows pinning cap — and probe measurements showing it is a per-process limit of about half the physical RAM, not commit and not free RAM. **Environment** - Windows 10 Pro 19045, RTX 3090 24 GB, driver 617.42 (driver API 13040), CUDA 12.8 - Maya v1.1.17 (8d9a9b5), GLM-5.3-Flash Maya-S24, 32K context, MTP draft - Xeon E5-2683 v4, 128 GB RAM; page file first 24 GB, then a fixed 64 GB + reboot (no change in any of the numbers below) **Symptom** (identical across clean starts and both page files): `glm fast: CUDA0 a pinning cap: 47.00 GB more pin, the RAM tier sized to it` `glm fast: CUDA0 RAM tier 61.49 GB pinned, 9256 slots` ~866 experts stay disk-only; decode 13.3–13.7 tok/s with disk 1.6–2.0 reads/tok (~11 ms/tok). The issue-#20 commit warning never prints (availPageFile ≥ availPhys), so commit is not the binder. No STRATA_GLM_PIN_CAP_MB / RAM_GB set. **Standalone probe** (pinned `cudaHostAlloc` in 1 GB chunks until refusal): - Idle box, engine stopped — phys avail 115.3 GB, commit 15.7/191.8 GB: refused at **63 GB with 58.7 GB still physically free**. A single 80 GB cudaHostAlloc (Default and Portable) both fail with "out of memory". - Engine running (its 61.5 GB tier held): a **second process pinned 50 GB more**, stopping only at physical exhaustion (avail 1.4 GB) → the budget is per-process, not system-wide. - `VirtualAlloc` + `cudaHostRegister(Portable|Mapped)`: 1 GB and 45 GB register fine (a D2H copy through the registered region verified), 90 GB is refused → the same budget. `cudaDevAttrCanUseHostPointerForRegisteredMem` = 0 on this setup. **Reading**: the WDDM driver page-locks at most ≈ half the physical RAM per process on this machine (63 of 127.8 GB), independently of commit, page file and free RAM. The tier would need ~72 GB for all experts, so "everything in RAM" is unreachable here whatever the settings — the engine already sits at the cap (61.5 ≈ 63 minus staging). Is a driver version known where this per-process pin budget is higher? I can test candidates and report the probe numbers. Full `maya-report.txt` and probe source available. upd: - Driver 596.36 Studio (driver API 13020): the identical 63.00 GB cap — the limit looks Windows-side (WDDM), not driver-branch-specific.
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#79
No description provided.