Hello Team, We have recently upgraded from 3.5 to ...
# questions-and-troubleshooting
m
Hello Team, We have recently upgraded from 3.5 to 4.1.1 and noticed few changes mainly on the "DataCacheMetrics" i'e DiskUsage is 0B/0B however this used to work with 3.5 version. I'm trying to setup as we did in 3.5 version in 4.1.1 but still it does not show anything
Copy code
SHOW COMPUTE NODES;
Status: Normal, DiskUsage: 0B/0B, MemUsage: 94KB/2GB
Status: Normal, DiskUsage: 0B/0B, MemUsage: 97.2KB/2GB
Status: Normal, DiskUsage: 0B/0B, MemUsage: 763.5MB/2GB
Status: Normal, DiskUsage: 0B/0B, MemUsage: 67.8KB/2GB
Status: Normal, DiskUsage: 0B/0B, MemUsage: 1.9GB/2GB
Anybody have noticed this behavior , please let us know how to get this metrics back online or make it work meaning showing in the metrics. thanks. I tried to follow this change however i don't see any luck in getting this so - https://starrocks.slack.com/archives/C02FACZSNJV/p1785459758860569?thread_ts=1784643758.586899&cid=C02FACZSNJV
@Rocky any help on this question? thanks
r
Hi! I'm Rocky. I'd love to help, but it looks like the question didn't come through in your message. Could you please provide the details, such as an error message, a specific query, or the behavior you're seeing? Once you share that, I'll do my best to find the answer for you!
m
@Rocky We have recently upgraded from 3.5 to 4.1.1 and noticed few changes mainly on the "DataCacheMetrics" i'e DiskUsage is 0B/0B however this used to work with 3.5 version. I'm trying to setup as we did in 3.5 version in 4.1.1 but still it does not show anything
Copy code
SHOW COMPUTE NODES;
Status: Normal, DiskUsage: 0B/0B, MemUsage: 94KB/2GB
Status: Normal, DiskUsage: 0B/0B, MemUsage: 97.2KB/2GB
Status: Normal, DiskUsage: 0B/0B, MemUsage: 763.5MB/2GB
Status: Normal, DiskUsage: 0B/0B, MemUsage: 67.8KB/2GB
Status: Normal, DiskUsage: 0B/0B, MemUsage: 1.9GB/2GB
Anybody have noticed this behavior , please let us know how to get this metrics back online or make it work meaning showing in the metrics. thanks. I tried to follow this change however i don't see any luck in getting this so - https://starrocks.slack.com/archives/C02FACZSNJV/p1785459758860569?thread_ts=1784643758.586899&cid=C02FACZSNJV
r
It appears you are encountering a behavior change introduced in StarRocks 4.0 regarding how Data Cache (formerly Block Cache) parameters are named and managed. In the transition from 3.5 to 4.1.1, several Data Cache configuration parameters were renamed to simplify the naming convention and unify the system. If you are using the old parameter names in your
be.conf
(or CN configuration), the cluster may be ignoring them, leading to a default disk quota of
0B
. 1. Key Parameter Renames in 4.0+ From StarRocks 4.0 onwards, several
datacache_
prefixed parameters for disk management were shortened. You should update your configuration to use the new names: Old Parameter (v3.x) | New Parameter (v4.0+)
datacache_auto_adjust_enable
|
enable_datacache_disk_auto_adjust
datacache_disk_high_level
|
disk_high_level
datacache_disk_safe_level
|
disk_safe_level
datacache_disk_low_level
|
disk_low_level
2. Check Automatic Scaling If
DiskUsage
is showing
0B/0B
, it usually means the system has not allocated any disk quota. • Auto-adjustment: If you want StarRocks to automatically manage disk space, ensure
enable_datacache_disk_auto_adjust
is set to
true
(this is the default in 4.1). • Manual Quota: If you want to set a fixed size as you did in 3.5, ensure
datacache_disk_size
is set (e.g.,
datacache_disk_size = 1T
). 3. Verify with
information_schema
To see exactly what the BE/CN thinks its configuration and paths are, run this query:
Copy code
sql
SELECT * FROM information_schema.be_datacache_metrics;
Check the
DISK_QUOTA_BYTES
and
DIR_SPACES
columns. If
DISK_QUOTA_BYTES
is 0, the configuration isn't being applied. If
DIR_SPACES
is empty, the BE cannot find or access the
storage_root_path
used for caching. 4. Troubleshooting Steps 1. Update Configs: Update your
be.conf
or CN config files to use the new parameter names mentioned above. 2. Verify Path: Ensure
storage_root_path
is correctly defined. For Compute Nodes (CN), this is mandatory for disk caching to work. 3. Check Disk Space: StarRocks v3.3+ (including 4.x) may skip enabling Data Cache automatically if the disk usage is already above the
disk_high_level
(default 90%) or if the remaining space is too low. 4. Dynamic Update: You can try to force a quota change at runtime to see if it responds:
Copy code
sql
   -- Example: Manually set disk size to 100GB for all nodes
   UPDATE be_configs SET VALUE="100G" WHERE NAME="datacache_disk_size";
