dipti.d1
11/09/2026, 12:16 PMdipti.d1
11/09/2026, 12:17 PMRocky
11/09/2026, 12:17 PMdipti.d1
11/09/2026, 12:18 PMRocky
11/09/2026, 12:18 PMdatacache_eviction_policy (BE config, default slru since v3.4.0, not mutable). SLRU splits cache into an eviction segment and a protection segment: data enters the eviction segment on first access and is promoted to the protection segment only when accessed again. This specifically resists "sudden sparse traffic" — a one-off scan won't directly evict your hot working set. It's the closest thing to protection the docs describe, but it's a heuristic, not a guarantee.
2. Stop the noisy workload from populating the cache
Since population is what causes the eviction pressure, control it per session:
• SET populate_datacache_mode = 'never' — the scan reads from remote storage but never writes into the cache. (`auto`/`always`/`never`, v3.3.2+)
• SET enable_scan_datacache = false — bypass the data cache entirely for that session.
• SET skip_local_disk_cache = true — marks scan ranges to skip the local disk cache (v3.3.9/v3.4.0/v3.5.0).
Note StarRocks already skips population for non-SELECT statements and for queries that scan all partitions or all columns of a table.
3. Isolate by compute, not by cache
In a shared-data cluster the cache is local disk on each CN, so workloads routed to different warehouses (i.e. different CN sets) don't share cache at all — that's the only mechanism that actually gives you isolation. In shared-nothing, the equivalent is putting the workloads on disjoint BE node groups. Caveat: enable_datacache_sharing (v3.5.1+, default true) lets a node fetch blocks from other nodes in the cluster on a local miss, so if you rely on node separation, consider whether that's on.
4. Warm up before critical queries, but don't rely on it
CACHE SELECT ... (v3.3.0+) pre-populates the cache. The docs explicitly warn that warmed data "may still be evicted based on the SLRU rule" — so it improves hit rate, it does not pin data.
What doesn't exist: I found no documented per-tenant/per-workload cache quota, partition, or reservation for Data Cache, and no per-query cache pinning. datacache_disk_size / datacache_mem_size are per-BE/CN, and resource groups control CPU, concurrency and memory — not cache capacity. So "deterministic cache" isn't achievable today; the honest engineering answer is: separate warehouses for the workloads that must not interfere, plus populate_datacache_mode=never on the polluting workload, plus SLRU.
If you need a guaranteed quota, that's worth raising with the maintainers on GitHub (github.com/StarRocks/starrocks) or in the community Slack — I don't want to speculate on whether it's on the roadmap.
References
• deployment/shared_data/feature-support-shared-data.md
• sql-reference/System_variable.md
• data_source/block_cache_warmup.md
• data_source/data_cache.md