<@U0A71G31CDV> "I would like to disable all cachi...
# questions-and-troubleshooting
s
@Rocky "I would like to disable all caching functionalities in StarRocks. Could you please provide detailed instructions on how to turn off the cache settings for both FE (Frontend) and CN (Compute Node) components?"
r
To disable caching in StarRocks, you must address multiple layers of caching across the Frontend (FE), Compute Node (CN/BE), and session-level variables. 1. Disable Caching via Session Variables (Global or Session) These variables control high-level query result caching and data access behavior. You can set them globally to affect the entire cluster.
Copy code
sql
-- Disable Query Cache (Result-level caching on BE)
SET GLOBAL enable_query_cache = false;

-- Disable Data Cache (For shared-data or external tables, formerly enable_scan_block_cache)
SET GLOBAL enable_scan_datacache = false;

-- Disable Materialized View rewrite context cache (v3.3+)
SET GLOBAL enable_mv_query_context_cache = false;
2. Disable Caching on CN or BE (be.conf / cn.conf) Modify the configuration file (
be.conf
or
cn.conf
) and restart the node for these to take effect. * Data Cache (Total Toggle): Disables both Page Cache and Block Cache.
Copy code
properties
    datacache_enable = false
* Storage Page Cache: Specifically caches scanned data pages in memory.
Copy code
properties
    disable_storage_page_cache = true
* Metadata Cache (v3.2.10+): Caches rowset metadata. Set to 0 to disable.
Copy code
properties
    metadata_cache_memory_limit_percent = 0
* Query Cache Capacity: While
enable_query_cache
is the primary toggle, you can also set the capacity to zero.
Copy code
properties
    query_cache_capacity = 0
3. Disable Caching on FE (fe.conf) Modify
fe.conf
and restart the FE. These primarily affect metadata and catalog-level caching. * Connector Metadata Refresh: Disables automatic background refreshing of metadata for Hive/Iceberg catalogs.
Copy code
properties
    enable_background_refresh_connector_metadata = false
* JDBC Metadata Cache: Ensures new JDBC catalogs do not use metadata caching by default.
Copy code
properties
    jdbc_meta_default_cache_enable = false
* DNS Cache: If you need to disable JVM-level DNS caching.
Copy code
properties
    dns_cache_ttl_seconds = 0
* Iceberg-specific Disk Cache:
Copy code
properties
    enable_iceberg_metadata_disk_cache = false
Summary Checklist Component | Setting | File/Command Global |
enable_query_cache = false
|
SET GLOBAL ...
Global |
enable_scan_datacache = false
|
SET GLOBAL ...
CN/BE |
datacache_enable = false
|
cn.conf
/
be.conf
CN/BE |
disable_storage_page_cache = true
|
cn.conf
/
be.conf
FE |
enable_background_refresh_connector_metadata = false
|
fe.conf
Note: Disabling all caches will significantly increase I/O load on your storage (local disks or object storage) and may cause a noticeable drop in query performance, especially for repeated or concurrent workloads. Referencesusing_starrocks/caching/block_cache.mdadministration/management/BE_configuration.mdusing_starrocks/caching/query_cache.mdadministration/management/FE_configuration.mddata_source/data_cache.md
1