Edit

Parameter configuration

This topic describes FE, BE, Broker, and system parameters. It also provides suggestions on how to configure and tune these parameters.

FE configuration items

Configuration ItemDefaultRole
log_roll_size_mb1024Size of log split, per 1G
sys_log_dirStarRocksFe.STARROCKS_HOME_DIR/logDirectory where logs are kept
sys_log_levelINFOlog level,INFO < WARNING < ERROR < FATAL
sys_log_verbose_modulesempty stringModules for log printing, write org.starrocks.catalog to print only the logs that are under the catalog module
sys_log_roll_intervalDAYThe interval for log splitting
sys_log_delete_age7dThe interval for log deletion
sys_log_roll_mode1024The size of the log split, per 1G
audit_log_dirstarrocksFe.STARROCKS_HOME_DIR/logDirectory where audit logs are kept
audit_log_roll_num90The number of audit logs to keep
audit_log_modules"slow_query", "query"Modules for audit log printing, default retains slow_query and query
qe_slow_log_ms5000
audit_log_roll_intervalDAYThe interval for audit log splitting
audit_log_delete_age30dThe interval for audit log deletion
audit_log_roll_modeTIME-DAYThe interval for audit log splitting
label_keep_max_second259200The time to keep the label, with a default value of 3 days. The longer the keep time, the more memory to consume
history_job_keep_max_second604800Maximum retention time for historical jobs, such as schema change jobs, 7 days by default
label_clean_interval_second14400The interval for label cleaning
transaction_clean_interval_second30The interval for transaction cleaning
meta_dirStarRocksFe.STARROCKS_HOME_DIR/metaDirectory for metadata
tmp_dirstarrocksFe.STARROCKS_HOME_DIR/temp_ddirDirectory where temporary files are kept, such as backup/restore, etc.
edit_log_port9010The port used for communication between FE Groups (Master, Follower, Observer)
edit_log_roll_num50000Split size of image log
meta_delay_toleration_second300Maximum metadata lag time tolerated by non-leader nodes
master_sync_policySYNCSwipe method for leader’s log, SYNC by default
replica_sync_policySYNCSwipe method for follower’s log, SYNC by default
replica_ack_policySIMPLE_MAJORITYThe form in which logs are considered valid. The default is for the majority to return a confirmation message, which is considered to be in effect
bdbje_heartbeat_timeout_second30The interval for BDBJE heartbeat timeout
bdbje_lock_timeout_second1The interval for BDBJE lock timeout
txn_rollback_limit100the upper limit of transaction rollback
frontend_address0.0.0.0FE IP address
priority_networksempty stringSpecify BE IP address in the form of CIDR 10.10.10.0/24 for machines with multiple IPs
metadata_failure_recoveryfalseForced reset of FE metadata. Use with caution
ignore_meta_checkfalseIgnore the metadata lag
max_bdbje_clock_delta_ms5000Maximum tolerated time offset between leader and non-leader
http_port8030Port of Http Server
http_backlog_num1024HttpServer port backlog
thrift_backlog_num1024ThriftServer port backlog
rpc_port9020Thrift server port of FE
query_port9030MySQL server port of FE
mysql_service_nio_enabledfalseWhether the nio is enabled for the service connected to FE
mysql_service_io_threads_numfalseThe number of threads of the service connected to FE
auth_tokenempty stringWhether the token is enabled automatically
tablet_create_timeout_second1Timeout for table creation
max_create_table_timeout_second60Maximum timeout for table creation
publish_version_timeout_second30Timeout for version to be published
publish_version_interval_ms10Interval for version to be published
load_straggler_wait_second300Maximum tolerated import lag time for BE replications, beyond which cloning will be performed
max_layout_length_per_row100000maximum length of a single row, 100KB
load_checker_interval_second5Interval for import polling
broker_load_default_timeout_second14400Timeout for Broker Load, 4 hours by default
mini_load_default_timeout_second3600Timeout for small batch import, 1 hour by default
insert_load_default_timeout_second3600Timeout for Insert Into statement, 1 hour by default
stream_load_default_timeout_second600Timeout for StreamLoad, 10 minutes by default
max_load_timeout_second259200Applicable to all imports, maximum timeout, 3 days by default
min_load_timeout_second1Applicable to all imports, minimum timeout, 1 second by default
desired_max_waiting_jobs100Max_waiting_jobs for all tasks, including table creation, import, schema change
max_running_txn_num_per_db100The number of concurrent import jobs
async_load_task_pool_size10The size of the thread pool for import job execution
tablet_delete_timeout_second2Timeout for table deletion
capacity_used_percent_high_water0.75Measurements of disk capacity used on Backend. Try not to send creation or clone tasks to this tablet when this parameter exceeds 0.75, until it is back to normal
alter_table_timeout_second86400Timeout for schema change
max_backend_down_time_second3600Maximum time for BE to rejoin after it disconnects to FE
storage_cooldown_second2592000Duration of media migration, 30 days by default
catalog_trash_expire_second86400Length of time that metadata remains in the recycle bin after deleting a table/database, beyond which data cannot be recovered
min_bytes_per_broker_scanner67108864Minimum amount of data to be processed by a single instance, 64MB by default
max_broker_concurrency100Maximum number of concurrent instances for a single task, 10 by default
load_parallel_instance_num1Number of concurrent instances on a single BE, 1 by default
export_checker_interval_second5Interval for exporting thread polling
export_running_job_num_limit5Maximum number of exporting jobs
export_task_default_timeout_second7200Timeout for export job, 2 hours by default
empty_load_as_errorTRUESwitch value to control if to return error all partitions have no load data when the data to load is empty. If this parameter is set as false, the system returns OK instead of the error when the data to load is empty.
export_max_bytes_per_be_per_task268435456Maximum amount of data exported by a single export job on a single be, 256M by default
export_task_pool_size5Size of export task thread pool, 5 by default
consistency_check_start_time23The start time for FE to initiate replica consistency check
consistency_check_end_time4The end time for FE to initiate replica consistency check
check_consistency_default_timeout_second600Timeout for replica consistency check
qe_max_connection1024Maximum number of connections received on the FE, for all users
max_conn_per_user100Maximum number of connections that a single user can handle
query_colocate_join_memory_limit_penalty_factor8Memory limit for Colocate Join
disable_colocate_joinfalseColocate Join is not enabled
expr_children_limit10000The number of in's that can be involved in a query
expr_depth_limit3000
localezh_CN.UTF-8Character set
remote_fragment_exec_timeout_ms5000RPC timeout for FE sending query planning, not involving task execution
max_query_retry_time2The number of query retries on FE
catalog_try_lock_timeout_ms5000Timeout for Catalog Lock fetch
disable_load_jobfalseNo import job is received, which is a stopgap measure when the cluster fails
es_state_sync_interval_second10Interval for FE to fetch Elastic Search Index
tablet_repair_delay_factor_second60Interval for replica repair controlled by FE
enable_statistic_collectTRUEWhether to collect statistics. This parameter is turned on by default.
enable_collect_full_statisticTRUEWhether to enable automatic full statistics collection. This parameter is turned on by default.
statistic_auto_collect_ratio0.8The threshold for determining whether the statistics for automatic collection are healthy. If statistics health is below this threshold, automatic collection is triggered.
statistic_max_full_collect_data_size100The size of the largest partition for automatic collection to collect data. Unit: GB.If a partition exceeds this value, full collection is discarded and sampled collection is performed instead.
statistic_collect_interval_sec300The interval for checking data updates during automatic collection. Unit: seconds.
statistic_sample_collect_rows200000The minimum number of rows to collect for sampled collection. If the parameter value exceeds the actual number of rows in your table, full collection is performed.
histogram_buckets_size64The default bucket number for a histogram.
histogram_mcv_size100The number of most common values (MVC) for a histogram.
histogram_sample_ratio0.1The sampling ratio for a histogram.
histogram_max_sample_row_count10000000The maximum number of rows to collect for a histogram.
statistics_manager_sleep_time_sec60The interval at which metadata is scheduled. Unit: seconds. The system performs the following operations based on this interval: create tables for storing statistics, delete statistics that have been deleted, delete expired statistics.
statistic_update_interval_sec24 * 60 * 60The interval at which the cache of statistical information is updated. Unit: seconds.
statistic_analyze_status_keep_second259200The duration to retain the history of collection tasks. The default value is 3 days. Unit: seconds.
statistic_collect_concurrency3The maximum number of manual collection tasks that can run in parallel. The value defaults to 3, which means you can run a maximum of three manual collections tasks in parallel. If the value is exceeded, incoming tasks will be in the PENDING state, waiting to be scheduled. You can only modify this parameter in the fe.conf file. You must restart the FE for the modification to take effect.
max_routine_load_job_num100maximum number of routine load jobs
max_routine_load_task_concurrent_num5Maximum number of concurrent execution tasks per routine load job
max_routine_load_task_num_per_be5Maximum number of concurrent routine load tasks per BE, which needs to be less than or equal to the number specified in the configuration
max_routine_load_batch_size524288000The maximum amount of data to import per routine load task, default by 500M
routine_load_task_consume_second3Maximum time to consume data per routine load task, default by 3s
routine_load_task_timeout_second15Timeout for routine load task, default by 15s
enable_strict_storage_medium_checkTRUEWhether the FE checks available storage space.
storage_cooldown_second-1The delay of cooldown from HDD storage to SSD storage. Unit: seconds. The default value indicates to disable the auto-cooldown.

