This is an automated email from the ASF dual-hosted git repository. JackieTien97 pushed a commit to branch ty/heartbeat-ratis-edge in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 14f20333a907db1699ba6b884bab9c9f40a07c88 Author: JackieTien97 <[email protected]> AuthorDate: Thu Sep 3 10:32:52 2026 +0800 Change default edge ratis configuration --- .../resources/conf/edge/iotdb-system.properties | 40 +++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/iotdb-core/node-commons/src/assembly/resources/conf/edge/iotdb-system.properties b/iotdb-core/node-commons/src/assembly/resources/conf/edge/iotdb-system.properties index 7ce4bc5922f..a4686233b71 100644 --- a/iotdb-core/node-commons/src/assembly/resources/conf/edge/iotdb-system.properties +++ b/iotdb-core/node-commons/src/assembly/resources/conf/edge/iotdb-system.properties @@ -137,6 +137,38 @@ series_slot_num=1 cn_metric_level=OFF dn_metric_level=OFF +# ---- ratis snapshot tuning (bound raft log disk usage on small edge nodes) ---- +# Ratis can only purge raft log entries that are already covered by a snapshot. +# With stock defaults (snapshot at 400000 logs or every 24h, 24MB segments) the +# ConfigNode / schema region logs may grow toward their 2GB log max +# (*_ratis_log_max_in_byte), which is oversized for edge disks. Snapshot +# earlier and more often so each purge happens while the log is still small; +# the snapshotted state is tiny on an edge node, so the extra snapshots are +# cheap background work. + +# Snapshot after every 5000 appended raft log entries instead of the stock +# 400000, so the log is truncated much sooner (stock default: 400000). +config_node_ratis_snapshot_trigger_threshold=5000 +schema_region_ratis_snapshot_trigger_threshold=5000 + +# Roll raft log segments at 6MB instead of 24MB: less unpurgeable slack in the +# currently open segment and finer-grained deletion at purge time (stock +# default: 25165824, i.e. 24MB). +config_node_ratis_log_segment_size_max_in_byte=6291456 +schema_region_ratis_log_segment_size_max_in_byte=6291456 + +# Each purge always keeps the most recent N raft log entries, even if they are +# already covered by a snapshot; lower the safety margin from the stock 1000 +# to 200 so the log shrinks further after every purge (stock default: 1000). +config_node_ratis_preserve_logs_num_when_purge=200 +schema_region_ratis_preserve_logs_num_when_purge=200 + +# Force a snapshot when the newest one is older than 30 minutes instead of +# 24 hours, so an idle node's log cannot accumulate for hours between +# snapshots (stock default: 86400, i.e. 24h; unit: seconds). +config_node_ratis_periodic_snapshot_interval=1800 +schema_region_ratis_periodic_snapshot_interval=1800 + # ---- realtime pipe sync out of the box ---- # The pipe memory pool is 10% of the heap (~22MB at the default 224M budget), # while the stock pipe memory estimates are sized for datacenter nodes: each @@ -149,4 +181,10 @@ dn_metric_level=OFF # latency (single-record p99 < 500ms). pipe_insert_node_queue_memory=2097152 pipe_enable_memory_checked=false -pipe_logger_cache_max_size_in_bytes=1048576 \ No newline at end of file +pipe_logger_cache_max_size_in_bytes=1048576 + +# The ConfigNode's separated pipe heartbeat polls every DataNode for pipe +# runtime meta (progress, remaining events, degraded/failure status) every +# 30s instead of the stock 3s: fewer background heartbeat round trips on a +# small node, at the cost of ~30s staleness in pipe status (stock: 3). +pipe_heartbeat_interval_seconds_for_collecting_pipe_meta=30 \ No newline at end of file
