ops: production tool calling, the hugepage reduction and SDPA streaming are all /run-only and do not survive a reboot #49
Labels
No labels
human-approved
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
bitpartner/tt-stack#49
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Live risk
Production tool calling depends on a
qwen3_xmlparser drop-in that lives entirely in/runand does not survive a reboot:/run/tt-serving-override/start/run/systemd/system/tenstorrent-serving.service.d/override.confThe
tenstorrent-servingunit bakeshermesinto its/nix/storeExecStart. Thedurable fix is PR #34 in this repo, which is merged here but not deployed —
nixos-llm must bump its flake input and rebuild. Until then, any reboot returns
production to broken tool calling, silently: the server comes up healthy and serves
normally, and only tool-call parsing is wrong.
This has already bitten once — a reboot wiped the drop-in and infbench stage 2 failed
tools/parseduntil it was recreated by hand.Also volatile, same class
Two other production-affecting settings are runtime-only and self-revert on reboot:
nr_hugepages), which reclaimed +5.9 GBof host RAM (MemAvailable ~3.1 → 9.0 GB while serving). Verified 1 channel/card in
the UMD source and by
free=0under load. Durable form would behugepagesPerCardinnixos-llm/hosts/cfx-llm2/configuration.nix+modules/tenstorrent-host.nix:82. Owner decision pending.QWEN36_SDPA_STREAMING=1(patch 0020, −2.2% makespan, −2.4% TTFT) is set via thesame
/rundrop-in. Owner decision pending on making it durable.This matters more than it looks because of the RAM interaction below.
Why the RAM half is not cosmetic
Measured 2026-09-14 (
bench/runs/host-pinned-leak-20260914T063000Z.jsonl): pinned pagesleak in the
tenstorrentmodule and a module reload does NOT reclaim them (measured0 MB with refcount 0 and both devices re-enumerated). Only a reboot does (4.2 GiB).
Check
MemAvailablebefore every vLLM boot; below ~4 GB expect an OOM that can hard-freezethe host. Two freezes that day followed boots attempted below ~3 GB available. So a
reboot that silently reverts the hugepage reduction also reverts the headroom that keeps
boots off the freeze threshold.
Ask
Deploy PR #34 from nixos-llm, and decide whether the hugepage reduction and
QWEN36_SDPA_STREAMING=1become durable at the same time. All three are the same classof problem: production is currently held together by
/runstate that no reboot willreproduce.
Addressed in PR #44 (commit
369b487). Tagged @hermes for review.agy research (2026-09-24)
Findings (Inspection of cfx-llm2 & NixOS module durability)
start-tenstorrent-servingscript is from an older pre-#34/pre-#44 store path (zmwfl1nl...), running--tool-call-parser hermes, missingQWEN36_SDPA_STREAMING=1,QWEN36_MERGE_BATCH_GUARD=1, and omittingattention/tp.pyandgenerator.pymounts./rundrop-ins (/run/tt-serving-override/start& systemd override), reverting tool calling to brokenhermes./proc/cmdlinehashugepages=4(fromnixos-llm'shugepagesPerCard = 2;). Intt-stack,modules/tenstorrent-host.nixalready sets durable defaulthugepagesPerCard = 1(reclaiming +5.9 GB host RAM, ~2 GB total for 2 cards).bench/runs/decode-phase2a-resident-20260922.jsonlwas INVALIDATED (degenerate text "HT#3333...", sha not baseline). Valid B=1 control is 48.619 ms without resident decode (bench/runs/p150-decode-40-control-20260923T1652Z.jsonl). There is NO valid performance measurement for resident decode.--no-async-scheduling(qwen36_vllm.py:242), disabling resident decode's async-ahead mechanism.deviceResidentforcesdeviceArgmax, but device argmax + prefix caching failed 1 of 32 concurrent requests (bench/runs/prefix-argmax-correctness-fail-20260919T0100Z.jsonl).falseinmodules/tenstorrent-serving.nix.Changes (Branch
agy/issue-49)0750452(serve: document Phase 2a gating & add tenstorrent-serving NixOS VM check (#49, #52)):deviceResident&enablePrefixCachingoption descriptions.tests/tenstorrent-serving.nixand wiredchecks.x86_64-linux.tenstorrent-servinginflake.nixverifying durable production settings (qwen3_xml, SDPA streaming, merge batch guard, prefilled slots fix, Phase 2a default OFF).nix eval .#checks.x86_64-linux.tenstorrent-serving.drvPath->/nix/store/s29mlzbb1n00qkf40ig8vz47b3namzrf-vm-test-run-tenstorrent-serving.drv.Next Hardware Measurement Needed
deviceResidentON vs OFF with prefix caching ON at conc-8, plus extended concurrency test (≥8×32 = 256 requests) on cfx-llm2:python3 -m infbench.cli --model qwen3.8-27b-tt --concurrency 8 --stages 3 --requests 256deviceArgmax = falsewhen prefix caching is active.Open Questions
nixos-llm, shouldhosts/cfx-llm2/configuration.nixdrop its explicithugepagesPerCard = 2override on the next flake bump to inherit the verified default of 1 page/card (2 GB total)?