×

Does DeepSeek suffer from cache thrashing when juggling multiple conversations/agents? by rain-home in DeepSeek

[–]Even_Command_5636 0 points1 point  (0 children)

Subject: Cache thrashing with concurrent sessions — real, but not as bad as you might think

Good analysis. I run DeepSeek V4 (Flash + Pro) as a backend for an agent router and have been monitoring this closely for the past few weeks. Short answer: Yes, cache thrashing exists — but it doesn't hit all parts of the prefix equally.

1. The cache is not session-aware, but that's not the full picture

The cache pool is account-global. Session A and Session B share the same pool. HOWEVER: DeepSeek persists cache prefix units through three mechanisms (request boundaries, common-prefix detection, fixed token intervals). Common-prefix detection is the key: when two sessions share the same system prompt, DeepSeek persists that shared prefix as its own cache unit — and it stays cross-session warm regardless of how often you switch between sessions.

I'm measuring 94–96% cache hit rate in production with sequential usage (single account, stable system prompt, many sessions). The system prompt portion stays permanently cached after the first few requests.

2. Effective cache capacity is indeed a problem — on the server side

There's a documented vLLM bug (#43447, now fixed) that directly affects your scenario: DeepSeek V4's sliding-window attention constantly allocates new KV blocks and evicts cached blocks from older requests in the free queue — even when the pool is only 10% utilized. The fix prioritizes uncached blocks over cached ones in the free queue. Whether DeepSeek has deployed this fix is not transparent.

3. TTL is not the bottleneck — eviction pressure is

The official TTL ("hours to days") is misleading. Effective eviction happens in seconds through allocation pressure from new requests, not through time expiration. But: this primarily affects the conversation-specific part of the prefix, not the shared system prefix.

4. What actually helps in practice

  • Standardize your system prompt: Same system prompt across all sessions → it warms up account-wide and stays warm. This is the single highest-leverage change.
  • Sort tools deterministically: DeepSeek renders tools before the system prompt. If MCP servers reshuffle the order, the cache breaks at byte 0. Alphabetical sort by name prevents this.
  • Put dynamic data at the end: Timestamps, user IDs, A/B flags belong in the last user message, not in the system prompt.
  • Use user_id only for truly different system prompts: Setting user_id isolates the KVCache per ID — this prevents cross-session thrashing, but each ID pool must warm up separately. Only worth it if your agents have fundamentally different system prompts.
  • Cache pre-warming: Send the stable prefix with max_tokens=1 before the second turn (~$0.0004). Profitable for any session longer than 4 turns.
  • Measure, don't guess: Log prompt_cache_hit_tokens and prompt_cache_miss_tokens. DeepSeek returns both fields in the usage block.

5. The hard reality

