Junhyeog Lee
05/04/2026, 3:31 AMRocky
05/04/2026, 3:32 AMenable_iceberg_metadata_cache) was intentionally disabled by default for specific metastores to ensure data freshness:
* v3.2.4 to v3.3.0: If you use a Hive Metastore, this cache defaults to false. It remains true by default for AWS Glue.
* v3.3.0 onwards: It was changed back to true by default for all metastores because StarRocks introduced a more robust metadata polling mechanism.
* Why? This was done to prevent users from seeing stale data when changes were made to the Iceberg table outside of StarRocks, as older versions didn't always have reliable background refresh for Hive Metastore.
2. Adaptive Metadata Planning (v3.3+)
Starting in v3.3, StarRocks uses an Adaptive Metadata Retrieval Strategy.
* Small Metadata: It uses a Local Plan, which caches deserialized memory objects (like Avro manifest files) in the FE's memory.
* Large Metadata: For large tables, it automatically switches to a Distributed Plan. In this mode, the work of parsing manifest files is distributed to the BEs/CNs. Because the BEs process the manifests in parallel, the FE does not keep the entire parsed manifest in its local memory cache, which might make it appear as though the "memory cache" is not being used.
3. BE Data Cache (File Data)
If you are referring to the Data Cache (caching the actual Parquet/ORC data files on the BE), it is primarily disk-based:
* Disk vs. Memory: By default, the Data Cache uses local SSD/NVMe disks. The memory tier of the Data Cache is disabled by default (datacache_mem_size = 0).
* To check: You can run SHOW BACKENDS and look at the DataCacheMetrics. If mem_quota_bytes is 0, the memory tier is not enabled.
4. Metadata File Size Limits
There is a safety limit on the size of metadata files that can be cached in memory.
* Parameter: iceberg_metadata_cache_max_entry_size (FE configuration).
* Default: 8 MB.
* If your Iceberg manifest files or metadata files exceed this size, StarRocks will intentionally bypass the memory cache and read them directly from remote storage to avoid causing Out-of-Memory (OOM) issues on the FE.
Summary of configurations to check:
* Catalog Property: enable_iceberg_metadata_cache (Set to true to enable metadata caching).
* FE Config: iceberg_metadata_memory_cache_capacity (Defaults to 512MB).
* FE Config: iceberg_metadata_cache_max_entry_size (Increase if your manifest files are large).
* Session Variable: plan_mode (Set to local to force FE-based local caching for testing, though auto is recommended).
Is it intentional? If you are on v3.2.x using Hive, or if your manifest files are larger than 8MB, yes, it is the intended default/intentional behavior. Otherwise, you may need to manually enable the properties above.
References
• data_source/catalog/iceberg/iceberg_catalog.md
• deployment/shared_data/feature-support-shared-data.md
• data_source/feature-support-data-lake-analytics.mdJunhyeog Lee
05/04/2026, 3:36 AMmem_quota_byte. It seems like I can’t modify it—am I right?Rocky
05/04/2026, 3:36 AMmem_quota_bytes (visible in SHOW BACKENDS or SHOW COMPUTE NODES under the DataCacheMetrics column) is a status metric, not a configuration name. This is likely why you are unable to modify it directly.
To change this value, you must modify the underlying BE configuration: datacache_mem_size.
How to modify it
You have two ways to modify the memory quota for the Data Cache:
1. Dynamic Modification (No restart required)
You can adjust the memory limit at runtime using the UPDATE be_configs statement. Note that this change is not persistent and will be lost if the BE restarts.
sql
-- Adjust for a specific BE
UPDATE be_configs SET VALUE="10G" WHERE NAME="datacache_mem_size" AND BE_ID=<be_id>;
-- Adjust for all BEs using a percentage of total RAM
UPDATE be_configs SET VALUE="10%" WHERE NAME="datacache_mem_size";
2. Persistent Modification (Restart required)
To make the change permanent, you must edit the be.conf (or cn.conf) file on each node:
1. Open conf/be.conf.
2. Add or update the line: datacache_mem_size = 10G (or 10%).
3. Restart the BE/CN process.
Why it might still show as 0 or fail to update
If you've tried the above and mem_quota_bytes is still not updating, check the following:
* datacache_enable: Ensure this is set to true in your be.conf. In some older versions, this parameter is immutable (requires a restart to enable) before you can start tuning the sizes.
* Version Compatibility: Dynamic configuration (UPDATE be_configs) was introduced in later versions (v3.2+). If you are on an older version, you must use the be.conf method.
* Parameter Name: Ensure you are using datacache_mem_size. The metric mem_quota_bytes is simply a read-only reflection of what this parameter is set to.
* Memory Availability: If you set a physical limit (e.g., 100G) that exceeds the physical RAM available to the process, the BE might fail to allocate the cache or default back to a safe value.
Important Note on Iceberg
For Iceberg, the mem_quota_bytes refers to the Data Cache (caching the actual Parquet/ORC data). If you were looking to cache Metadata (manifest files, etc.), that is controlled by FE configurations like iceberg_metadata_cache_max_entry_size and enable_iceberg_metadata_cache in the Catalog properties.
References
• administration/management/BE_configuration.md
• deployment/deploy_manually.mdJunhyeog Lee
05/04/2026, 5:09 AMRocky
05/04/2026, 5:09 AMStarCacheEngine memory quota you mentioned), a cache hit would still require the CPU to decompress the block into a page before it could be used. By funneling datacache_mem_size into the Page Cache, StarRocks ensures that memory—the most expensive resource—is used for the highest-value data (ready-to-use pages).
2. Implementation in 4.0.x
You are correct regarding the code path:
* datacache_mem_size: In the unified 4.0 architecture, this parameter effectively controls the memory quota for the Page Cache.
* StarCacheEngine (Block Cache): In the current version, this engine is optimized specifically as a disk-based cache to handle the massive volume of data lake files that cannot fit in memory.
* block_cache_mem_size: As you noted, this is deprecated or marked for future use. While the underlying StarCacheEngine (based on Starlet) has the structural capability to support a memory tier (mem_space_size), it is intentionally left at 0 because the Page Cache already serves the role of the memory tier for the unified system.
3. What this means for Iceberg
When you query Iceberg:
* If you see DataCacheReadMemBytes in your query profile, it is indeed reporting hits from the Page Cache (specifically the Parquet/ORC page cache for external tables).
* If you see DataCacheReadDiskBytes, it is reporting hits from the Block Cache (disk tier).
* The "Intentional" Limitation: There is no "raw block memory cache" because it would be redundant and less efficient than the Page Cache.
Summary
Your assessment is spot on: for Iceberg in StarRocks 4.0.9, the Page Cache is the only functional memory tier for data. The lack of propagation to `StarCacheEngine`'s mem_space_size is not a bug, but a result of the design choice to use Page Cache for all in-memory data caching while delegating raw block caching strictly to the disk tier.
If you are looking to increase memory caching for Iceberg, you should continue to use datacache_mem_size, which will increase the capacity of the Page Cache that Iceberg uses.
References
• data_source/block_cache_warmup.md
• data_source/catalog/iceberg/iceberg_catalog.md
• data_source/feature-support-data-lake-analytics.md
• using_starrocks/caching/block_cache.md