If the issue persists, check the BE/CN leader logs (
<http://be.INFO|be.INFO>
) during startup for any lines containing
datacache
or
block_cache
to see if there are errors initializing the cache instance. References • using_starrocks/caching/block_cache.md • data_source/data_cache.md • deployment/shared_data/feature-support-shared-data.md • data_source/data_cache_troubleshooting.md
m
@Rocky In 4.1.1 shared-data CN mode, datacache_disk_size doesn't affect block_cache_disk_quota_bytes —what parameter controls it?
r
In StarRocks 4.1, the Data Cache (which includes what was previously called Block Cache) has been unified into a single instance. The behavior change you are seeing is likely due to the new Unified Data Cache being enabled by default (
datacache_unified_instance_enable=true
), which changes which parameters the system respects. In StarRocks 4.1.1 shared-data mode, the parameter
block_cache_disk_quota_bytes
in the metrics is controlled primarily by: 1. The
datacache_disk_size
Parameter
In the unified instance,
datacache_disk_size
is the primary control. However, there are two critical things to note: * Default is 0: Unlike previous versions where some defaults were automatically applied, in the unified instance,
datacache_disk_size
defaults to
0
, which means disk caching is effectively disabled. * It supports Percentages: You can set it to a fixed size (e.g.,
500G
) or a percentage (e.g.,
80%
). * Per-Disk Limit: This value applies to each disk specified in your path configuration. If you have 2 disks and set
100G
, the total quota will be
200G
. 2. The
storage_root_path
Requirement
For Compute Nodes (CN), the
storage_root_path
is not set by default. If this parameter is empty or not configured in
cn.conf
, the Data Cache has no location to store data, and the quota will remain 0B/0B regardless of what you set in
datacache_disk_size
. * Fix: Ensure you have a path defined, e.g.,
storage_root_path = /data1/sr_cache;/data2/sr_cache
. 3. The
starlet_star_cache_disk_size_percent
Conflict
In version 3.5, you likely used
starlet_star_cache_disk_size_percent
to control the cache. * In 4.1, this parameter is ignored if
datacache_unified_instance_enable
is
true
(which is the default). * To get the 3.5 behavior back, you should set
datacache_disk_size
to a percentage (e.g.,
80%
) instead of using the old starlet parameter. 4. Check for Auto-Adjustment If you have
datacache_auto_adjust_enable=true
(the default), the system might start with a 0 quota if it detects that the disk is already near the
disk_high_level
(default 90%). ────────── Recommended Configuration for `cn.conf`: To resolve the
0B/0B
issue, verify and set the following in your `cn.conf`:
Copy code
properties
# 1. Enable the cache
datacache_enable = true

# 2. Specify the directory (MANDATORY for CN)
storage_root_path = /your/fast/disk/path

# 3. Set the size (use a percentage to mimic 3.5 behavior)
datacache_disk_size = 80%

# 4. Optional: If you specifically want the old starlet logic (not recommended)
# datacache_unified_instance_enable = false
Verification After restarting the CN, run the following to see the active configuration:
Copy code
sql
-- Check if the system recognizes the path and size
SELECT * FROM information_schema.be_configs WHERE NAME IN ('storage_root_path', 'datacache_disk_size', 'datacache_enable');

-- Check the active metrics
SELECT * FROM information_schema.be_datacache_metrics;
If
DISK_QUOTA_BYTES
is still 0, check the CN leader log (
<http://cn.INFO|cn.INFO>
) for lines containing
fail to write block because no valid cache space
or
datacache
initialization errors, which usually point to permission issues or a missing
storage_root_path
. References • using_starrocks/caching/block_cache.md • data_source/data_cache.md