Files
alzeo/docs/gb10-memory.md
T
Hasan BasbunarandClaude Opus 5 719c17b947 docs: the README becomes an entry point, and its numbers are checked against the record
1,045 lines, one door, and the only way to find anything was to scroll. It is 509
now: what this is, the seven targets with their measured headline, how to install
it, what speed and quality to expect, the targets and the switch, the tools, the
cockpit in short, and an index table naming every other file and the question it
answers. Seven sections moved out whole, each to its own file under docs/, each
leaving a summary and a link behind: the 1M context mode, the flash lane, the
cockpit tour, operations and upgrades, the opencode integration, the GB10 memory
trap in full, and where each lane stands against upstream.

The split was checked line by line against the file it came from. Of 1,045 lines,
the only ones with no verbatim equivalent in the new README or in one of those
files are the 32 rewritten on purpose, and each of those is a correction:

- the headline said 65 tok/s for the 27B lane, which is the v1.9 figure. v1.14.0
  measured 71.4 on the release image this lane has served since 2026-09-17, in the
  same campaign that measured 69.8 on the image it replaced. Title, target table
  and speed section now say 71.4 and name the campaign behind each number.
- the memory section read as though the installed fraction were 0.50, which is the
  native-mode and ./run.sh value. The 1m mode has been the default since v1.12.1
  and runs 0.76. Both are stated now, each with its mode.
- the KV pool comparison published three boots against two. The engine journal has
  eleven for that day, six and five: 517,184 to 566,016 against 482,560 to 510,592.
  The ranges still do not overlap, by 6,592 tokens at their closest, but the gap on
  the means is 9.6% and not the 6% published from the subset. README, BENCHMARKS and
  the v1.14.1 entry all carry the full set now.
- two citations pointed at text that is not there: the README claimed a flat-memory
  result was "quoted elsewhere in this README" when it lives in BENCHMARKS.md, and
  keepalive-proxy.py justified its 92% usable share by quoting a README line about a
  178,560-token pool that no longer exists anywhere. Both now name where the number
  actually is. Neither was caused by this release; both survived because nothing
  checks a quoted section title.
- the flash lane's quality is in the README as measured rather than as adjectives:
  GSM8K 97.41% over all 1,319 questions, MMLU 500 at 90.8%, HumanEval 164 pass@1 at
  95.73%, tool calling 15/15 with reasoning off and on, needle 2/2 at 120K and 200K,
  conc-check 40/40 serial and 80/80 at four concurrent.

evals/ ships the two drivers, because two of those numbers could not be reproduced
from this repo. The image's run_eval --eval-name mmlu shells out to an sgl-eval
binary it does not ship, and its HumanEval path needs a package that is not there
and then dies in os.fork against the image's filelock. Six gates hold what makes
them work, with a stub sglang and no network: the score line a caller greps, the
dataset MMLU is measured against, spawn rather than fork, and one sample per task
instead of the harness default of five, which at temperature 0 is the same answer
five times.

ARCHITECTURE.md gains the two directories it did not describe and tools-check.py in
its table of instruments. TESTING.md gains a 2026-09-19 column counted mechanically
on both commits: 34 test files against 20, 587 test functions against 442, 55 CI
steps against 38. docs/flash-lane.md records the one boot in thirteen that died at
CUDA graph capture on 2026-09-18, because a failure that costs twelve minutes and
explains nothing belongs written down even when it happened once.

Local CI: 56 steps, 55 ok, the socket gate failing on this serving box because
other processes cycle ephemeral listeners during the suite, which is the case its
own message describes. Both suites green: 223 and 370.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-19 12:55:10 +02:00

3.2 KiB

The GB10 unified-memory trap, in full

Why --mem-fraction-static is the number that decides whether this box stays alive, what each pin measured, and why the SGLang cookbook's 0.80 is not a contradiction. The README carries the rule; this carries the evidence.

SGLang's memory accounting does not see 25-40 GB of transient allocations on GB10 unified memory (the flashinfer fp8 autotuner and CUDA graph capture allocate outside the tracked pool). Running --mem-fraction-static above 0.50, or running SGLang natively (outside Docker), can drive host available memory to zero: on a machine where SSH often rides on the same memory, that means a hard freeze only a power cycle fixes. We learned this the hard way.

This repo's service is safe by construction:

  • Docker hard caps: --memory 100g --memory-swap 100g (a runaway kills the container, never the host; note the cgroup does not see CUDA unified allocations, so the real guard is the fraction)
  • --mem-fraction-static 0.50 (plenty for 262K context at batch ≤ 4)
  • Restart=always + a clean ExecStartPre docker rm -f so even a power cut leaves nothing stale (always and not on-failure: a Triton compile crash measured on 2026-08-22 ended in SystemExit: 0, which on-failure never relaunches)

The 1m mode deliberately runs 0.76 inside the same docker caps, with the autotuner disabled. It ran 0.70 until v1.14, and the number moved with the image, not with the appetite: the official release claims a smaller static budget for the same fraction, so 0.70 there cost 15% of the pool (770,118 tokens against 906,524) while leaving 10 GB of GPU memory unclaimed. 0.76 hands that back and still leaves a wider margin than the old pin did, 21.30 GB free after graph capture against 19.38. 0.80 was measured crashing under 3 concurrent requests (2 GiB free, Triton CUDA operation not permitted), and the 25-40 GB invisible-allocation bursts above all belong to native runs and the autotuner. Treat anything past 0.80 as livelock territory. What bounds the fraction is the unified pool, not the container: --memory 100g caps host RSS and the cgroup does not see CUDA unified allocations, measured at 0.76 under a 5,623-token generation with the container holding 7.15 GiB of its 100 GiB throughout. The number to watch is the GPU-side headroom after graph capture (21.30 GiB at 0.76, against 19.38 at the old pin).

The SGLang cookbook pins 0.80 on DGX Spark, and that is not a contradiction. Its GB10 cells ran 48 configurations at ISL 8192 / OSL 1024, concurrency 1, boot-and-serve only, and 0.80 served every cell on every attempt; it rejects 0.85 because 0.85 of 128 GB leaves about 8 GB for the OS, exactly DGX OS earlyoom's SIGTERM threshold, and 15 of 48 cells were killed there (exit -15, no traceback, visible in journalctl -u earlyoom). This repo's 0.80 failure was measured under three concurrent requests on a box that also runs the operator's tools. One number is a single-stream boot-and-serve bound, the other is a multi-client operating point, and this repo optimises for the second. If you serve one stream on a dedicated box, the cookbook's 0.80 is the better-evidenced pin.

Back to the README