[PR #390] [MERGED] docs: GLM's CPU lane shares the engine's CPUs with the decode and tier threads - give it enough of them #508

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

📋 Pull Request Information

Original PR: https://github.com/mw00/project-maya/pull/390
Author: @somnergy
Created: 10/22/2026
Status: ✅ Merged
Merged: 10/23/2026
Merged by: @mw00

Base: main ← Head: pr/docs-glm-cpu-lane-cores


📝 Commits (1)

  • c99e8d8 docs: GLM's CPU lane shares the engine's CPUs with the decode and tier threads - give it enough of them

📊 Changes

1 file changed (+10 additions, -0 deletions)

View changed files

📝 docs/SETTINGS.md (+10 -0)

📄 Description

Summary

Docs only: one paragraph in docs/SETTINGS.md, next to the tuning section. The GLM CPU lane's threads share the engine's CPUs with the thread that issues every decode step and the tiers' service threads, which are busy most of the time while experts sit in RAM. The default lane size leaves a third of the cores free only when the engine may use every CPU of a host without SMT (cores >= hardware_concurrency() in fast_cpu_lane_setup); confined to fewer CPUs (taskset, a container's cpuset), the lane takes every core it may use and a decode step waits for a time slice. #359 makes the same point for DeepSeek's lane.

Why

Measured under several concurrent Claude Code sessions (agentic coding: long multi-turn conversations, subagents, tool calls) through the Anthropic Messages API with --parallel 8, Maya-L with ~85% of its experts in VRAM:

  • Confined to 8 performance cores, a 4-row decode step on the first GPU took 31.0 ms against 17.3 ms with every expert in VRAM; 11.2 ms of the 13.7 ms difference was waiting for RAM-tier experts (8.0 ms CPU lane, 3.3 ms PCIe), the lane's part with a 2-5 ms tail of scheduling delays; the engine used 790-800% of its 8 CPUs.

Measured

Hardware: 2x NVIDIA RTX PRO 5000 Blackwell 72 GB, each on PCIe 5.0 x8; Intel Core Ultra 9 285K (8 P + 16 E cores, no SMT, no AVX-512); 96 GB DDR5; driver 615.71.09, CUDA 13.4. Model: Maya-L (IQ3_S / IQ4_XS experts), ~85% in VRAM, the rest pinned in RAM.

engine's CPUs lane threads a GPU an expert on the lane (start-up measure) lane workers waiting for a CPU decode per request
8 P-cores 4 0.33-0.36 ms 0.1-15% (24-31% in a profiled capture) 13.2 tok/s at ~6.7 running
8 P + 8 E 8 0.18-0.21 ms 0-0.2% on P-cores, 1-12% on E-cores 17.3 tok/s at 64-128K, ~7 running
all 24 8 0.19-0.23 ms not measured 17.2 tok/s at 64-128K, 8 running

The 8-core row's decode is not an isolated comparison (other settings changed with the CPUs); the 16- and 24-CPU rows ran the same settings and decoded the same per request.

Recommendation

With experts in RAM, give the engine all the CPUs you can - on a hybrid CPU the efficiency cores too, not the performance cores alone (an E-core computes an expert more slowly, ~0.24 ms here, but a lane that waits for a core is slower still). Where it must stay confined, set MAYA_GLM_CPU_LANE (or MAYA_GLM_CPU_LANE<n>) lower so a few of its cores stay free. With every expert in VRAM the lane has nothing to compute and this does not matter.

How it was verified

Docs only; the rule it describes is fast_cpu_lane_setup in src/core/glm_fast_path.cu on main.


🔄 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/390 **Author:** [@somnergy](https://github.com/somnergy) **Created:** 10/22/2026 **Status:** ✅ Merged **Merged:** 10/23/2026 **Merged by:** [@mw00](https://github.com/mw00) **Base:** `main` ← **Head:** `pr/docs-glm-cpu-lane-cores` --- ### 📝 Commits (1) - [`c99e8d8`](https://github.com/mw00/project-maya/commit/c99e8d8e0379ba666f2b873e67667eeb4274a525) docs: GLM's CPU lane shares the engine's CPUs with the decode and tier threads - give it enough of them ### 📊 Changes **1 file changed** (+10 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `docs/SETTINGS.md` (+10 -0) </details> ### 📄 Description ## Summary Docs only: one paragraph in `docs/SETTINGS.md`, next to the tuning section. The GLM CPU lane's threads share the engine's CPUs with the thread that issues every decode step and the tiers' service threads, which are busy most of the time while experts sit in RAM. The default lane size leaves a third of the cores free only when the engine may use every CPU of a host without SMT (`cores >= hardware_concurrency()` in `fast_cpu_lane_setup`); confined to fewer CPUs (`taskset`, a container's cpuset), the lane takes every core it may use and a decode step waits for a time slice. #359 makes the same point for DeepSeek's lane. ## Why Measured under several concurrent Claude Code sessions (agentic coding: long multi-turn conversations, subagents, tool calls) through the Anthropic Messages API with `--parallel 8`, Maya-L with ~85% of its experts in VRAM: - Confined to 8 performance cores, a 4-row decode step on the first GPU took 31.0 ms against 17.3 ms with every expert in VRAM; 11.2 ms of the 13.7 ms difference was waiting for RAM-tier experts (8.0 ms CPU lane, 3.3 ms PCIe), the lane's part with a 2-5 ms tail of scheduling delays; the engine used 790-800% of its 8 CPUs. ## Measured Hardware: 2x NVIDIA RTX PRO 5000 Blackwell 72 GB, each on PCIe 5.0 x8; Intel Core Ultra 9 285K (8 P + 16 E cores, no SMT, no AVX-512); 96 GB DDR5; driver 615.71.09, CUDA 13.4. Model: Maya-L (IQ3_S / IQ4_XS experts), ~85% in VRAM, the rest pinned in RAM. | engine's CPUs | lane threads a GPU | an expert on the lane (start-up measure) | lane workers waiting for a CPU | decode per request | |---|---|---|---|---| | 8 P-cores | 4 | 0.33-0.36 ms | 0.1-15% (24-31% in a profiled capture) | 13.2 tok/s at ~6.7 running | | 8 P + 8 E | 8 | 0.18-0.21 ms | 0-0.2% on P-cores, 1-12% on E-cores | 17.3 tok/s at 64-128K, ~7 running | | all 24 | 8 | 0.19-0.23 ms | not measured | 17.2 tok/s at 64-128K, 8 running | The 8-core row's decode is not an isolated comparison (other settings changed with the CPUs); the 16- and 24-CPU rows ran the same settings and decoded the same per request. ## Recommendation With experts in RAM, give the engine all the CPUs you can - on a hybrid CPU the efficiency cores too, not the performance cores alone (an E-core computes an expert more slowly, ~0.24 ms here, but a lane that waits for a core is slower still). Where it must stay confined, set `MAYA_GLM_CPU_LANE` (or `MAYA_GLM_CPU_LANE<n>`) lower so a few of its cores stay free. With every expert in VRAM the lane has nothing to compute and this does not matter. ## How it was verified Docs only; the rule it describes is `fast_cpu_lane_setup` in `src/core/glm_fast_path.cu` on main. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-29 21:26:13 +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#508
No description provided.