BE configuration items

Some BE configuration items are dynamic parameters which you can set them by commands when BE nodes are still 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 restart 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 dynamic parameters

You can configure a dynamic parameter of a BE node by using curl command.

curl -XPOST http://be_host:http_port/api/update_config?<configuration_item>=<value>

BE dynamic parameters are as follows:

Configuration itemDefaultUnitDescription
tc_use_memory_min0ByteThe minimum size of the TCMalloc-reserved memory. StarRocks does not return the released memory resource to the operating system if the size of the memory resource is less than this value.
tc_free_memory_rate0%The maximum ratio of the TCMalloc-reserved memory size to the total memory size occupied by TCMalloc. StarRocks does not return the released memory resource to the operating system if the size ratio of the released memory to the total memory used by TCMalloc is less than this value. Range: [0,100].
tc_gc_period60SecondThe duration of a TCMalloc garbage collection (GC) cycle.
report_task_interval_seconds10SecondThe 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.
report_disk_state_interval_seconds60SecondThe time interval at which to report the storage volume state, which includes the size of data within the volume.
report_tablet_interval_seconds60SecondThe time interval at which to report the most updated version of all tablets.
report_workgroup_interval_seconds5SecondThe time interval at which to report the most updated version of all workgroups.
max_download_speed_kbps50000KB/sThe maximum download speed of each HTTP request. This value affects the performance of data replica synchronization across BE nodes.
download_low_speed_limit_kbps50KB/sThe 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.
download_low_speed_time300SecondThe 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.
status_report_interval5SecondThe time interval at which a query reports its profile, which can be used for query statistics collection by FE.
scanner_thread_pool_thread_num48N/AThe number of threads which the storage engine used for concurrent storage volume scanning. All threads are managed in the thread pool.
thrift_client_retry_interval_ms100msThe time interval at which a thrift client retries.
scanner_thread_pool_queue_size102400N/AThe number of scan tasks supported by the storage engine.
scanner_row_num16384N/AThe maximum row count returned by each scan thread in a scan.
max_scan_key_num1024N/AThe maximum number of scan key segmented by each query.
max_pushdown_conditions_per_column1024N/AThe maximum number of conditions that allow pushdown in each column. If the number of conditions exceeds this limit, the predicates are not pushed down to the storage layer.
exchg_node_buffer_size_bytes10485760ByteThe maximum buffer size on the receiver end of an exchange node for each query. This configuration item is a soft limit. A backpressure is triggered when data is sent to the receiver end with an excessive speed.
memory_limitation_per_thread_for_schema_change2GBThe maximum memory size allowed for each schema change task.
update_cache_expire_sec360SecondThe expiration time of Update Cache.
file_descriptor_cache_clean_interval3600SecondThe time interval at which to clean file descriptors that have not been used for a certain period of time.
disk_stat_monitor_interval5SecondThe time interval at which to monitor health status of disks.
unused_rowset_monitor_interval30SecondThe time interval at which to clean the expired rowsets.
max_percentage_of_error_disk0%The maximum percentage of error that is tolerable in a storage volume before the corresponding BE node quits.
default_num_rows_per_column_file_block1024N/AThe maximum number of rows that can be stored in each row block.
pending_data_expire_time_sec1800SecondThe expiration time of the pending data in the storage engine.
inc_rowset_expired_sec1800SecondThe expiration time of the incoming data. This configuration item is used in incremental clone.
tablet_rowset_stale_sweep_time_sec1800SecondThe time interval at which to sweep the stale rowsets in tablets.
snapshot_expire_time_sec172800SecondThe expiration time of snapshot files.
trash_file_expire_time_sec259200SecondThe time interval at which to clean trash files.
base_compaction_check_interval_seconds60SecondThe time interval of thread polling for a Base Compaction.
min_base_compaction_num_singleton_deltas5N/AThe minimum number of segments that trigger a Base Compaction.
max_base_compaction_num_singleton_deltas100N/AThe maximum number of segments that can be compacted in each Base Compaction.
base_compaction_interval_seconds_since_last_operation86400SecondThe time interval since the last Base Compaction. This configuration item is one of the conditions that trigger a Base Compaction.
cumulative_compaction_check_interval_seconds1SecondThe time interval of thread polling for a Cumulative Compaction.
update_compaction_check_interval_seconds60SecondThe time interval at which to check the Update Compaction of the Primary Key data model.
min_compaction_failure_interval_sec120SecondThe minimum time interval that a Tablet Compaction can be scheduled since the last compaction failure.
periodic_counter_update_period_ms500msThe time interval at which to collect the Counter statistics.
load_error_log_reserve_hours48HourThe time for which data loading logs are reserved.
streaming_load_max_mb10240MBThe maximum size of a file that can be streamed into StarRocks.
streaming_load_max_batch_size_mb100MBThe maximum size of a JSON file that can be streamed into StarRocks.
memory_maintenance_sleep_time_s10SecondThe time interval at which TCMalloc GC is triggered. StarRocks executes GC periodically, and returns the released memory memory to the operating system.
write_buffer_size104857600ByteThe buffer size of MemTable in the memory. This configuration item is the threshold to trigger a flush.
tablet_stat_cache_update_interval_second300SecondThe time interval at which to update Tablet Stat Cache.
result_buffer_cancelled_interval_time300SecondThe wait time before BufferControlBlock release data.
thrift_rpc_timeout_ms5000msThe timeout for a thrift RPC.
txn_commit_rpc_timeout_ms20000msThe timeout for a transaction commit RPC.
max_consumer_num_per_group3N/AThe maximum number of consumers in a consumer group of Routine Load.
max_memory_sink_batch_count20N/AThe maximum number of Scan Cache batches.
scan_context_gc_interval_min5MinuteThe time interval at which to clean the Scan Context.
path_gc_check_step1000N/AThe maximum number of files that can be scanned continuously each time.
path_gc_check_step_interval_ms10msThe time interval between file scans.
path_scan_interval_second86400SecondThe time interval at which GC cleans expired data.
storage_flood_stage_usage_percent95%The storage usage threshold (in percentage) that can trigger the rejection of a Load or Restore job if it is reached.
storage_flood_stage_left_capacity_bytes1073741824ByteThe minimum left capacity of the storage before the rejection of a Load or Restore job is triggered.
tablet_meta_checkpoint_min_new_rowsets_num10N/AThe minimum number of rowsets to create since the last TabletMeta Checkpoint.
tablet_meta_checkpoint_min_interval_secs600SecondThe time interval of thread polling for a TabletMeta Checkpoint.
max_runnings_transactions_per_txn_map100N/AThe maximum number of transactions that can run concurrently in each partition.
tablet_max_pending_versions1000N/AThe maximum number of pending versions that are tolerable in a Primary Key table. Pending versions refer to versions that are committed but not applied yet.
max_hdfs_file_handle1000N/AThe maximum number of HDFS file descriptors that can be opened.
parquet_buffer_stream_reserve_size1048576ByteThe size of buffer that Parquet reader reserves for each column while reading data.

Configure BE static parameters

You can only set the static parameters of a BE node by changing them in the corresponding configuration file be.conf, and restart the BE node to allow the change to take effect.

BE static parameters are as follows:

Configuration itemDefaultUnitDescription
be_port9060N/AThe BE thrift server port, which is used to receive requests from FEs.
brpc_port8060N/AThe BE BRPC port, which is used to view the network statistics of BRPCs.
brpc_num_threads-1N/AThe number of bthreads of a BRPC. The value -1 indicates the same number with the CPU threads.
priority_networksEmpty stringN/AThe 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.
heartbeat_service_port9050N/AThe BE heartbeat service port, which is used to receive heartbeats from FEs.
heartbeat_service_thread_count1N/AThe thread count of the BE heartbeat service.
create_tablet_worker_count3N/AThe number of threads used to create a tablet.
drop_tablet_worker_count3N/AThe number of threads used to drop a tablet.
push_worker_count_normal_priority3N/AThe number of threads used to handle a load task with NORMAL priority.
push_worker_count_high_priority3N/AThe number of threads used to handle a load task with HIGH priority.
transaction_publish_version_worker_count8N/AThe number of threads used to publish a version.
clear_transaction_task_worker_count1N/AThe number of threads used for clearing transaction.
alter_tablet_worker_count3N/AThe number of threads used for schema change.
clone_worker_count3N/AThe number of threads used for clone.
storage_medium_migrate_count1N/AThe number of threads used for storage medium migration (from SATA to SSD).
check_consistency_worker_count1N/AThe number of threads used for check the consistency of tablets.
sys_log_dir${STARROCKS_HOME}/logN/AThe directory that stores system logs (including INFO, WARNING, ERROR, and FATAL).
user_function_dir${STARROCKS_HOME}/lib/udfN/AThe directory used to store the User-defined Functions (UDFs).
small_file_dir${STARROCKS_HOME}/lib/small_fileN/AThe directory used to store the files downloaded by the file manager.
sys_log_levelINFON/AThe severity levels into which system log entries are classified. Valid values: INFO, WARN, ERROR, and FATAL.
sys_log_roll_modeSIZE-MB-1024N/AThe mode how system logs are segmented into log rolls. Valid values include TIME-DAY, TIME-HOUR, and SIZE-MB-<size>. The default value indicates that logs are segmented into rolls which are 1 GB each.
sys_log_roll_num10N/AThe number of log rolls to reserve.
sys_log_verbose_modulesEmpty stringN/AThe 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::vectorized, and pipeline.
sys_log_verbose_level10N/AThe level of the logs to be printed. This configuration item is used to control the ouput of logs initiated with VLOG in codes.
log_buffer_levelEmpty stringN/AThe strategy how logs are flushed. The default value indicates that logs are buffered in memory. Valid values are -1 and 0. -1 indicates that logs are not buffering in memory.
num_threads_per_core3N/AThe number threads started in each CPU core.
compress_rowbatchesTRUEN/AThe boolean value to control if to compress the row batches in RPCs between BEs. This configuration item is used for the data transmission between query layers. The value true indicates to compress the row batches. The value false indicates not to compress the row batches.
serialize_batchFALSEN/AThe boolean value to control if to serialize the row batches in RPCs between BEs. This configuration item is used for the data transmission between query layers. The value true indicates to serialize the row batches. The value false indicates not to serialize the row batches.
storage_root_path${STARROCKS_HOME}/storageN/AThe directory of the storage volume. Multiple volumes are separated by semicolon (;), for example, /data1,medium:hdd;/data2,medium:ssd. If the storage medium is SSD, add ssd at the end of the directory. If the storage medium is HDD, add hdd at the end of the directory.
max_tablet_num_per_shard1024N/AThe maximum number of tablets in each shard. This configuration item is used to restrict the number of tablet child directories under each storage directory.
max_garbage_sweep_interval3600SecondThe maximum time interval for garbage collection on storage volumes.
min_garbage_sweep_interval180SecondThe minimum time interval for garbage collection on storage volumes.
row_nums_checkTRUEN/AThe boolean value to control if to check the row counts before and after the compaction. The value true indicates to enable the row count check. The value false indicates disable the row count check.
file_descriptor_cache_capacity16384N/AThe number of file descriptors that can be cached.
min_file_descriptor_number60000N/AThe minimum number of file descriptors in the BE process.
index_stream_cache_capacity10737418240ByteThe cache capacity for the statistical information of BloomFilter, Min, and Max.
storage_page_cache_limit0The capacity of page cache. You can set it as a percentage ("20%") or a physical value ("100MB").
disable_storage_page_cacheTRUEN/AThe boolean value to control if to disable the Page Cache. The value true indicates to disable the Page Cache. The value false indicates to enable the Page Cache.
base_compaction_num_threads_per_disk1N/AThe number of threads used for Base Compaction on each storage volume.
base_cumulative_delta_ratio0.3N/AThe ratio of cumulative file size to base file size. The ratio reaching this value is one of the conditions that trigger the Base Compaction.
max_compaction_concurrency-1N/AThe maximum concurrency of compactions (both Base Compaction and Cumulative Compaction). The value -1 indicates that no limit is imposed on the concurrency.
compaction_trace_threshold60SecondThe time threshold for each compaction. If a compaction takes more time than the time threshold, StarRocks prints the corresponding trace.
webserver_port8040N/AThe HTTP server port.
webserver_num_workers48N/AThe number of threads used by the HTTP server.
load_data_reserve_hours4HourThe reservation time for the files produced by small-scale loadings.
number_tablet_writer_threads16N/AThe number of threads used for Stream Load.
streaming_load_rpc_max_alive_time_sec1200SecondThe RPC timeout for Stream Load.
fragment_pool_thread_num_min64N/AThe minimum number of threads used for query.
fragment_pool_thread_num_max4096N/AThe maximum number of threads used for query.
fragment_pool_queue_size2048N/AThe upper limit of query number that can be processed on each BE node.
enable_partitioned_aggregationTRUEN/AThe boolean value to control if to enable the Partition Aggregation. The value true indicates to enable the Partition Aggregation. The value false indicates to disable the Partition Aggregation.
enable_token_checkTRUEN/AThe boolean value to control if to enable the token check. The value true indicates to enable the token check. The value false indicates to disable the token check.
enable_prefetchTRUEN/AThe boolean value to control if to enable the pre-fetch of the query. The value true indicates to enable the pre-fetch. The value false indicates to disable the pre-fetch.
load_process_max_memory_limit_bytes107374182400ByteThe maximum size limit of memory resources can be taken up by all load process on a BE node.
load_process_max_memory_limit_percent30%The maximum percentage limit of memory resources can be taken up by all load process on a BE node.
sync_tablet_metaFALSEN/AThe boolean value to control if to enable the synchronization of the tablet metadata. The value true indicates to enable the synchronization. The value false indicates to disable the synchronization.
routine_load_thread_pool_size10N/AThe thread pool size of Routine Load.
brpc_max_body_size2147483648ByteThe maximum body size of a BRPC.
tablet_map_shard_size32N/AThe tablet map shard size. The value must be the power of two.
enable_bitmap_union_disk_format_with_setFALSEN/AThe boolean value to control if to enable the new storage format of the BITMAP type, which can improve the performance of bitmap_union. The value true indicates to enable the new storage format. The value false indicates to disable the new storage format.
mem_limit90%N/ABE process memory upper limit. You can set it as a percentage ("80%") or a physical limit ("100GB").
flush_thread_num_per_store2N/ANumber of threads that are used for flushing MemTable in each store.

