BE Configuration
Some BE configuration items are dynamic parameters which you can set interactively when BE nodes are online. The rest of them are static parameters. You can only set the static parameters of a BE node by changing them in the corresponding configuration file be.conf and restarting the BE node to allow the change to take effect.
View BE configuration items
You can view the BE configuration items using the following command:
curl http://<BE_IP>:<BE_HTTP_PORT>/varz
Configure BE parameters
Configure BE dynamic parameters
You can configure a dynamic parameter of a BE node by using the curl
command.
curl -XPOST http://be_host:http_port/api/update_config?<configuration_item>=<value>
Configure BE static parameters
You can only set the static parameters of a BE by changing them in the corresponding configuration file be.conf, and restarting the BE to allow the changes to take effect.
Understand BE Parameters
Server
priority_networks
- Default: Empty string
- Type: String
- Unit: -
- Is mutable: No
- Description: The CIDR-formatted IP address that is used to specify the priority IP address of a BE node if the machine that hosts the BE node has multiple IP addresses.
- Introduced in: -
mem_limit
- Default: 90%
- Type: String
- Unit: -
- Is mutable: No
- Description: BE process memory upper limit. You can set it as a percentage ("80%") or a physical limit ("100G"). The default hard limit is 90% of the server's memory size, and the soft limit is 80%. You need to configure this parameter if you want to deploy StarRocks with other memory-intensive services on a same server.
- Introduced in: -
num_threads_per_core
- Default: 3
- Type: Int
- Unit: -
- Is mutable: No
- Description: The number of threads started on each CPU core.
- Introduced in: -
be_http_port
- Default: 8040
- Type: Int
- Unit: -
- Is mutable: No
- Description: The BE HTTP server port.
- Introduced in: -
be_http_num_workers
- Default: 48
- Type: Int
- Unit: -
- Is mutable: No
- Description: The number of threads used by the HTTP server.
- Introduced in: -
be_exit_after_disk_write_hang_second
- Default: 60
- Type: Int
- Unit: Seconds
- Is mutable: No
- Description: The length of time that the BE waits to exit after the disk hangs.
- Introduced in: -
compress_rowbatches
- Default: true
- Type: Boolean
- Unit: -
- Is mutable: No
- Description: A boolean value to control whether to compress the row batches in RPCs between BEs.
true
indicates compressing the row batches, andfalse
indicates not compressing them. - Introduced in: -
serialize_batch
- Default: false
- Type: Boolean
- Unit: -
- Is mutable: No
- Description: A boolean value to control whether to serialize the row batches in RPCs between BEs.
true
indicates serializing the row batches, andfalse
indicates not serializing them. - Introduced in: -
Thrift
be_port
- Default: 9060
- Type: Int
- Unit: -
- Is mutable: No
- Description: The BE thrift server port, which is used to receive requests from FEs.
- Introduced in: -
thrift_client_retry_interval_ms
- Default: 100
- Type: Int
- Unit: Milliseconds
- Is mutable: Yes
- Description: The time interval at which a thrift client retries.
- Introduced in: -
thrift_rpc_timeout_ms
- Default: 5000
- Type: Int
- Unit: Milliseconds
- Is mutable: Yes
- Description: The timeout for a thrift RPC.
- Introduced in: -
bRPC
brpc_port
- Default: 8060
- Type: Int
- Unit: -
- Is mutable: No
- Description: The BE bRPC port, which is used to view the network statistics of bRPCs.
- Introduced in: -
brpc_num_threads
- Default: -1
- Type: Int
- Unit: -
- Is mutable: No
- Description: The number of bthreads of a bRPC. The value
-1
indicates the same number with the CPU threads. - Introduced in: -
brpc_max_body_size
- Default: 2147483648
- Type: Int
- Unit: Bytes
- Is mutable: No
- Description: The maximum body size of a bRPC.
- Introduced in: -
Heartbeat
heartbeat_service_port
- Default: 9050
- Type: Int
- Unit: -
- Is mutable: No
- Description: The BE heartbeat service port, which is used to receive heartbeats from FEs.
- Introduced in: -
heartbeat_service_thread_count
- Default: 1
- Type: Int
- Unit: -
- Is mutable: No
- Description: The thread count of the BE heartbeat service.
- Introduced in: -
Logging
sys_log_dir
- Default:
${STARROCKS_HOME}/log
- Type: String
- Unit: -
- Is mutable: No
- Description: The directory that stores system logs (including INFO, WARNING, ERROR, and FATAL).
- Introduced in: -
sys_log_level
- Default: INFO
- Type: String
- Unit: -
- Is mutable: Yes (from v3.3.0, v3.2.7, and v3.1.12)
- Description: The severity levels into which system log entries are classified. Valid values: INFO, WARN, ERROR, and FATAL. This item was changed to a dynamic configuration from v3.3.0, v3.2.7, and v3.1.12 onwards.
- Introduced in: -
sys_log_roll_mode
- Default: SIZE-MB-1024
- Type: String
- Unit: -
- Is mutable: No
- Description: The mode in which system logs are segmented into log rolls. Valid values include
TIME-DAY
,TIME-HOUR
, andSIZE-MB-
size. The default value indicates that logs are segmented into rolls, each of which is 1 GB. - Introduced in: -
sys_log_roll_num
- Default: 10
- Type: Int
- Unit: -
- Is mutable: No
- Description: The number of log rolls to reserve.
- Introduced in: -
sys_log_verbose_modules
- Default:
- Type: Strings
- Unit: -
- Is mutable: No
- Description: The module of the logs to be printed. For example, if you set this configuration item to OLAP, StarRocks only prints the logs of the OLAP module. Valid values are namespaces in BE, including
starrocks
,starrocks::debug
,starrocks::fs
,starrocks::io
,starrocks::lake
,starrocks::pipeline
,starrocks::query_cache
,starrocks::stream
, andstarrocks::workgroup
. - Introduced in: -
sys_log_verbose_level
- Default: 10
- Type: Int
- Unit: -
- Is mutable: No
- Description: The level of the logs to be printed. This configuration item is used to control the output of logs initiated with VLOG in codes.
- Introduced in: -
log_buffer_level
- Default: Empty string
- Type: String
- Unit: -
- Is mutable: No
- Description: The strategy for flushing logs. The default value indicates that logs are buffered in memory. Valid values are
-1
and0
.-1
indicates that logs are not buffered in memory. - Introduced in: -
Statistic report
report_task_interval_seconds
- Default: 10
- Type: Int
- Unit: Seconds
- Is mutable: Yes
- Description: The time interval at which to report the state of a task. A task can be creating a table, dropping a table, loading data, or changing a table schema.
- Introduced in: -
report_disk_state_interval_seconds
- Default: 60
- Type: Int
- Unit: Seconds
- Is mutable: Yes
- Description: The time interval at which to report the storage volume state, which includes the size of data within the volume.
- Introduced in: -
report_tablet_interval_seconds
- Default: 60
- Type: Int
- Unit: Seconds
- Is mutable: Yes
- Description: The time interval at which to report the most updated version of all tablets.
- Introduced in: -
report_workgroup_interval_seconds
- Default: 5
- Type: Int
- Unit: Seconds
- Is mutable: Yes
- Description: The time interval at which to report the most updated version of all workgroups.
- Introduced in: -
status_report_interval
- Default: 5
- Type: Int
- Unit: Seconds
- Is mutable: Yes
- Description: The time interval at which a query reports its profile, which can be used for query statistics collection by FE.
- Introduced in: -
periodic_counter_update_period_ms
- Default: 500
- Type: Int
- Unit: Milliseconds
- Is mutable: Yes
- Description: The time interval at which to collect the Counter statistics.
- Introduced in: -
Storage
primary_key_limit_size
- Default: 128
- Type: Int
- Unit: Bytes
- Is mutable: Yes
- Description: The maximum size of a key column in Primary Key tables.
- Introduced in: v2.5
drop_tablet_worker_count
- Default: 3
- Type: Int
- Unit: -
- Is mutable: Yes
- Description: The number of threads used to drop a tablet.
- Introduced in: -
alter_tablet_worker_count
- Default: 3
- Type: Int
- Unit: -
- Is mutable: Yes
- Description: The number of threads used for Schema Change.
- Introduced in: -
clone_worker_count
- Default: 3
- Type: Int
- Unit: -
- Is mutable: No
- Description: The number of threads used for clone.
- Introduced in: -
storage_medium_migrate_count
- Default: 3
- Type: Int
- Unit: -
- Is mutable: No
- Description: The number of threads used for storage medium migration (from SATA to SSD).
- Introduced in: -
check_consistency_worker_count
- Default: 1
- Type: Int
- Unit: -
- Is mutable: No
- Description: The number of threads used for checking the consistency of tablets.
- Introduced in: -
upload_worker_count
- Default: 0
- Type: Int
- Unit: -
- Is mutable: Yes
- Description: The maximum number of threads for the upload tasks of backup jobs on a BE node.
0
indicates setting the value to the number of CPU cores on the machine where the BE resides. - Introduced in: -
download_worker_count
- Default: 0
- Type: Int
- Unit: -
- Is mutable: Yes
- Description: The maximum number of threads for the download tasks of restore jobs on a BE node.
0
indicates setting the value to the number of CPU cores on the machine where the BE resides. - Introduced in: -
make_snapshot_worker_count
- Default: 5
- Type: Int
- Unit: -
- Is mutable: Yes
- Description: The maximum number of threads for the make snapshot tasks on a BE node.
- Introduced in: -
release_snapshot_worker_count
- Default: 5
- Type: Int
- Unit: -
- Is mutable: Yes
- Description: The maximum number of threads for the release snapshot tasks on a BE node.
- Introduced in: -
max_download_speed_kbps
- Default: 50000
- Type: Int
- Unit: KB/Second
- Is mutable: Yes
- Description: The maximum download speed of each HTTP request. This value affects the performance of data replica synchronization across BE nodes.
- Introduced in: -
download_low_speed_limit_kbps
- Default: 50
- Type: Int
- Unit: KB/Second
- Is mutable: Yes
- Description: The download speed lower limit of each HTTP request. An HTTP request aborts when it constantly runs with a lower speed than this value within the time span specified in the configuration item
download_low_speed_time
. - Introduced in: -
download_low_speed_time
- Default: 300
- Type: Int
- Unit: Seconds
- Is mutable: Yes
- Description: The maximum time that an HTTP request can run with a download speed lower than the limit. An HTTP request aborts when it constantly runs with a lower speed than the value of
download_low_speed_limit_kbps
within the time span specified in this configuration item. - Introduced in: -
memory_limitation_per_thread_for_schema_change
- Default: 2
- Type: Int
- Unit: GB
- Is mutable: Yes
- Description: The maximum memory size allowed for each schema change task.
- Introduced in: -
update_cache_expire_sec
- Default: 360
- Type: Int
- Unit: Seconds
- Is mutable: Yes
- Description: The expiration time of Update Cache.
- Introduced in: -
file_descriptor_cache_clean_interval
- Default: 3600
- Type: Int
- Unit: Seconds
- Is mutable: Yes
- Description: The time interval at which to clean file descriptors that have not been used for a certain period of time.
- Introduced in: -
disk_stat_monitor_interval
- Default: 5
- Type: Int
- Unit: Seconds
- Is mutable: Yes
- Description: The time interval at which to monitor health status of disks.
- Introduced in: -
unused_rowset_monitor_interval
- Default: 30
- Type: Int
- Unit: Seconds
- Is mutable: Yes
- Description: The time interval at which to clean the expired rowsets.
- Introduced in: -
storage_root_path
- Default:
${STARROCKS_HOME}/storage
- Type: String
- Unit: -
- Is mutable: No
- Description: The directory and medium of the storage volume. Example:
/data1,medium:hdd;/data2,medium:ssd
.- Multiple volumes are separated by semicolons (
;
). - If the storage medium is SSD, add
,medium:ssd
at the end of the directory. - If the storage medium is HDD, add
,medium:hdd
at the end of the directory.
- Multiple volumes are separated by semicolons (
- Introduced in: -
max_percentage_of_error_disk
- Default: 0
- Type: Int
- Unit: -
- Is mutable: Yes
- Description: The maximum percentage of error that is tolerable in a storage volume before the corresponding BE node quits.
- Introduced in: -
default_num_rows_per_column_file_block
- Default: 1024
- Type: Int
- Unit: -
- Is mutable: Yes
- Description: The maximum number of rows that can be stored in each row block.
- Introduced in: -
max_tablet_num_per_shard
- Default: 1024
- Type: Int
- Unit: -
- Is mutable: No
- Description: The maximum number of tablets in each shard. This configuration item is used to restrict the number of tablet child directories under each storage directory.
- Introduced in: -
pending_data_expire_time_sec
- Default: 1800
- Type: Int
- Unit: Seconds
- Is mutable: Yes
- Description: The expiration time of the pending data in the storage engine.
- Introduced in: -
inc_rowset_expired_sec
- Default: 1800
- Type: Int
- Unit: Seconds
- Is mutable: Yes
- Description: The expiration time of the incoming data. This configuration item is used in incremental clone.
- Introduced in: -
tablet_rowset_stale_sweep_time_sec
- Default: 1800
- Type: Int
- Unit: Seconds
- Is mutable: Yes
- Description: The time interval at which to sweep the stale rowsets in tablets.
- Introduced in: -
max_garbage_sweep_interval
- Default: 3600
- Type: Int
- Unit: Seconds
- Is mutable: Yes
- Description: The maximum time interval for garbage collection on storage volumes. This configuration is changed to dynamic from v3.0 onwards.
- Introduced in: -
min_garbage_sweep_interval
- Default: 180
- Type: Int
- Unit: Seconds
- Is mutable: Yes
- Description: The minimum time interval for garbage collection on storage volumes. This configuration is changed to dynamic from v3.0 onwards.
- Introduced in: -
snapshot_expire_time_sec
- Default: 172800
- Type: Int
- Unit: Seconds
- Is mutable: Yes
- Description: The expiration time of snapshot files.
- Introduced in: -
trash_file_expire_time_sec
- Default: 86400
- Type: Int
- Unit: Seconds
- Is mutable: Yes
- Description: The time interval at which to clean trash files. The default value has been changed from 259,200 to 86,400 since v2.5.17, v3.0.9, and v3.1.6.
- Introduced in: -
compact_threads
- Default: 4
- Type: Int
- Unit: -
- Is mutable: Yes
- Description: The maximum number of threads used for concurrent compaction tasks. This configuration is changed to dynamic from v3.1.7 and v3.2.2 onwards.
- Introduced in: v3.0.0
base_compaction_check_interval_seconds
- Default: 60
- Type: Int
- Unit: Seconds
- Is mutable: Yes
- Description: The time interval of thread polling for a Base Compaction.
- Introduced in: -
min_base_compaction_num_singleton_deltas
- Default: 5
- Type: Int
- Unit: -
- Is mutable: Yes
- Description: The minimum number of segments that trigger a Base Compaction.
- Introduced in: -
max_base_compaction_num_singleton_deltas
- Default: 100
- Type: Int
- Unit: -
- Is mutable: Yes
- Description: The maximum number of segments that can be compacted in each Base Compaction.
- Introduced in: -
base_compaction_num_threads_per_disk
- Default: 1
- Type: Int
- Unit: -
- Is mutable: No
- Description: The number of threads used for Base Compaction on each storage volume.
- Introduced in: -
base_cumulative_delta_ratio
- Default: 0.3
- Type: Double
- Unit: -
- Is mutable: Yes
- Description: The ratio of cumulative file size to base file size. The ratio reaching this value is one of the conditions that trigger the Base Compaction.
- Introduced in: -
base_compaction_interval_seconds_since_last_operation
- Default: 86400
- Type: Int
- Unit: Seconds
- Is mutable: Yes
- Description: The time interval since the last Base Compaction. This configuration item is one of the conditions that trigger a Base Compaction.
- Introduced in: -