Skip to content

kern-serve: the history checkpoint waits for the slot being carved - #48

Merged
xiaguan merged 1 commit into
masterfrom
kern-serve/settle-remap
Oct 9, 2026
Merged

xiaguan merged 1 commit into
masterfrom
kern-serve/settle-remap

Conversation

@xiaguan

@xiaguan xiaguan commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

A recurrent state can only be snapshotted at the moment the prefill stops at history_tokens, so a Denied::Remapping there was a lost snapshot: in the 2026-10-08 AgentX run 42 of 111 were, every one with a remap in flight. Runtime::settle lands the remap in flight and whatever the pool plans after it, blocking on the remap thread; keep_prompt calls it through Tray::settle and retries. This is the one place that waits: the prefill has just read its output back, so the streams the remap waits on are drained and the wait is the remap's own milliseconds.

Gate (tray08 GB300, AgentX aiperf 180 s, c24, same trace and seed as B):

B C (this PR)
history checkpoints kept / skipped 69 / 42 112 / 0
remaps 44 85
prefix hit tokens 7.79M 8.00M
aiperf cached 92.8% 94.1% (attribution of B's skips predicted 94.0%)
requests / tok/s 83 / 243 84 / 245
TTFT p50 / ITL p50 198 ms / 20 ms 157 ms / 19 ms

~/bench_results/2026-10-08-kern-serve-agentx-3min (bin/kern-serve-c, results/c-180s/, scripts/attribute.py).

🤖 Generated with Claude Code

A recurrent state can only be snapshotted at the moment the prefill
stops at `history_tokens`, so a `Denied::Remapping` there was a lost
snapshot: in the 2026-10-08 AgentX run 42 of 111 were, every one with a
remap in flight. `Runtime::settle` lands the remap in flight and
whatever the pool plans after it, blocking on the remap thread; the
scheduler's `keep_prompt` calls it through `Tray::settle` and retries.
This is the one place that waits: the prefill has just read its output
back, so the streams the remap waits on are drained and the wait is
the remap's own milliseconds.

Gate (tray08 GB300, AgentX aiperf 180 s, c24, same trace and seed as
B): 112 history checkpoints kept, 0 skipped (B: 69 / 42); remaps
44 -> 85; prefix hit 7.79M -> 8.00M tokens, aiperf cached 92.8% ->
94.1% (the attribution of B's skips predicted 94.0%); 84 requests,
245 tok/s, TTFT p50 157 ms, ITL p50 19 ms, the rest within B's noise.
`~/bench_results/2026-10-08-kern-serve-agentx-3min`.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: JinYan Su <751080330@qq.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-09T02:51:06.592991Z b48e113 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@xiaguan
xiaguan merged commit 80cd7ce into master Oct 9, 2026
3 checks passed
@xiaguan
xiaguan deleted the kern-serve/settle-remap branch October 9, 2026 02:53
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.

1 participant