Configure broker

You can only set the configuration items of a broker by changing them in the corresponding configuration file broker.conf, and restart the broker to allow the change to take effect.

Configuration itemDefaultUnitDescription
hdfs_read_buffer_size_kb8192KBSize of the buffer that is used to read data from HDFS.
hdfs_write_buffer_size_kb1024KBSize of the buffer that is used to write data into HDFS.
client_expire_seconds300SecondClient sessions will be deleted if they do not receive any ping after the specified time.
broker_ipc_port8000N/AThe HDFS thrift RPC port.
sys_log_dir${BROKER_HOME}/logN/AThe directory used to store system logs (including INFO, WARNING, ERROR, and FATAL).
sys_log_levelINFON/AThe log level. Valid values include INFO, WARNING, ERROR, and FATAL.
sys_log_roll_modeSIZE-MB-1024N/AThe mode how system logs are segmented into log rolls. Valid values include TIME-DAY, TIME-HOUR, and SIZE-MB-nnn. The default value indicates that logs are segmented into rolls which are 1 GB each.
sys_log_roll_num30N/AThe number of log rolls to reserve.
audit_log_dir${BROKER_HOME}/logN/AThe directory that stores audit log files.
audit_log_modulesEmpty stringN/AThe modules for which StarRocks generates audit log entries. By default, StarRocks generates audit logs for the slow_query module and the query module. You can specify multiple modules, whose names must be separated by a comma (,) and a space.
audit_log_roll_modeTIME-DAYN/AValid values include TIME-DAY, TIME-HOUR, and SIZE-MB-<size>.
audit_log_roll_num10N/AThis configuration does not work if the audit_log_roll_mode is set to SIZE-MB-<size>.
sys_log_verbose_modulescom.starrocksN/AThe modules for which StarRocks generates system logs. Valid values are namespaces in BE, including starrocks, starrocks::vectorized, and pipeline.

