Skip to content

Prefix-cache pool and scheduler fixes from a production degradation (DeepSeek V4.1 TP4) #335

Closed

Description

@yatesdr

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)

Pool spill loop (the 5.2M cancels)

Pool manager

Pool client

Local host tiers

The remote-manager missing-parent follow-up is #356.

Activity

  1. yatesdr commented on Nov 18, 2026

    @yatesdr
    CollaboratorAuthor

    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 Helios scheduler:: + 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):

    Runtime TTFT
    c74b613 (parent of 617ef92) 28.8 s
    617ef92 213.8 s
    f9aec99 161–188 s
    f9aec99, --scheduler-checkpoint-extra-work-fraction=0 27.9 s
    f9aec99 + all PRs in this issue (includes #329) 36.2 s

    perf on the 100%-CPU flare-model thread during the f9aec99 burst: 75% of time in simulate_snapshot_quote via plan → service_rates → prefill_work → checkpoint_selection → quote_snapshots_preserving, and 68% via commit → service_participants → service_rates on the same path. Self time: select_snapshots 36%, free_backing 11%. 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 0 avoids 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions