Repository navigation
Closed
Description
Status: all listed fixes merged.
An operator running two TP4 DeepSeek-V4.1-Flash instances with a shared Selene pool saw prefix reuse collapse, selene_cancels_total reach 5.2M against ~1,700 gets, and requests slow to ~30 s (cold prefill of every prompt). With the pool removed, a separate slowdown remained: single requests decoding at ~2 tok/s with the GPU cache full of checkpoints, consistent with #319.
The causes are independent, so each fix is its own small PR with a regression test that fails on f9aec99. They can be reviewed in any order except where noted.
Scheduler CPU (related: #319)
- Size ordinary prefill graphs to quoted checkpoint work #357 — follow-up to Estimate checkpoint work without quoting snapshot storage #354: size ordinary prefill graphs to the quoted work when snapshot storage is short
- Estimate checkpoint work without quoting snapshot storage #354 — estimate checkpoint work without quoting snapshot storage: fixes the 617ef92 regression (32 cold 12.7K-token requests: 161-188 s to first token on main, 29.0 s with the fix, 28.8 s before 617ef92 on 4x RTX PRO 6000). Supersedes Reuse checkpoint selections through scheduler commit #329.
- Reuse checkpoint selections through scheduler commit #329 — closed, superseded by Estimate checkpoint work without quoting snapshot storage #354 and Count snapshot alias costs with prefix sums (fixes #319) #346
- Count snapshot alias costs with prefix sums (fixes #319) #346 — exact snapshot selection with prefix sums: fixes Serving engine wedges under real agent traffic on 6b68b9b4: /v1/responses + reasoning_effort=100 + long shared prefixes + client cancels (health 200, GPU idle, zero logs) #319 (nested-alias selection 10.23 s → 0.84 ms, identical results on 18M inputs, Serving engine wedges under real agent traffic on 6b68b9b4: /v1/responses + reasoning_effort=100 + long shared prefixes + client cancels (health 200, GPU idle, zero logs) #319 load ran with no wedge)
Pool spill loop (the 5.2M cancels)
- Honor the pool refusal retry backoff and count refusal discards #358 — follow-up to Bound refused Selene pool handovers #338: a refusal retry waits its full backoff despite pool events; refusal discards counted as flare_host_cache_dropped_total{reason="pool_refused"}
- Bound refused Selene pool handovers #338 — bound refused pool handovers: Invalid/Oversize are dropped, Budget/Inflight retried once
- Count only effective Selene store cancellations #339 — count only cancellations that stop an operation (metric meaning changes)
Pool manager
- Store pool puts as roots when their published parent is absent #356 — store puts as roots when the published parent is absent: pools work across containers without a shared PID namespace and across hosts over TCP (cn4: 314 stored / 0 refused, was 731 of 761 refused)
- Prefer record-read errors across ranks; correct pool lookup and chain docs #355 — review follow-ups to Walk manager chains across host tiers #340/Keep disk cache records after transient restore failures #343/Retry unanswered pool lookups only for selected admissions #345: a record-read failure on any rank stops the record being offered; lookup/chain docs; one timing-dependent test fixed
- Walk manager chains across host tiers #340 — walk manager chains across DRAM and NVMe (stored records were never found; related: Prefill ram cache fills but is never reused #327)
- Preserve warm manager records on impossible arena allocations #341 — don't evict warm records for allocations that can never fit; correct compacted-record charges
- Preserve store release commands under queue pressure #342 — deliver store release commands when the command queue is full
- Pin the manager's record header test to the current format #377 — pin the manager's record-header test to the version 3 format (failing on main since Fix TP16 host prefix records and retain deep DRAM prefixes #264)
- Watch pid-zero pool peers through SO_PEERPIDFD #376 — watch shared-memory clients in another PID namespace (separate containers) through SO_PEERPIDFD, so a crashed client's windows are reclaimed; bound pid-zero restart holds to 60 s
Pool client
- Require pool attachment at startup and register pool memory off the I/O thread #365 — a configured pool must attach at startup (fails before weight load if the manager is unreachable); register pool memory off the I/O thread so large arenas attach (64 GiB: 27 s, previously always failed)
- Preserve no-headroom refusals in pool restore failures #344 — keep the no-headroom flag so the 1 s source skip applies
- Retry unanswered pool lookups only for selected admissions #345 — retry an unanswered pool lookup when the request is admitted (related: Prefill ram cache fills but is never reused #327)
Local host tiers
- Bound recovered row thinning by the transport backlog #336 — bound row thinning by the transport backlog (fixes Multi-host prefix cache: startup row thinning of a recovered disk store overflows the 64-frame record backlog and stops the server #189) (merged)
- Retain composite and disk parent rows until retention pressure #337 — keep composite and disk parent rows until retention pressure, as MemoryStore does since Fix TP16 host prefix records and retain deep DRAM prefixes #264/Reclaim host prefix rows in least-recently-used order #302 (related: Prefill ram cache fills but is never reused #327)
- Keep disk cache records after transient restore failures #343 — keep disk records after transient restore failures (adds sharded result code 3; ranks must run the same build) (related: Host prefix cache: ~30 % of hits dropped as capacity_rejected and fully recomputed #255)
The remote-manager missing-parent follow-up is #356.
Metadata
Metadata
Assignees
Labels
No labels
Activity
yatesdr commentedon Nov 18, 2026
Test results so far (4× RTX PRO 6000, DeepSeek-V4.1-Flash-1017 TP4, concurrency 32, MTP 5,
--prefix-cache-memory=16G).Native Linux CPU suites: every branch passes
flare-selene(403–406),flare-selene-manager(125–126) and Heliosscheduler::+server::runtime::phase_tests(418–420). The one manager failure,record::tests::persisted_header_matches_the_descriptor_layout, also fails on unmodified f9aec99.Scheduler slowdown: bisected to 617ef92. A burst of 32 concurrent fresh 12.7K-token prompts on a freshly started server (time to first token, median):
--scheduler-checkpoint-extra-work-fraction=0perfon the 100%-CPUflare-modelthread during the f9aec99 burst: 75% of time insimulate_snapshot_quoteviaplan → service_rates → prefill_work → checkpoint_selection → quote_snapshots_preserving, and 68% viacommit → service_participants → service_rateson the same path. Self time:select_snapshots36%,free_backing11%. GPU SM utilisation sat at 0% for most samples. With every snapshot slot free (1,993 here), each quote scans all of them, so the first burst after a restart is the worst case. With the GPU cache full of checkpoints, the same burst took 31.6 s.Until a fix lands,
--scheduler-checkpoint-extra-work-fraction 0avoids it. Anchor checkpoints are still taken. A follow-up PR that keeps prefill-work estimates from running storage quotes is in progress and will be added to the list above.The GPU comparison for the pool PRs is still pending.