You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
area:cachingPrefix/KV reuse, cache retention, and model or payload cache behavior.area:seleneSelene shared prefix-cache pool, protocol, manager, and transfers.bugSomething isn't workingpriority:P2Normal bug priority: workflow failure or diagnosis with narrower impact or an available workaround.triage:investigateNeeds reproduction, diagnosis, or a fix; no complete verified resolution is established.
Marked as a host-cache investigation. A zero reused-token counter alone cannot distinguish a failed lookup, an ineligible restore, or admission abandoning a hit. Please include the runtime commit, model/deployment identity, complete serving/cache settings, and metrics before and after a controlled repeated-prefix workload that first pushes the prefix out of GPU cache. Include lookup outcomes/rejections and resident versus host-reused tokens. Main contains #298 and #302, while #319 reports a distinct scheduler stall; neither establishes the cause of this report. This needs its own reproduction before those changes can be blamed or the earlier cache issue #255 closed.
A data point from a different configuration, in case it helps narrow this down: DeepSeek V4.1 Flash at tensor parallelism 3 across three GB10 hosts (one rank per host), disk-only prefix store (--prefix-cache-memory 0 --prefix-cache-disk DIR --prefix-cache-disk-limit 50G), --scheduler-policy throughput, runtime built from 6b68b9b4 (which contains #298 and #302) plus two local serving changes: #323, run with --system-headroom 4G, and a change with no pull request that reads Engram rows ahead of prefill (commit 831bf027, branch engram-prefetch of my fork). Neither changes how prefix records are looked up, stored or restored; #323 does change the system-headroom term of the host-memory budget that sizes the prefix store's intake (selene/src/offload.rs).
A cold prompt of 120,000 random token IDs through /v1/completions with max_tokens 1 takes 32.7 s. flare_host_cache_lookup_outcomes_total{reason="no_match"} rises by 1; afterwards flare_host_cache_stored_total rises by 1 and flare_host_cache_bytes_out_total by 129.7 MB (123.7 MiB), and each host's prefix-cache directory holds one file of that size.
The group is stopped and started again with the same prefix-cache directory. Startup prints Join host prefix stores. 1 of 1 records on every rank; the GPU cache is empty.
The same prompt takes 0.12 s. flare_host_cache_lookup_outcomes_total{reason="admitted"}, flare_host_cache_lookups_total and flare_host_cache_hits_total each rise by 1, flare_host_cache_reused_tokens_total by 120,000 and flare_host_cache_bytes_in_total by 129.7 MB.
So in this one run (one prompt, one restart) a restore from the disk tier worked on this build once the restart had emptied the GPU cache. The restored request reports cached_tokens 120000, and its token and top-20 log-probabilities are identical to the cold request's. This does not exercise the DRAM tier, or eviction with a full cache, which is what the report describes. Before the restart, repeating the prompt while it was still resident on the GPU added 120,000 to flare_cache_reused_tokens_total, did not raise flare_host_cache_lookups_total and added nothing to flare_host_cache_reused_tokens_total: a prompt wholly resident in the GPU cache is admitted without a host lookup, which is why the workload requested above has to push the prefix out of the GPU cache first.
@officiallymarky, could you capture just one repeat on the full-cache box? A synthetic prompt is fine; no need to post the prompt or token IDs. Note the build and cache settings, let the prefix finish storing, push it out of GPU cache with unrelated work, then replay the exact same token IDs once on the same process. The useful bit is the /metrics delta immediately around that last request: resident reused tokens, host lookup outcomes by reason, fetched/fetch-failed, bytes in and host-reused tokens. If you have the host rows-thinned/expired and GPU eviction deltas over the churn interval too, that would help. No restart needed. That should tell us which step lost this particular prefix without guessing from lifetime totals.
Recent selene updates have likely addressed this. It is believed to be an accounting error only. @officiallymarky please rebuild on current main and check again, report back, or close this issue.
Recent selene updates have likely addressed this. It is believed to be an accounting error only. @officiallymarky please rebuild on current main and check again, report back, or close this issue.
I pulled latest, rebuilt, then filled vram/ram cache, and still showing 0.00% hit rate for ram.
Seeing the same as @officiallymarky here. 0% hit rate on RAM prefix cache based on metrics API. GPU KV prefix cache has a 79.7% hit rate. Engram row cache has a 84.8% hit rate. So it's just the RAM prefix cache here. This is for a run where the server has been up for about a week with several billion tokens served.
We ran a controlled repeat on main (25b4951): one GB10 (SM121), the Qwen3.8-27B core, --max-concurrency 1, --kv-cache-limit context (2,048 GPU KV pages of 128 tokens), and a DRAM tier.
Send prompt A (22,883 tokens), then prompts with no shared prefix totalling 589,467 tokens, more than twice the GPU KV pool, then A again.
With --prefix-cache-memory 40G (a 40.9 GiB tier), the replay of A restored 22,878 tokens from DRAM: flare_host_cache_hits_total +1, flare_host_cache_reused_tokens_total +22,878, flare_host_cache_restores_total{tier="dram"} +1, and cached_tokens 22,878. The request (one output token) took 0.17 s instead of 9.36 s.
With --prefix-cache-memory 16G, the same steps restored nothing. The other prompts stored 21.2 GB in a 16.9 GiB tier, the tier dropped records (flare_host_cache_dropped_total{tier="dram",reason="end_of_chain"} +4), and A's lookup ended no_match.
So on main the counter counts real restores, and a zero means no restore happened. One way to get zero is a DRAM tier that later traffic fills before a prefix is asked for again; we have not shown that this is what happens on your hosts. These would settle it, from a running server:
the commit or release, the model, the tensor-parallel layout, and the --prefix-cache-memory value;
from /metrics: flare_total_kv_pages, flare_kv_page_tokens, flare_host_cache_slots_total, flare_host_cache_memory_bytes, flare_host_cache_stored_total, flare_host_cache_dropped_total (all reasons), flare_host_cache_lookups_total and flare_host_cache_lookup_outcomes_total (all reasons).
Two open PRs directly address upstream causes that match a high GPU KV hit rate with zero host RAM reuse:
selene,selene-manager,helios: improve prefix-cache hit rate, L1 retention, NVMe throughput, and GPU snapshot packing #674: Keeps host/pool lookups active when a deeper cached prefix can extend a partially resident GPU prefix (previously skipped on partial GPU hits), replaces the noisy wall-clock prefill_rate EMA (which caused false cost_rejected outcomes) with read-only graph-timing prefill pricing (estimate_prefill_delta_ns), retains clean persisted_in_pool records in L1 DRAM on pooled deployments, and stops reserving unused intake_slots when local disk is disabled.
Once #655 and #674 merge, please retest and include the /metrics counters listed above (flare_host_cache_lookup_outcomes_total, flare_host_cache_dropped_total, flare_host_cache_stored_total, flare_checkpoint_skips_total) if you still see zero host reuse.
area:cachingPrefix/KV reuse, cache retention, and model or payload cache behavior.area:seleneSelene shared prefix-cache pool, protocol, manager, and transfers.bugSomething isn't workingpriority:P2Normal bug priority: workflow failure or diagnosis with narrower impact or an available workaround.triage:investigateNeeds reproduction, diagnosis, or a fix; no complete verified resolution is established.
Activity
original-el8 commentedon Nov 18, 2026
Marked as a host-cache investigation. A zero reused-token counter alone cannot distinguish a failed lookup, an ineligible restore, or admission abandoning a hit. Please include the runtime commit, model/deployment identity, complete serving/cache settings, and metrics before and after a controlled repeated-prefix workload that first pushes the prefix out of GPU cache. Include lookup outcomes/rejections and resident versus host-reused tokens. Main contains #298 and #302, while #319 reports a distinct scheduler stall; neither establishes the cause of this report. This needs its own reproduction before those changes can be blamed or the earlier cache issue #255 closed.
javieratomic commentedon Nov 18, 2026
A data point from a different configuration, in case it helps narrow this down: DeepSeek V4.1 Flash at tensor parallelism 3 across three GB10 hosts (one rank per host), disk-only prefix store (
--prefix-cache-memory 0 --prefix-cache-disk DIR --prefix-cache-disk-limit 50G),--scheduler-policy throughput, runtime built from6b68b9b4(which contains #298 and #302) plus two local serving changes: #323, run with--system-headroom 4G, and a change with no pull request that reads Engram rows ahead of prefill (commit831bf027, branchengram-prefetchof my fork). Neither changes how prefix records are looked up, stored or restored; #323 does change the system-headroom term of the host-memory budget that sizes the prefix store's intake (selene/src/offload.rs)./v1/completionswithmax_tokens1 takes 32.7 s.flare_host_cache_lookup_outcomes_total{reason="no_match"}rises by 1; afterwardsflare_host_cache_stored_totalrises by 1 andflare_host_cache_bytes_out_totalby 129.7 MB (123.7 MiB), and each host's prefix-cache directory holds one file of that size.Join host prefix stores. 1 of 1 records on every rank; the GPU cache is empty.flare_host_cache_lookup_outcomes_total{reason="admitted"},flare_host_cache_lookups_totalandflare_host_cache_hits_totaleach rise by 1,flare_host_cache_reused_tokens_totalby 120,000 andflare_host_cache_bytes_in_totalby 129.7 MB.So in this one run (one prompt, one restart) a restore from the disk tier worked on this build once the restart had emptied the GPU cache. The restored request reports
cached_tokens120000, and its token and top-20 log-probabilities are identical to the cold request's. This does not exercise the DRAM tier, or eviction with a full cache, which is what the report describes. Before the restart, repeating the prompt while it was still resident on the GPU added 120,000 toflare_cache_reused_tokens_total, did not raiseflare_host_cache_lookups_totaland added nothing toflare_host_cache_reused_tokens_total: a prompt wholly resident in the GPU cache is admitted without a host lookup, which is why the workload requested above has to push the prefix out of the GPU cache first.jcartu commentedon Nov 20, 2026
@officiallymarky, could you capture just one repeat on the full-cache box? A synthetic prompt is fine; no need to post the prompt or token IDs. Note the build and cache settings, let the prefix finish storing, push it out of GPU cache with unrelated work, then replay the exact same token IDs once on the same process. The useful bit is the
/metricsdelta immediately around that last request: resident reused tokens, host lookup outcomes by reason, fetched/fetch-failed, bytes in and host-reused tokens. If you have the host rows-thinned/expired and GPU eviction deltas over the churn interval too, that would help. No restart needed. That should tell us which step lost this particular prefix without guessing from lifetime totals.yatesdr commentedon Nov 20, 2026
Recent selene updates have likely addressed this. It is believed to be an accounting error only. @officiallymarky please rebuild on current main and check again, report back, or close this issue.
officiallymarky commentedon Nov 21, 2026
I pulled latest, rebuilt, then filled vram/ram cache, and still showing 0.00% hit rate for ram.
mayhem4markets commentedon Nov 21, 2026
Seeing the same as @officiallymarky here. 0% hit rate on RAM prefix cache based on metrics API. GPU KV prefix cache has a 79.7% hit rate. Engram row cache has a 84.8% hit rate. So it's just the RAM prefix cache here. This is for a run where the server has been up for about a week with several billion tokens served.
yatesdr commentedon Nov 21, 2026
We ran a controlled repeat on main (25b4951): one GB10 (SM121), the Qwen3.8-27B core,
--max-concurrency 1,--kv-cache-limit context(2,048 GPU KV pages of 128 tokens), and a DRAM tier.--prefix-cache-memory 40G(a 40.9 GiB tier), the replay of A restored 22,878 tokens from DRAM:flare_host_cache_hits_total+1,flare_host_cache_reused_tokens_total+22,878,flare_host_cache_restores_total{tier="dram"}+1, andcached_tokens22,878. The request (one output token) took 0.17 s instead of 9.36 s.--prefix-cache-memory 16G, the same steps restored nothing. The other prompts stored 21.2 GB in a 16.9 GiB tier, the tier dropped records (flare_host_cache_dropped_total{tier="dram",reason="end_of_chain"}+4), and A's lookup endedno_match.So on main the counter counts real restores, and a zero means no restore happened. One way to get zero is a DRAM tier that later traffic fills before a prefix is asked for again; we have not shown that this is what happens on your hosts. These would settle it, from a running server:
--prefix-cache-memoryvalue;/metrics:flare_total_kv_pages,flare_kv_page_tokens,flare_host_cache_slots_total,flare_host_cache_memory_bytes,flare_host_cache_stored_total,flare_host_cache_dropped_total(all reasons),flare_host_cache_lookups_totalandflare_host_cache_lookup_outcomes_total(all reasons).yatesdr commentedon Dec 3, 2026
Two open PRs directly address upstream causes that match a high GPU KV hit rate with zero host RAM reuse:
prefill_rateEMA (which caused falsecost_rejectedoutcomes) with read-only graph-timing prefill pricing (estimate_prefill_delta_ns), retains cleanpersisted_in_poolrecords in L1 DRAM on pooled deployments, and stops reserving unusedintake_slotswhen local disk is disabled.Message/Endpointcaptures withunknown_cost.Once
#655and#674merge, please retest and include the/metricscounters listed above (flare_host_cache_lookup_outcomes_total,flare_host_cache_dropped_total,flare_host_cache_stored_total,flare_checkpoint_skips_total) if you still see zero host reuse.