This document mainly introduces the relevant configuration items of BE.
The BE configuration file be.conf is usually stored in the conf/ directory of the BE deployment path. In version 0.14, another configuration file be_custom.conf will be introduced. The configuration file is used to record the configuration items that are dynamically configured and persisted by the user during operation.
After the BE process is started, it will read the configuration items in be.conf first, and then read the configuration items in be_custom.conf. The configuration items in be_custom.conf will overwrite the same configuration items in be.conf.
The location of the be_custom.conf file can be configured in be.conf through the custom_config_dir configuration item.
Users can view the current configuration items by visiting BE's web page:
http://be_host:be_webserver_port/varz
There are two ways to configure BE configuration items:
Static configuration
Add and set configuration items in the conf/be.conf file. The configuration items in be.conf will be read when BE starts. Configuration items not in be.conf will use default values.
Dynamic configuration
After BE starts, the configuration items can be dynamically set with the following commands.
curl -X POST http://{be_ip}:{be_http_port}/api/update_config?{key}={value}
In version 0.13 and before, the configuration items modified in this way will become invalid after the BE process restarts. In 0.14 and later versions, the modified configuration can be persisted through the following command. The modified configuration items are stored in the be_custom.conf file.
curl -X POST http://{be_ip}:{be_http_port}/api/update_config?{key}={value}\&persist=true
Modify max_base_compaction_threads statically
By adding in the be.conf file:
max_base_compaction_threads=5
Then restart the BE process to take effect the configuration.
Modify streaming_load_max_mb dynamically
After BE starts, the configuration item streaming_load_max_mb is dynamically set by the following command:
curl -X POST http://{be_ip}:{be_http_port}/api/update_config?streaming_load_max_mb=1024
The return value is as follows, indicating that the setting is successful.
{
"status": "OK",
"msg": ""
}
The configuration will become invalid after the BE restarts. If you want to persist the modified results, use the following command:
curl -X POST http://{be_ip}:{be_http_port}/api/update_config?streaming_load_max_mb=1024\&persist=true
deploy_modecloud indicates the decoupled storage-compute mode.be_portheartbeat_service_portwebserver_portbrpc_portarrow_flight_sql_portenable_httpsssl_certificate_path and ssl_private_key_path in be.conf.priority_networksstorage_root_pathType: string
Description: data root path, separate by ‘;’.you can specify the storage medium of each root path, HDD or SSD. you can add capacity limit at the end of each root path, separate by ‘,’.If the user does not use a mix of SSD and HDD disks, they do not need to configure the configuration methods in Example 1 and Example 2 below, but only need to specify the storage directory; they also do not need to modify the default storage media configuration of FE.
eg.1: storage_root_path=/home/disk1/doris.HDD;/home/disk2/doris.SSD;/home/disk2/doris
eg.2: storage_root_path=/home/disk1/doris,medium:hdd;/home/disk2/doris,medium:ssd
Default value: ${DORIS_HOME}/storage
heartbeat_service_thread_countignore_broken_diskType: bool
Description: When BE starts, check storage_root_path All paths under configuration.
ignore_broken_disk=trueIf the path does not exist or the file (bad disk) cannot be read or written under the path, the path will be ignored. If there are other available paths, the startup will not be interrupted.
ignore_broken_disk=falseIf the path does not exist or the file (bad disk) cannot be read or written under the path, the system will abort the startup failure and exit.
Default value: false
mem_limitcluster_idcustom_config_dirbe_custom.conf file. The default is in the conf/ directory.conf/ directory may be overwritten due to system upgrades. This will cause the user modified configuration items to be overwritten. At this time, we can store be_custom.conf in another specified directory to prevent the configuration file from being overwritten.trash_file_expire_time_seces_http_timeout_mses_scroll_keepaliveexternal_table_connect_timeout_secpipeline_status_report_intervalbrpc_max_body_sizeDescription: This configuration is mainly used to modify the parameter max_body_size of brpc.
body_size is too large will appear in the BE log. This may happen when the SQL mode is “multi distinct + no group by + more than 1T of data”.This error indicates that the packet size of brpc exceeds the configured value. At this time, you can avoid this error by increasing the configuration.brpc_socket_max_unwritten_bytessocket_max_unwritten_bytes of brpc.The server is overcrowded will appear in the BE log. This means there are too many messages to buffer at the sender side, which may happen when the SQL needs to send large bitmap value. You can avoid this error by increasing the configuration.transfer_large_data_by_brpcbrpc_num_threadshttps://github.com/apache/incubator-brpc/blob/master/docs/cn/benchmark.mdthrift_rpc_timeout_msthrift_client_retry_interval_msthrift_connect_timeout_secondsthrift_server_type_of_feType: string
Description:This configuration indicates the service model used by FE‘s Thrift service. The type is string and is case-insensitive. This parameter needs to be consistent with the setting of fe’s thrift_server_type parameter. Currently there are two values for this parameter, THREADED and THREAD_POOL.
If the parameter is THREADED, the model is a non-blocking I/O model.
If the parameter is THREAD_POOL, the model is a blocking I/O model.
thrift_max_message_sizeDefault: 100MB
The maximum size of a (received) message of the thrift server, in bytes. If the size of the message sent by the client exceeds this limit, the Thrift server will reject the request and close the connection. As a result, the client will encounter the error: “connection has been closed by peer.” In this case, you can try increasing this parameter.
txn_commit_rpc_timeout_mstxn_map_shard_sizetxn_shard_sizeunused_rowset_monitor_intervalmax_client_cache_size_per_hoststring_type_length_soft_limit_bytesbig_column_size_buffersmall_column_size_bufferfragment_mgr_asynic_work_pool_queue_sizefragment_mgr_asynic_work_pool_thread_num_minfragment_mgr_asynic_work_pool_thread_num_maxdoris_scanner_row_numdoris_scanner_row_bytesselect * stuckdoris_scanner_thread_pool_queue_sizedoris_scanner_thread_pool_thread_numdoris_max_remote_scanner_thread_pool_thread_numexchg_node_buffer_size_bytesdoris_scan_range_max_mbdisable_auto_compactionenable_vertical_compactionvertical_compaction_num_columns_per_groupvertical_compaction_max_row_source_memory_mbvertical_compaction_max_segment_sizeenable_ordered_data_compactionordered_data_compaction_min_segment_sizemax_base_compaction_threadsgenerate_compaction_tasks_interval_msbase_compaction_min_rowset_numbase_compaction_min_data_ratiototal_permits_for_compaction_scorecompaction_promotion_size_mbytescompaction_promotion_ratiocompaction_promotion_min_size_mbytescompaction_min_size_mbytesdefault_rowset_typecumulative_compaction_min_deltascumulative_compaction_max_deltasbase_compaction_trace_thresholdBase compaction is a long time cost background task, this configuration is the threshold to logging trace information. Trace information in log file looks like:
W0610 11:26:33.804431 56452 storage_engine.cpp:552] execute base compaction cost 0.00319222 BaseCompaction:546859: - filtered_rows: 0 - input_row_num: 10 - input_rowsets_count: 10 - input_rowsets_data_size: 2.17 KB - input_segments_num: 10 - merge_rowsets_latency: 100000.510ms - merged_rows: 0 - output_row_num: 10 - output_rowset_data_size: 224.00 B - output_segments_num: 1 0610 11:23:03.727535 (+ 0us) storage_engine.cpp:554] start to perform base compaction 0610 11:23:03.728961 (+ 1426us) storage_engine.cpp:560] found best tablet 546859 0610 11:23:03.728963 (+ 2us) base_compaction.cpp:40] got base compaction lock 0610 11:23:03.729029 (+ 66us) base_compaction.cpp:44] rowsets picked 0610 11:24:51.784439 (+108055410us) compaction.cpp:46] got concurrency lock and start to do compaction 0610 11:24:51.784818 (+ 379us) compaction.cpp:74] prepare finished 0610 11:26:33.359265 (+101574447us) compaction.cpp:87] merge rowsets finished 0610 11:26:33.484481 (+125216us) compaction.cpp:102] output rowset built 0610 11:26:33.484482 (+ 1us) compaction.cpp:106] check correctness finished 0610 11:26:33.513197 (+ 28715us) compaction.cpp:110] modify rowsets finished 0610 11:26:33.513300 (+ 103us) base_compaction.cpp:49] compaction finished 0610 11:26:33.513441 (+ 141us) base_compaction.cpp:56] unused rowsets have been moved to GC queue
cumulative_compaction_trace_thresholdbase_compaction_trace_threshold.compaction_task_num_per_diskcompaction_task_num_per_fast_diskcumulative_compaction_rounds_for_each_base_compaction_roundmax_cumu_compaction_threadsenable_segcompactionsegcompaction_batch_sizesegcompaction_candidate_max_rowssegcompaction_candidate_max_bytessegcompaction_task_max_rowssegcompaction_task_max_bytessegcompaction_num_threadsdisable_compaction_trace_logcumulative_compaction_trace_threshold and base_compaction_trace_threshold won't work and log is disabled.pick_rowset_to_compact_interval_secmax_single_replica_compaction_threadsupdate_replica_infos_interval_secondsenable_stream_load_recordload_data_reserve_hourspush_worker_count_high_prioritypush_worker_count_normal_priorityenable_single_replica_loadload_error_log_reserve_hoursload_error_log_limit_bytesload_process_max_memory_limit_percentload_process_soft_mem_limit_percentslave_replica_writer_rpc_timeout_secmax_segment_num_per_rowsethigh_priority_flush_thread_num_per_storeroutine_load_consumer_pool_sizemulti_table_batch_plan_thresholdmulti_table_max_wait_tablessingle_replica_load_download_num_workerswebserver_num_workers should also be increased for better IO performance.load_task_high_priority_threshold_secondmin_load_rpc_timeout_mskafka_api_version_requestkafka_broker_version_fallbackmax_consumer_num_per_groupstreaming_load_max_mbstreaming_load_json_max_mbolap_table_sink_send_interval_microsecondsolap_table_sink_send_interval_microseconds microseconds.olap_table_sink_send_interval_auto_partition_factorolap_table_sink_send_interval_microseconds is too slow. In that case the real interval will multiply this factor.delete_worker_countclear_transaction_task_worker_countclone_worker_countbe_service_threadsdownload_worker_countdrop_tablet_worker_countflush_thread_num_per_storepublish_version_worker_countupload_worker_countwebserver_num_workerssend_batch_thread_pool_thread_numsend_batch_thread_pool_queue_sizemake_snapshot_worker_countrelease_snapshot_worker_countmadvise_huge_pagesmax_memory_sink_batch_countmemory_max_alignmentmmap_buffersmemtable_mem_tracker_refresh_interval_mszone_map_row_num_thresholdmemory_modemax_sys_mem_available_low_water_mark_bytes/proc/meminfo/MemAvailable, Unit byte, default 1.6G, actual low water mark=min(1.6G, MemTotal * 10%), avoid wasting too much memory on machines with large memory larger than 16G. Turn up max. On machines with more than 16G memory, more memory buffers will be reserved for Full GC. Turn down max. will use as much memory as possible.memory_limitation_per_thread_for_schema_change_bytesmem_tracker_consume_min_size_bytesmin_buffer_sizewrite_buffer_sizeremote_storage_read_buffer_mbfile_cache_typewhole_file_cache: download the entire segment file, sub_file_cache: the segment file is divided into multiple files by size. if set "", no cache, please set this parameter when caching is required.path_gc_checkpath_gc_check_interval_secondpath_gc_check_steppath_gc_check_step_interval_msscan_context_gc_interval_mindefault_num_rows_per_column_file_blockdisable_storage_page_cachedisk_stat_monitor_intervalmax_free_io_buffersmax_garbage_sweep_intervalmax_percentage_of_error_diskmin_garbage_sweep_intervalpprof_profile_dirsmall_file_diruser_function_dir${DORIS_HOME}/lib/udfstorage_flood_stage_left_capacity_bytesstorage_flood_stage_usage_percentstorage_medium_migrate_countstorage_page_cache_limitstorage_page_cache_shard_sizeindex_page_cache_percentagesegment_cache_capacitystorage_strict_check_incompatible_old_formatsync_tablet_metapending_data_expire_time_secignore_rowset_stale_unconsistent_deletecreate_tablet_worker_countcheck_consistency_worker_countmax_tablet_version_numtablet_map_shard_sizetablet_meta_checkpoint_min_interval_secstablet_meta_checkpoint_min_new_rowsets_numtablet_rowset_stale_sweep_time_sectablet_writer_open_rpc_timeout_sectablet_writer_ignore_eovercrowdedstreaming_load_rpc_max_alive_time_secalter_tablet_worker_countalter_index_worker_countignore_load_tablet_failureWhen BE starts, a separate thread will be started for each data directory to load the meta information of the tablet header. In the default configuration, if a data directory fails to load a tablet, the startup process will terminate. At the same time, it will be displayed in the be The following error message is seen in the INFO log:
load tablets from header failed, failed tablets size: xxx, path=xxx
Indicates how many tablets failed to load in the data directory. At the same time, the log will also contain specific information about the tablets that failed to load. At this time, manual intervention is required to troubleshoot the cause of the error. After troubleshooting, there are usually two ways to restore:
meta_tool tool.ignore_load_tablet_failure to true, BE will ignore these faulty tablets and start normallyreport_disk_state_interval_secondsresult_buffer_cancelled_interval_timesnapshot_expire_time_secsys_log_dir${DORIS_HOME}/logsys_log_levelsys_log_roll_modesys_log_roll_numsys_log_verbose_levelsys_log_verbose_modulesaws_log_levelOff = 0, Fatal = 1, Error = 2, Warn = 3, Info = 4, Debug = 5, Trace = 6
log_buffer_levelreport_tablet_interval_secondsreport_task_interval_secondsperiodic_counter_update_period_msenable_metric_calculatorenable_system_metricsenable_token_checkmax_runnings_transactions_per_txn_mapmax_download_speed_kbpsdownload_low_speed_timedownload_low_speed_limit_kbpspriority_queue_remaining_tasks_increased_frequencyjdbc_drivers_dir${DORIS_HOME}/jdbc_driversenable_simdjson_readerenable_query_memory_overcommitexec_mem_limit.user_files_secure_pathlocal table valued functions.${DORIS_HOME}brpc_streaming_client_batch_bytesgrace_shutdown_wait_secondsenable_java_supportgroup_commit_wal_pathWAL directory of group commit.wal is created under each directory of the storage_root_path. Configuration examples:group_commit_wal_path=/data1/storage/wal;/data2/storage/wal;/data3/storage/wal
group_commit_memory_rows_for_max_filter_ratiomax_filter_ratio limit can only work if the total rows of group commit is less than this value. See Group Commit for more detailsdeploy_modeDefault: ""
Description: The mode in which BE runs. cloud indicates the decoupled storage-compute mode.
meta_service_endpointDefault: ""
enable_file_cacheDefault: true for cloud mode, false for non-cloud mode.
file_cache_pathDefault: [{“path”:“${DORIS_HOME}/file_cache”}]
path specifies the disk path, and total_size limits the size of the cache; -1 or 0 will use the entire disk space.