[GH-ISSUE #565] maya-mm3: the start-up CPU-lane probe also misreads the other way ("each more" inflated to +1.27..+11.67 ms), staging 2-3 of 4 experts for the session - 6.5 tok/s instead of 16-17 on one 48 GB GPU + Xeon (see #548) #232

Closed
opened 2026-10-29 21:23:01 +07:00 by bsakaguchi · 2 comments
Owner

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

The same start-up probe problem as #548, on a very different box and more often: 4 of the 14 MiniMax starts that ran the probe today misread it, and the worst one held decode at ~6.5 tok/s for the whole session, against 14-17 on a good start. Our misreads go the other way from #548's, though. #548's read +0.00 ms each more; ours read +1.27, +1.29, +1.36 and once +11.67 ms each more, against 0.25-0.33 on good starts. So the consistency check suggested in #548 (four experts no slower than one) would catch that case but not ours. A bound in the other direction would be needed too, or several rounds with the best one kept.

The case where it hurt most: a start while ~550 GB of downloads had filled the page cache. 2 GB of RAM was free, kcompactd0 sat at 100% of a core, and the previous engine (DeepSeek, 271 GB of host memory) had just exited. The probe read 0.88 ms (+11.67 ms each more) ... 3 staged. For the whole session the CPU lane's 28 threads sat at ~30% each, waiting on staging copies, and the 3D tasks decoded at 6.3-6.7 tok/s. Other misreads came right after a previous maya-mm3 had exited, which fits #548's reading (the previous engine's pinned memory still being released). But good starts came right after an exit too, so it isn't only that.

It also answers an open question in #548: MM3_LANE_SPLIT=0 isn't a safe workaround here. It cost ~11% of decode against a normal 1 staged start (15.0 / 15.3 against 16.7 / 17.3 tok/s, two runs each). The split pays off when it reads right. What has worked for us is #548's workaround: restart until the start line says 0 or 1 staged. The one restart we needed today read normal on the next try. The other two engines already re-plan in decode: maya-ds4 times the CPU lane again (the CPU lane timed again in decode), and GLM's fast path has lane_retime (re-plans when the CPU's cost drifts >15%). Doing the same in maya-mm3 would make a bad start harmless, whatever the PC is doing at that moment. The data follows.


Machine and config

  • GPU: 1× NVIDIA L40S-48Q (vGPU, the whole 48 GB card).
  • CPU and RAM: Xeon Platinum 8580 VM, 32 vCPUs without SMT, 1 NUMA node seen; ~504 GB RAM; Linux 6.8.
  • Model: MiniMax-M3.1-Flash, Mia-AiLab's EXL3 3.55 bpw. 767 experts resident with --chunk 8192 (961 with the default chunk); the pinned pool holds every other expert (~167 GB pinned).
  • Maya: v1.1.30 and v1.1.32 (no change to calibrate_lane() between them; v1.1.33 only fixes the setup's pack step).
  • Benchmark:
    • through the server, temperature 0, reasoning_effort: low;
    • the numbers are the server's own timings;
    • "quick" = an 8K-token read + 3 code prompts of 600 tokens; "speed" = 6 code prompts + reads of 8K / 32K / 128K.

Every start we logged today

Times are local; "after" = what ran just before.

# Version / config Start line (CPU lane vs staging (measured): ...) Staged of 4 Decode that session
1 v1.1.30, setup defaults (32 threads, chunk 1024, DSpark) 0.37 ms (+0.75 ms each more), 1.14 ms to copy 1 13.0 (quick)
2 v1.1.30, --cpu-threads 29, DSpark on 0.37 ms (+0.30), 2.35 ms to copy 0 14.7 (quick)
3 v1.1.30, --cpu-threads 29, DSpark off 0.42 ms (+0.26), 1.14 0 12.4 (quick)
4 v1.1.30, --cpu-threads 27, DSpark on 0.39 ms (+0.33), 1.14 1 15.8 (quick)
5 v1.1.30, --cpu-threads 27, DSpark off, after #4's engine exited 0.47 ms (+1.29), 1.16 2 9.3 (quick), vs 12.4 at #3
6 v1.1.30, --cpu-threads 27 --chunk 8192, DSpark 0.86 ms (+0.60), 1.14 1 14.4 (speed)
7 v1.1.30, the same with --chunk 16384 (541 resident), after #6's engine exited 0.38 ms (+1.27), 1.17 2 10.0 (quick; confounded with fewer resident experts)
8 v1.1.30, as #6, after DeepSeek exited, downloads filling the page cache (2 GB free, kcompactd0 100%) 0.88 ms (+11.67), 1.15 3 6.3-6.7 (3D tasks, the whole session)
9 v1.1.32, as #6, page cache relieved first (495 GB available) 0.37 ms (+0.29), 1.14 0 16.7 (speed); 3D at ~18
10 v1.1.32, as #6 0.48 ms (+0.28), 1.14 1 16.7 / 17.3 (quick ×2)
11 v1.1.32, as #6 + MM3_LANE_SPLIT=0 (no line: no split) - 15.0 / 15.3 (quick ×2)
12 v1.1.32, as #6 + --no-pin-pool (no line: no pool) - 14.4 / 14.6 (quick ×2)
13 v1.1.32, as #6, after #12's engine exited 0.50 ms (+1.36), 1.14 2 (restarted)
14 v1.1.32, the restart of #13 0.55 ms (+0.27), 1.14 1 (normal)
15 v1.1.32 local build (a page-cache test, same engine code otherwise), as #6 0.72 ms (+0.30), 1.14 1 (normal)
16 v1.1.32, Maya-S GGUF instead of EXL3 0.30 ms (+0.25), 0.59 ms to copy 1 (being measured)

On v1.1.29 we had seen one more: 0.44 ms (+1.27 ms each more), 2 of 4 staged, with --cpu-threads 30. That session staged 17,133 experts, routing waits rose to 60.7 ms a token (MM3_TIMING=1), and decode ran at 9.6 tok/s against 12.8 at --cpu-threads 28.

What the misreads have in common:

  • The one-expert time is close to normal (0.38-0.50 ms; 0.88 in #8). The "each more" figure is 4-45x its usual 0.25-0.33 ms.
  • The copy time stays at 1.14-1.17 ms every time (2.35 once, at #2, which still chose 0).
  • So in our cases the four-expert call is the inflated sample, not the one-expert ones. The split then stages 2-3 of 4 experts over PCIe, when here the right answer is 0-1.

Session #8, the worst one

  • Memory: free -g showed 503 total, 9 used, 2 free, 491 buff/cache, 322 available. kcompactd0 was at 100% of a core.
  • CPU: the engine was at ~840% CPU for 28 lane threads, i.e. ~30% each, waiting on staging copies (~1.15 ms each, serial per token).
  • Decode: the 3D tasks ran at 6.3 / 6.6 / 6.7 / 6.7 / 6.6 tok/s, and the thinking at 5.6.
  • What we changed: we stopped it, moved our downloads into a cgroup with MemoryHigh so their page cache can't fill the RAM, and dropped the cache of the model files not in use (posix_fadvise(DONTNEED)). Start #9 then read normally and decoded at 16.7 tok/s.

MM3_LANE_SPLIT=0 against a normal split (v1.1.32, same config, quick ×2)

Decode Prefill 8K
normal start, 1 staged 16.7 / 17.3 404 / 412
MM3_LANE_SPLIT=0 15.0 / 15.3 408 / 414
  • Niko1221/Strata#485 (closed): the start-up PCIe probe read the same link at 18.5, 6.9 and 5.8 GB/s across starts. Strata 0.1.37 fixed it by timing four bursts and taking the fastest, since "a disturbance only slows a copy". The same holds for a CPU-lane timing: a busy PC can only make the four-expert call slower, so the best of a few rounds is the honest one.
  • Niko1221/Strata#4007: a start-up-only PCIe share against the runtime refinement (PcieAuto). Refining in decode gave 42-44 against 35-37 tok/s on the same card.
  • #56 here (GLM, Windows, two NUMA nodes): decode varied ~30% between restarts. A different cause (the DMA path across nodes), but the same start-to-start lottery.

What we'd suggest, adding to #548's

  • A two-sided consistency check on the probe: retry when "each more" comes out 0, as #548 suggests, and also when it comes out far above the one-expert time. On this box good starts had "each more" at ~0.4-0.85x the one-expert time (one at 2.0x, which still chose 1); the misreads were 2.7-13x.
  • Best of a few rounds, with an untimed warm-up first, as #548 suggests.
  • Re-plan in decode, as maya-ds4 and GLM's lane_retime already do. This would also cover a PC that gets busy after the start.
  • Warn when the split stages ≥2 of 4. Today a bad start shows only in that one line, and nothing later says the session is slow for that reason.

Happy to test a branch on this box.

Originally created by @talisp on GitHub (Oct 27, 2026). Original GitHub issue: https://github.com/mw00/project-maya/issues/565 **The same start-up probe problem as #548, on a very different box and more often:** **4 of the 14 MiniMax starts that ran the probe today misread it, and the worst one held decode at ~6.5 tok/s for the whole session, against 14-17 on a good start.** Our misreads go the other way from #548's, though. #548's read `+0.00 ms each more`; ours read `+1.27`, `+1.29`, `+1.36` and once `+11.67 ms each more`, against 0.25-0.33 on good starts. So the consistency check suggested in #548 (four experts no slower than one) would catch that case but not ours. A bound in the other direction would be needed too, or several rounds with the best one kept. **The case where it hurt most:** a start while ~550 GB of downloads had filled the page cache. 2 GB of RAM was free, `kcompactd0` sat at 100% of a core, and the previous engine (DeepSeek, 271 GB of host memory) had just exited. The probe read `0.88 ms (+11.67 ms each more) ... 3 staged`. For the whole session the CPU lane's 28 threads sat at ~30% each, waiting on staging copies, and the 3D tasks decoded at 6.3-6.7 tok/s. Other misreads came right after a previous maya-mm3 had exited, which fits #548's reading (the previous engine's pinned memory still being released). But good starts came right after an exit too, so it isn't only that. **It also answers an open question in #548:** `MM3_LANE_SPLIT=0` isn't a safe workaround here. It cost **~11%** of decode against a normal `1 staged` start (15.0 / 15.3 against 16.7 / 17.3 tok/s, two runs each). The split pays off when it reads right. What has worked for us is #548's workaround: restart until the start line says `0` or `1 staged`. The one restart we needed today read normal on the next try. The other two engines already re-plan in decode: maya-ds4 times the CPU lane again (`the CPU lane timed again in decode`), and GLM's fast path has `lane_retime` (re-plans when the CPU's cost drifts >15%). Doing the same in maya-mm3 would make a bad start harmless, whatever the PC is doing at that moment. The data follows. --- ### Machine and config - **GPU:** 1× NVIDIA L40S-48Q (vGPU, the whole 48 GB card). - **CPU and RAM:** Xeon Platinum 8580 VM, 32 vCPUs without SMT, 1 NUMA node seen; ~504 GB RAM; Linux 6.8. - **Model:** MiniMax-M3.1-Flash, Mia-AiLab's EXL3 3.55 bpw. 767 experts resident with `--chunk 8192` (961 with the default chunk); the pinned pool holds every other expert (~167 GB pinned). - **Maya:** v1.1.30 and v1.1.32 (no change to `calibrate_lane()` between them; v1.1.33 only fixes the setup's pack step). - **Benchmark:** - through the server, temperature 0, `reasoning_effort: low`; - the numbers are the server's own `timings`; - "quick" = an 8K-token read + 3 code prompts of 600 tokens; "speed" = 6 code prompts + reads of 8K / 32K / 128K. ### Every start we logged today Times are local; "after" = what ran just before. | # | Version / config | Start line (`CPU lane vs staging (measured): ...`) | Staged of 4 | Decode that session | |---|---|---|---|---| | 1 | v1.1.30, setup defaults (32 threads, chunk 1024, DSpark) | `0.37 ms (+0.75 ms each more), 1.14 ms to copy` | 1 | 13.0 (quick) | | 2 | v1.1.30, `--cpu-threads 29`, DSpark on | `0.37 ms (+0.30), 2.35 ms to copy` | 0 | 14.7 (quick) | | 3 | v1.1.30, `--cpu-threads 29`, DSpark off | `0.42 ms (+0.26), 1.14` | 0 | 12.4 (quick) | | 4 | v1.1.30, `--cpu-threads 27`, DSpark on | `0.39 ms (+0.33), 1.14` | 1 | 15.8 (quick) | | 5 | v1.1.30, `--cpu-threads 27`, DSpark off, after #4's engine exited | **`0.47 ms (+1.29), 1.16`** | **2** | **9.3** (quick), vs 12.4 at #3 | | 6 | v1.1.30, `--cpu-threads 27 --chunk 8192`, DSpark | `0.86 ms (+0.60), 1.14` | 1 | 14.4 (speed) | | 7 | v1.1.30, the same with `--chunk 16384` (541 resident), after #6's engine exited | **`0.38 ms (+1.27), 1.17`** | **2** | **10.0** (quick; confounded with fewer resident experts) | | 8 | v1.1.30, as #6, after DeepSeek exited, downloads filling the page cache (2 GB free, `kcompactd0` 100%) | **`0.88 ms (+11.67), 1.15`** | **3** | **6.3-6.7** (3D tasks, the whole session) | | 9 | v1.1.32, as #6, page cache relieved first (495 GB available) | `0.37 ms (+0.29), 1.14` | 0 | **16.7** (speed); 3D at ~18 | | 10 | v1.1.32, as #6 | `0.48 ms (+0.28), 1.14` | 1 | 16.7 / 17.3 (quick ×2) | | 11 | v1.1.32, as #6 + `MM3_LANE_SPLIT=0` | (no line: no split) | - | **15.0 / 15.3** (quick ×2) | | 12 | v1.1.32, as #6 + `--no-pin-pool` | (no line: no pool) | - | 14.4 / 14.6 (quick ×2) | | 13 | v1.1.32, as #6, after #12's engine exited | **`0.50 ms (+1.36), 1.14`** | **2** | (restarted) | | 14 | v1.1.32, the restart of #13 | `0.55 ms (+0.27), 1.14` | 1 | (normal) | | 15 | v1.1.32 local build (a page-cache test, same engine code otherwise), as #6 | `0.72 ms (+0.30), 1.14` | 1 | (normal) | | 16 | v1.1.32, Maya-S GGUF instead of EXL3 | `0.30 ms (+0.25), 0.59 ms to copy` | 1 | (being measured) | On v1.1.29 we had seen one more: `0.44 ms (+1.27 ms each more)`, `2 of 4 staged`, with `--cpu-threads 30`. That session staged 17,133 experts, routing waits rose to 60.7 ms a token (`MM3_TIMING=1`), and decode ran at 9.6 tok/s against 12.8 at `--cpu-threads 28`. **What the misreads have in common:** - The one-expert time is close to normal (0.38-0.50 ms; 0.88 in #8). The **"each more"** figure is 4-45x its usual 0.25-0.33 ms. - The copy time stays at 1.14-1.17 ms every time (2.35 once, at #2, which still chose 0). - So in our cases the four-expert call is the inflated sample, not the one-expert ones. The split then stages 2-3 of 4 experts over PCIe, when here the right answer is 0-1. ### Session #8, the worst one - **Memory:** `free -g` showed 503 total, 9 used, **2 free**, 491 buff/cache, 322 available. `kcompactd0` was at 100% of a core. - **CPU:** the engine was at ~840% CPU for 28 lane threads, i.e. ~30% each, waiting on staging copies (~1.15 ms each, serial per token). - **Decode:** the 3D tasks ran at 6.3 / 6.6 / 6.7 / 6.7 / 6.6 tok/s, and the thinking at 5.6. - **What we changed:** we stopped it, moved our downloads into a cgroup with `MemoryHigh` so their page cache can't fill the RAM, and dropped the cache of the model files not in use (`posix_fadvise(DONTNEED)`). Start #9 then read normally and decoded at 16.7 tok/s. ### `MM3_LANE_SPLIT=0` against a normal split (v1.1.32, same config, quick ×2) | | Decode | Prefill 8K | |---|---|---| | normal start, `1 staged` | 16.7 / 17.3 | 404 / 412 | | `MM3_LANE_SPLIT=0` | 15.0 / 15.3 | 408 / 414 | ### Related, in the sibling projects - **Niko1221/Strata#485 (closed):** the start-up PCIe probe read the same link at 18.5, 6.9 and 5.8 GB/s across starts. Strata 0.1.37 fixed it by timing four bursts and taking the fastest, since "a disturbance only slows a copy". The same holds for a CPU-lane timing: a busy PC can only make the four-expert call slower, so the best of a few rounds is the honest one. - **Niko1221/Strata#4007:** a start-up-only PCIe share against the runtime refinement (`PcieAuto`). Refining in decode gave 42-44 against 35-37 tok/s on the same card. - **#56 here (GLM, Windows, two NUMA nodes):** decode varied ~30% between restarts. A different cause (the DMA path across nodes), but the same start-to-start lottery. ### What we'd suggest, adding to #548's - **A two-sided consistency check on the probe:** retry when "each more" comes out 0, as #548 suggests, and also when it comes out far above the one-expert time. On this box good starts had "each more" at ~0.4-0.85x the one-expert time (one at 2.0x, which still chose 1); the misreads were 2.7-13x. - **Best of a few rounds,** with an untimed warm-up first, as #548 suggests. - **Re-plan in decode**, as maya-ds4 and GLM's `lane_retime` already do. This would also cover a PC that gets busy after the start. - **Warn when the split stages ≥2 of 4.** Today a bad start shows only in that one line, and nothing later says the session is slow for that reason. Happy to test a branch on this box.
Author
Owner

@talisp commented on GitHub (Oct 28, 2026):

Good news on this one: v1.1.34's decode re-timing (from #552) fixes it here. Tonight a start misread exactly as before, and the session recovered on its own within the first answers.

What happened:

  • At the start: the setup's own config (no --cpu-threads, which now means 30 threads here) read the probe inflated again, as in this issue:
    [maya] CPU lane vs staging (measured): an expert 0.46 ms on the CPU lane (+1.23 ms each more), 1.16 ms to copy - 4 such experts: 2 staged
    
  • On v1.1.32, that line held 2-of-4 staging for the whole session (~6.5-10 tok/s in the cases above).
  • On v1.1.34, decode timed the lane again and re-planned:
    maya-mm3: the CPU lane timed again in decode: an expert 0.40 ms (+0.29 ms each more), planned with 0.46 (+1.23); 1.16 ms to copy - 4 such experts: 0 staged
    maya-mm3: the CPU lane timed again in decode: an expert 0.45 ms (+0.42 ms each more), planned with 0.40 (+0.29); 1.16 ms to copy - 4 such experts: 1 staged
    maya-mm3: the CPU lane timed again in decode: an expert 0.37 ms (+0.33 ms each more), planned with 0.45 (+0.42); 1.16 ms to copy - 4 such experts: 1 staged
    
  • The session decoded at 18.35 tok/s (six code prompts: 15.9, 18.7, 17.7, 18.9, 19.4, 19.5; 19.7 after a 39K prompt). That's the fastest MiniMax decode we've had on this box, so the bad start cost nothing measurable.

One thing we noticed: the first re-timing went to 0 staged, and the next ones settled on 1 staged, the value good starts pick here. The re-plan moves between neighbours as the timings drift, which looks right.

Setup:

  • 1× L40S-48Q (vGPU, 48 GB), Xeon Platinum 8580 VM (32 vCPUs, no SMT), ~504 GB RAM, Linux 6.8;
  • MiniMax-M3.1-Flash EXL3 3.55 bpw, v1.1.34, --max-context 262144 --kv-streaming on --vision on --dspark on;
  • 961 experts resident;
  • the model files' page cache dropped before the start.

From our side, this one can be closed as fixed by v1.1.34. Thanks!

<!-- gh-comment-id:6467594230 --> @talisp commented on GitHub (Oct 28, 2026): Good news on this one: **v1.1.34's decode re-timing (from #552) fixes it here.** Tonight a start misread exactly as before, and the session recovered on its own within the first answers. **What happened:** - **At the start:** the setup's own config (no `--cpu-threads`, which now means 30 threads here) read the probe inflated again, as in this issue: ``` [maya] CPU lane vs staging (measured): an expert 0.46 ms on the CPU lane (+1.23 ms each more), 1.16 ms to copy - 4 such experts: 2 staged ``` - **On v1.1.32,** that line held 2-of-4 staging for the whole session (~6.5-10 tok/s in the cases above). - **On v1.1.34,** decode timed the lane again and re-planned: ``` maya-mm3: the CPU lane timed again in decode: an expert 0.40 ms (+0.29 ms each more), planned with 0.46 (+1.23); 1.16 ms to copy - 4 such experts: 0 staged maya-mm3: the CPU lane timed again in decode: an expert 0.45 ms (+0.42 ms each more), planned with 0.40 (+0.29); 1.16 ms to copy - 4 such experts: 1 staged maya-mm3: the CPU lane timed again in decode: an expert 0.37 ms (+0.33 ms each more), planned with 0.45 (+0.42); 1.16 ms to copy - 4 such experts: 1 staged ``` - **The session decoded at 18.35 tok/s** (six code prompts: 15.9, 18.7, 17.7, 18.9, 19.4, 19.5; 19.7 after a 39K prompt). That's the fastest MiniMax decode we've had on this box, so the bad start cost nothing measurable. **One thing we noticed:** the first re-timing went to `0 staged`, and the next ones settled on `1 staged`, the value good starts pick here. The re-plan moves between neighbours as the timings drift, which looks right. **Setup:** - 1× L40S-48Q (vGPU, 48 GB), Xeon Platinum 8580 VM (32 vCPUs, no SMT), ~504 GB RAM, Linux 6.8; - MiniMax-M3.1-Flash EXL3 3.55 bpw, v1.1.34, `--max-context 262144 --kv-streaming on --vision on --dspark on`; - 961 experts resident; - the model files' page cache dropped before the start. From our side, this one can be closed as fixed by v1.1.34. Thanks!
Author
Owner

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

Fixed in v1.1.34 by the decode re-timing (#552), and you confirmed it on your 48 GB GPU. Closing; thank you @talisp for the long chain of measurements that led there.

<!-- gh-comment-id:6480779951 --> @mw00 commented on GitHub (Oct 28, 2026): Fixed in v1.1.34 by the decode re-timing (#552), and you confirmed it on your 48 GB GPU. Closing; thank you @talisp for the long chain of measurements that led there.
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#232
No description provided.