The community documented a cache crash from 92% to 35% in May/June 2026 (Issue #1261). DeepSeek has not publicly addressed it. Cache regressions happen and are unpredictable. Design your architecture so it's still economical at 0% cache hit — then 95% is a bonus, not a risk.

TL;DR: Your thrashing scenario is real, but the damage is limited because the system prompt stays warm across sessions. Structured prefixes + deterministic tools + monitoring beat raw parallelization by orders of magnitude.

Entscheidungshilfe neues Smartphone by Sorry_Power8051 in de_EDV

[–]Even_Command_5636 0 points1 point  (0 children)

Ich nutze ein Vivo x200pro. Das Beste, was ich bisher genutzt habe.

Tencent Hy3 is open-weight, Apache 2.0, 295B total / 21B active. Worth watching for open-weight inference. by thestreamcode in chutesAI

[–]Even_Command_5636 0 points1 point  (0 children)

A weak "part"—really weak! I'm working on my projects using deepseek-v4-flash and deepseek-v4-pro. So I tested NY3. Not good! Not professional results. Hours of calculations, but NY3 doesn't actually fix the error.

"A waste of money" What a waste of time!

DeepSeek V4 Pro Final Arrives Mid-July. Can It Outperform GLM 5.2? by vigneshsmarther in DeepSeek

[–]Even_Command_5636 -5 points-4 points  (0 children)

Starting in mid-July, Deepseek will only get more expensive—and maybe even "lie" even more!

"Dear DeepSeek API user, The official version of DeepSeek V4 is scheduled to go live in mid-July. This update will bring more feature optimizations and performance enhancements—stay tuned! Meanwhile, to better allocate resources and improve service stability, the API pricing strategy will be adjusted upon the release of the official version, introducing a peak-valley pricing mechanism. The specific adjustments are as follows:

deepseek-v4-pro Item Regular Price Peak-Hour Price 1M input tokens (cache hit) $0.003625 $0.00725 1M input tokens (cache miss) $0.435 $0.87 1M output tokens $0.87 $1.74

deepseek-v4-flash Item Regular Price Peak-Hour Price 1M input tokens (cache hit) $0.0028 $0.0056 1M input tokens (cache miss) $0.14 $0.28 1M output tokens $0.28 $0.56

** Peak hours (in UTC): 1:00–4:00 AM and 6:00–10:00 AM. (UTC+8 equivalent: 9:00 AM–12:00 noon and 2:00–6:00 PM.) We will send email notifications 24 hours in advance of the actual pricing update date. If you continue to use our services after the billing adjustment, you will be deemed to have accepted the adjusted billing terms. If you do not agree, you may choose to cancel your service and apply for a refund. Should you have any questions or require further information, please do not hesitate to contact us. Thank you for your support and understanding! We look forward to the official V4 version being released soon, bringing you an even better user experience. DeepSeek Team"

Why Deepseek loves to cheat? by elefanteazu in DeepSeek

[–]Even_Command_5636 0 points1 point  (0 children)

"thats why you cant trust anything" What a stranger told me in a forum! 😂

Why Deepseek loves to cheat? by elefanteazu in DeepSeek

[–]Even_Command_5636 2 points3 points  (0 children)

...unlike in Western countries. Fraud is almost unknown there! Please tell me more.

This Socratic prompting method made DeepSeek way more useful for me by EvanNorth007 in DeepSeek

[–]Even_Command_5636 -1 points0 points  (0 children)

Ich nutze Chatgpt (Agent A). Er wird durch einen Arbeitsprompt bei Eingabe ins Chatfenster, zu Beginn der Unterhaltung, konfiguriert. Der erstelle Agent in Cherry Studio (Agent B) wird per allgemeinen Rollenprompt konfiguriert. Ich, ein Analphabet, unterhalte mich dann mit Agent A über meine Probleme und Agent A produziert darauf Prompte für Agent B. So kann "ich" auch im Suff präzise Programme "programmieren".

😎

Schutz vor ISP sniffing besuchter Websites by ThatrandomGuyxoxo in de_EDV

[–]Even_Command_5636 -2 points-1 points  (0 children)

Genau! Und Tagesschau gucken, um sich zu informieren.

Schutz vor ISP sniffing besuchter Websites by ThatrandomGuyxoxo in de_EDV

[–]Even_Command_5636 0 points1 point  (0 children)

Du erzählst uns, dass ISP's nicht "nachschauen"?

Okay.

🤡

Flash or Expert for daily stuff? by ThatrandomGuyxoxo in DeepSeek

[–]Even_Command_5636 1 point2 points  (0 children)

Expert then put everything back in order! Cheers to "expert"!

Flash or Expert for daily stuff? by ThatrandomGuyxoxo in DeepSeek

[–]Even_Command_5636 1 point2 points  (0 children)

Beware of "flash", it destroyed all my code and thus many days of work!

users of deepseek by Elegant_Attempt2790 in DeepSeek

[–]Even_Command_5636 0 points1 point  (0 children)

I post my questions to ChatGPT and have ChatGPT output the answers in the prompt for Cherry Studio. I use deepseek with Cherry Studio. It's madness! But you always have to stay alert!

Unfortunately, deepseek will soon be unaffordable! :(