Set system configurations

Linux Kernel

Linux kernel 3.10 or later is recommended.

CPU configurations

Configuration itemDescriptionRecommended valueHow to set
scaling_governorThe parameter scaling_governor is used to control the CPU power mode. The default value is on-demand. The performance mode consumes more energy, produces better performance, and thereby is recommended in the deployment of StarRocks.performanceecho 'performance' | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor

Memory configurations

Configuration itemDescriptionRecommended valueHow to set
overcommit_memoryMemory Overcommit allows the operating system to overcommit memory resource to processes. We recommend you enable Memory Overcommit.1echo 1 | sudo tee /proc/sys/vm/overcommit_memory
transparent_hugepageTransparent Huge Pages is enabled by default. We recommend you disable this feature because it can interfere the memory allocator, and thereby lead to a drop in performance.madviseecho 'madvise' | sudo tee /sys/kernel/mm/transparent_hugepage/enabled
swappinessWe recommend you disable the swappiness to eliminate its affects on the performance.0echo 0 | sudo tee /proc/sys/vm/swappiness

Storage configurations

We recommend you set different scheduler algorithms in accordance with the medium of your storage volumes.

Configuration itemDescriptionRecommended valueHow to set
schedulermq-deadline scheduler algorithm suits SATA disks.mq-deadlineecho mq-deadline | sudo tee /sys/block/vdb/queue/scheduler
schedulerkyber scheduler algorithm suits NVME or SSD disks.kyberecho kyber | sudo tee /sys/block/vdb/queue/scheduler
schedulerIf your system does not support kyber scheduler algorithm, we recommend you use none scheduler algorithm.noneecho none | sudo tee /sys/block/vdb/queue/scheduler

Network configurations

We recommend you use 10GB network in your StarRocks cluster. Otherwise, StarRocks will fail to achieve the expected performance. You can use iPerf to check the bandwidth of your cluster.

File system configurations

We recommend you use the ext4 journaling file system. You can run the following command to check the mount type:

df -Th

High concurrency configurations

If your StarRocks cluster has a high load concurrency, we recommend you set the following configurations.

echo 120000 > /proc/sys/kernel/threads-max
echo 60000 > /proc/sys/vm/max_map_count
echo 200000 > /proc/sys/kernel/pid_max

User process configuration

You can set the maximum number of user processes by running the following command:

ulimit -u 40960

File descriptor configuration

Run the following command to the maximum number of file descriptors to 65535.

ulimit -n 65535

If this configuration becomes invalid after you re-connect to the cluster, you can set the UsePAM configuration item under /etc/ssh/sshd_config to yes, and restart the SSHD service.

Others

Configuration itemRecommended valueHow to set
tcp abort on overflow1echo 1 | sudo tee /proc/sys/net/ipv4/tcp_abort_on_overflow
somaxconn1024echo 1024 | sudo tee /proc/sys/net/core/somaxconn