Skip to content

row/SERVE-FRONTEND-SLICE: frontend premise REFUTED — cores 99% idle, residual is handoff latency - #58

Closed
localai-bot wants to merge 1 commit into
mainfrom
row/SERVE-FRONTEND-SLICE
Closed

row/SERVE-FRONTEND-SLICE: frontend premise REFUTED — cores 99% idle, residual is handoff latency#58
localai-bot wants to merge 1 commit into
mainfrom
row/SERVE-FRONTEND-SLICE

Conversation

@localai-bot

Copy link
Copy Markdown
Collaborator

Records-only. perf profile of the production server under sustained c8 streaming: frontend cores ~0.8% busy (186 samples/22s @999hz) — the residual (~0.26ms/step per #52 same-tool, not the stale 0.7ms cross-tool figure) is thread-handoff/syscall latency, not compute. We SAVE vLLM's ZMQ IPC; detok invisible (~2us/step); the only our-code hotspot is per-token SSE JSON (nlohmann map churn, ~13% of a nearly-idle core). Slow-vs-Fast detok + pydantic-vs-nlohmann named with file:line as low-ROI general-serving levers, NOT parity levers. MXFP4 verdict unchanged: c1 1.020 PASS / c2-c8 0.962-0.969, gap GPU-intrinsic; final residual = num_splits cap (c1-c2 only) + glue fusion (modest).

🤖 Generated with Claude Code

https://claude.ai/code/session_014fZAcg1WcU8V629k6HWKys

…D (perf), frontend ~99% CPU-idle so the slice is handoff latency not compute; premise REFUTED, gap is GPU-intrinsic, NO code

Executed the frontend attribution the MXFP4 campaign owed. Method step 1
(instrument OUR frontend per-step at c8) ran as a perf profile of the PRODUCTION
server binary under sustained c8 streaming, NO rebuild: the built binary
(dgx ~/mxfp4-bench/build sha 735f3b8) has a git diff-IDENTICAL frontend
(output_processor/detokenizer/serving_completion/api_server/async_llm) to main
efe9440, so its profile IS main's. Workload matched #52 (/v1/completions
streaming, 1024-in/128-out, greedy, 8 workers); sustained ITL mean 40.8ms ≈ the
#52 c8 TPOT 37.56ms. Box left clean (server gone, both locks free, 78MB perf
.data pruned, disk 35G).

DECISIVE: the frontend cores drew only 186 on-CPU samples over 22s at 999Hz =
~0.8% of wall-time busy = ~99% IDLE (blocked on poll/futex), while the engine
core drew 22K samples (75% libcuda + 21% vdso clock-poll). So the #52 ~0.26ms/step
residual (91% of the +2.98ms c8 TPOT gap is GPU SPAN) is thread-handoff/scheduling
LATENCY + syscalls, NOT frontend COMPUTE. The one structural divergence, our
SlowIncrementalDetokenizer (O(seq) copy) vs vLLM's default FastIncrementalDetokenizer
(Rust DecodeStream O(1)), is quantitatively negligible at 128-tok output (caps
~135 strings, ~2us/step); the largest frontend-compute term is nlohmann SSE-frame
serialization (~34% of the SSE worker path), but the worker is idle so it does not
move TPOT.

VERDICT: the mission premise (a ~0.7ms DOMINANT frontend term to close) is REFUTED
— the slice is ~0.26ms of idle-handoff latency with NO dominant closable compute
mechanism. NO code shipped: mirroring Fast detok (needs HF Rust DecodeStream) or a
hand-rolled serializer are low-ROI general-serving levers, not parity levers. The
c2-c8 gap is GPU-intrinsic (flash refuted; #52 fair graphed marlin+flash+glue =
91%; #57 recovered marlin). MXFP4 PARITY VERDICT stands UNCHANGED: c1 1.020 PASS,
c2-c8 0.962/0.966/0.969 BELOW-FLOOR, mem 2.63x; residual NOT frontend-closable.

Records: benchmark-record (perf table + call-graph + named mechanisms file:line
both sides), anchored state entry, STATUS/BENCHMARKS/NOW MXFP4 rows updated
(STATUS paid by compacting the superseded MARLIN-STRUCT narrative, 284050<=284081).
Evidence dgx:~/frontend-attrib/{report.txt,cg_report.txt,run.log,load.json}.

FOLLOWING_AGENTS_PROTOCOL
Assisted-by: Claude Code:claude-opus-4-8 [ClaudeCode]
mudler added a commit that referenced this pull request Aug 6, 2026
… handoff latency (#58)

row/SERVE-FRONTEND-SLICE squash, records-only. perf on the production
server at sustained c8: frontend cores ~0.8% busy; the ~0.26ms/step
residual (#52 same-tool; the 0.7ms was the superseded cross-tool figure)
is thread-handoff/syscall latency, not compute. We SAVE vLLM's ZMQ IPC.
Detok invisible (~2us/step at 128-tok); SSE JSON (nlohmann map churn)
is the only our-code hotspot on a nearly-idle core. Slow-vs-Fast detok
+ pydantic-vs-nlohmann recorded as general-serving levers, not parity
levers. MXFP4 verdict unchanged: c1 1.020 PASS / c2-c8 0.962-0.969,
GPU-intrinsic; final residual = num_splits cap + glue fusion.

FOLLOWING_AGENTS_PROTOCOL
Assisted-by: Claude Code:claude-opus-4-8 [ClaudeCode]
@localai-bot

Copy link
Copy Markdown
Collaborator Author

Landed on main as the squash (mudler authorship).

🤖 Generated with Claude Code

https://claude.ai/code/session_014fZAcg1WcU8V629k6HWKys

@localai-bot localai-bot closed this Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants