[PR #112] [MERGED] Windows: log which NUMA node the RAM tier landed on at start (#56) #346

Closed
opened 2026-10-29 21:24:28 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/mw00/project-maya/pull/112
Author: @noahark
Created: 10/11/2026
Status: ✅ Merged
Merged: 10/12/2026
Merged by: @mw00

Base: main ← Head: win-tier-diag


📝 Commits (1)

  • 9917eee Windows: log which NUMA node the RAM tier landed on at start

📊 Changes

1 file changed (+63 additions, -47 deletions)

View changed files

📝 src/core/glm_fast_path.cu (+63 -47)

📄 Description

One diagnostic log line for #56's Windows restart variance, zero behavior change.

What this adds: at start the engine samples the RAM tier's committed pages (K32QueryWorkingSetEx, ~512 samples per class arena, majority node) and logs, e.g.

glm fast: CUDA0 the RAM tier sits on node 0 of 2 seen

Why: on a 2-socket Windows host the cudaHostAlloc tier lands on one side or the other as a start-to-start lottery, and the side it draws sets the whole run's decode. The evidence from this box (dual E5-2696 v3, one V100-PCIE-32GB, Maya-S-v2-IQ2_XXS, v1.0.33):

  • Ten scanned starts, every one on the predicted side: the tier at 82%/18% around node 0 decodes at 0.73 ms a CPU-lane expert (17.4 tok/s), at 15%/85% at 0.85-0.88 ms (13.6 tok/s) - the #56 gap in full.
  • Plain CPU reads are symmetric (single-thread 3.4 vs 3.9 GB/s, 18-thread 12.2 vs 12.9), so it is not the lane's threads: pinning the 18 pool threads onto the tier's node does not rescue a slow start (tried in a local build).
  • What does differ is the GPU's fetch path: cudaMemcpy H2D from pinned memory is 11.0 GB/s from node 0 (the card's PCIe side) against 9.5 GB/s from node 1 - every RAM-tier fetch and promotion crosses the socket link when the tier draws the far side.
  • The tier (66.4 GB) is larger than a node (64 GB), so both sides always hold a share and the fast split is already near node 0's ceiling; the lottery is only about which side takes the majority.

Windows offers no way to place a range this size from user space (VirtualAllocExNuma honors its node only for fresh whole allocations - which a tier larger than a node cannot have; committing a reserved range ignores the node; page placement ignores the touching thread - all three measured in the #56 thread), so the engine cannot fix the draw today. What it can do is show it: the log line tells a Windows user which mode a start drew, and a launcher can restart on it - that holds decode at the fast mode on every start here.

Notes for reviewers:

  • cudaDevAttrHostNumaId would let the line say "the far side of the GPU" outright, but it is not supported on this Volta + 582.78 driver (the attribute query fails), so the line stays node-only. The probe is Windows-only (#ifdef _WIN32), costs ~512 page queries once at start, and is silent (no line) when the working-set query is unavailable or the arenas disagree.
  • The scan tool behind the numbers (a small standalone .cs reading the same API, plus per-node DMA/CPU bandwidth probes) is happy to be handed over if useful for a tools/ diagnostic.
  • A real fix likely wants engine-side knowledge of the GPU's PCIe node (an arena split deliberately lopsided toward it, in the spirit of the class arenas); happy to test any candidate on this box - it reproduces the lottery on demand.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/mw00/project-maya/pull/112 **Author:** [@noahark](https://github.com/noahark) **Created:** 10/11/2026 **Status:** ✅ Merged **Merged:** 10/12/2026 **Merged by:** [@mw00](https://github.com/mw00) **Base:** `main` ← **Head:** `win-tier-diag` --- ### 📝 Commits (1) - [`9917eee`](https://github.com/mw00/project-maya/commit/9917eeea537a35200c8d5c6bfddde5d3391499f1) Windows: log which NUMA node the RAM tier landed on at start ### 📊 Changes **1 file changed** (+63 additions, -47 deletions) <details> <summary>View changed files</summary> 📝 `src/core/glm_fast_path.cu` (+63 -47) </details> ### 📄 Description One diagnostic log line for #56's Windows restart variance, zero behavior change. **What this adds**: at start the engine samples the RAM tier's committed pages (`K32QueryWorkingSetEx`, ~512 samples per class arena, majority node) and logs, e.g. ``` glm fast: CUDA0 the RAM tier sits on node 0 of 2 seen ``` **Why**: on a 2-socket Windows host the `cudaHostAlloc` tier lands on one side or the other as a start-to-start lottery, and the side it draws sets the whole run's decode. The evidence from this box (dual E5-2696 v3, one V100-PCIE-32GB, Maya-S-v2-IQ2_XXS, v1.0.33): - Ten scanned starts, every one on the predicted side: the tier at **82%/18%** around node 0 decodes at **0.73 ms** a CPU-lane expert (17.4 tok/s), at **15%/85%** at **0.85-0.88 ms** (13.6 tok/s) - the #56 gap in full. - Plain CPU reads are symmetric (single-thread 3.4 vs 3.9 GB/s, 18-thread 12.2 vs 12.9), so it is not the lane's threads: pinning the 18 pool threads onto the tier's node does not rescue a slow start (tried in a local build). - What does differ is the GPU's fetch path: `cudaMemcpy` H2D from pinned memory is **11.0 GB/s from node 0** (the card's PCIe side) **against 9.5 GB/s from node 1** - every RAM-tier fetch and promotion crosses the socket link when the tier draws the far side. - The tier (66.4 GB) is larger than a node (64 GB), so both sides always hold a share and the fast split is already near node 0's ceiling; the lottery is only about which side takes the majority. Windows offers no way to place a range this size from user space (`VirtualAllocExNuma` honors its node only for fresh whole allocations - which a tier larger than a node cannot have; committing a reserved range ignores the node; page placement ignores the touching thread - all three measured in the #56 thread), so the engine cannot fix the draw today. What it can do is show it: the log line tells a Windows user which mode a start drew, and a launcher can restart on it - that holds decode at the fast mode on every start here. Notes for reviewers: - `cudaDevAttrHostNumaId` would let the line say "the far side of the GPU" outright, but it is not supported on this Volta + 582.78 driver (the attribute query fails), so the line stays node-only. The probe is Windows-only (`#ifdef _WIN32`), costs ~512 page queries once at start, and is silent (no line) when the working-set query is unavailable or the arenas disagree. - The scan tool behind the numbers (a small standalone .cs reading the same API, plus per-node DMA/CPU bandwidth probes) is happy to be handed over if useful for a `tools/` diagnostic. - A real fix likely wants engine-side knowledge of the GPU's PCIe node (an arena split deliberately lopsided toward it, in the spirit of the class arenas); happy to test any candidate on this box - it reproduces the lottery on demand. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-29 21:24:28 +07:00
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#346
No description provided.