dipti.d1
11/02/2026, 2:36 PMRocky
11/02/2026, 2:36 PMslru (controlled by datacache_eviction_policy). SLRU divides the cache into "eviction" and "protection" segments. Data only moves to the protection segment after being accessed multiple times. This prevents one-off large scans (e.g., an ETL workload) from immediately evicting the "hot" data used by a high-priority dashboard.
* Physical Isolation (CN Groups): In shared-data (cloud-native) architectures, the most effective way to prioritize one workload's cache is to use separate Compute Node (CN) groups. You can point a specific Resource Group to a dedicated set of CN nodes. Since each CN node has its own local disk cache, the workloads will not compete for the same cache space.
* Time-based Prioritization: You can use the table property datacache.partition_duration to only cache data within a certain time window (e.g., the last 7 days). This ensures that "old" data from background workloads doesn't take up space that could be used by "fresh" data.
* Manual Warmup: You can use CACHE SELECT to proactively load data into the cache for a specific tenant before they start their workday, though this doesn't protect it from later eviction if the disk fills up.
2. Query Cache
The Query Cache (Result Cache) is managed by the FE or BE using a global memory limit:
* Eviction Policy: It uses a standard LRU (Least Recently Used) policy.
* No Multi-tenant Quotas: There are currently no settings to reserve portions of the Query Cache for specific users or resource groups. If one tenant runs many unique queries, they could theoretically evict the cached results of another tenant.
* Control: You can enable or disable Query Cache at the session level (SET enable_query_cache = true/false). You might consider disabling it for heavy ETL workloads to prevent them from "polluting" the cache with results that are unlikely to be reused.
Summary for Multi-tenant Environments
If you need strict cache isolation where one tenant's activity cannot evict another's:
1. Use separate CN groups for the different tenants/workloads.
2. Use Resource Groups to route the specific tenants to their respective CN groups.
3. For shared clusters, rely on the slru policy to protect hot data from "bursty" or "heavy scan" workloads.
If you have specific performance issues with cache contention, you may want to check the official StarRocks Documentation on Resource Management or discuss your architecture with the community on Slack.
References
• faq/resource_isolation_faq.md
• administration/management/resource_management/resource_group.md
• administration/management/monitoring/metrics.mddipti.d1
11/02/2026, 2:37 PMRocky
11/02/2026, 2:38 PMSET warehouse = 'group_name';. Since each group has its own local disks, the Data Cache is physically isolated.
3. Solutions for Multi-tenant Isolation
If you are using the Open Source (Community) Edition, you have two main strategies for multi-tenancy:
A. Resource Groups (v2.2+)
Standard Resource Groups allow you to limit CPU and Memory per tenant, but they apply uniformly across all nodes in the cluster.
* Pros: Easy to set up; prevents one tenant from hogging all CPU/RAM.
* Cons: No cache isolation. A heavy scan from Tenant A can still evict the hot data cache used by Tenant B because they share the same physical disks/nodes.
B. Multiple Clusters (Shared-Data Architecture)
Since StarRocks v3.0+ supports a shared-data (cloud-native) architecture where data is stored in S3/HDFS:
* You can deploy two separate StarRocks clusters (with their own FEs and CNs) pointing to the same remote storage.
* Tenant A uses Cluster 1; Tenant B uses Cluster 2.
* This provides 100% isolation for both Query and Data Cache, as each cluster has its own independent compute and local disk cache.
Summary
Feature | OS / Community | Enterprise / Managed | Version
Resource Isolation (CPU/Mem) | Yes (Resource Groups) | Yes | v2.2+
Physical Cache Isolation | Multiple Clusters | Yes (Warehouses) | v3.1+
Cache Eviction Priority | No | No | N/A
For strict multi-tenant environments where you want to protect the cache of one workload from another, we recommend using the shared-data architecture with either separate clusters (OS) or Compute Groups (Enterprise).
References
• administration/management/resource_management/resource_group.md
• faq/resource_isolation_faq.md
• deployment/shared_data/feature-support-shared-data.md
References
• release_notes/release-3.1.md