BE Configuration - Query and Loading
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:
SELECT * FROM information_schema.be_configs [WHERE NAME LIKE "%<name_pattern>%"]
Configure BE parametersβ
Configure BE dynamic parametersβ
You can configure a dynamic parameter of a BE node by updating the value in information_schema.be_configs.
Setting an invalid value may cause unknown behaviors. Check twice before you run the command to update the configuration.
-- Replace <config_key> with the key of the configuration and <config_value> with the value.
UPDATE information_schema.be_configs SET VALUE = <config_value> WHERE name = "<config_key>";
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.
This topic introduces the following types of BE configurations:
Queryβ
agg_hash_map_prefetch_distβ
- Default: 16
- Type: Int
- Unit: Rows
- Is mutable: Yes
- Description: Software prefetch distance (in rows) for the aggregation hash-map / hash-set probe loop. While building the aggregation hash table, the loop prefetches the bucket for the row this many positions ahead of the one it is currently processing, hiding memory latency on large tables. Setting it to
0disables software prefetch. The value is read once per chunk, so changes take effect on the next chunk. The default 16 is empirical for L3-resident tables; raise it for DRAM-resident workloads and lower it for cache-resident ones. Prefetch is additionally gated byagg_prefetch_l2_ratio: regardless of this distance, no prefetch is issued while the hash table still fits in L2. - Introduced in: -
agg_prefetch_l2_ratioβ
- Default: 1.0
- Type: Double
- Unit: -
- Is mutable: Yes
- Description: Gates aggregation hash-table software prefetch on L2 residency. Prefetch is enabled only once the bucket array spills L2, that is, when
bucket_count * slot_bytes >= L2_size * agg_prefetch_l2_ratio, where the L2 size is detected at runtime (falling back to 1 MiB if detection fails). Below this point the table is L2-resident and prefetching is a net loss. Lower the ratio on contended deployments that run many drivers per core, where the effective per-table share of L2 is smaller than the nominal per-core size; raising it above 1.0 delays prefetch until the table is well past L2. See alsoagg_hash_map_prefetch_dist. - Introduced in: -
clear_udf_cache_when_startβ
- Default: false
- Type: Boolean
- Unit: -
- Is mutable: No
- Description: When enabled, the BE's UserFunctionCache will clear all locally cached user function libraries on startup. During UserFunctionCache::init, the code calls _reset_cache_dir(), which removes UDF files from the configured UDF library directory (organized into kLibShardNum subdirectories) and deletes files with Java/Python UDF suffixes (.jar/.py). When disabled (default), the BE loads existing cached UDF files instead of deleting them. Enabling this forces UDF binaries to be re-downloaded on first use after restart (increasing network traffic and first-use latency).
- Introduced in: v4.0.0
dictionary_speculate_min_chunk_sizeβ
- Default: 10000
- Type: Int
- Unit: Rows
- Is mutable: No
- Description: Minimum number of rows (chunk size) used by StringColumnWriter and DictColumnWriter to trigger dictionary-encoding speculation. If an incoming column (or the accumulated buffer plus incoming rows) has size larger than or equal
dictionary_speculate_min_chunk_sizethe writer will run speculation immediately and set an encoding (DICT, PLAIN or BIT_SHUFFLE) rather than buffering more rows. Speculation usesdictionary_encoding_ratiofor string columns anddictionary_encoding_ratio_for_non_string_columnfor numeric/non-string columns to decide whether dictionary encoding is beneficial. Also, a large column byte_size (larger than or equal to UINT32_MAX) forces immediate speculation to avoidBinaryColumn<uint32_t>overflow. - Introduced in: v3.2.0
disable_storage_page_cacheβ
- Default: false
- Type: Boolean
- Unit: -
- Is mutable: Yes
- Description: A boolean value to control whether to disable PageCache.
- When PageCache is enabled, StarRocks caches the recently scanned data.
- PageCache can significantly improve the query performance when similar queries are repeated frequently.
trueindicates disabling PageCache.- The default value of this item has been changed from
truetofalsesince StarRocks v2.4.
- Introduced in: -
enable_bitmap_index_memory_page_cacheβ
- Default: true
- Type: Boolean
- Unit: -
- Is mutable: Yes
- Description: Whether to enable memory cache for Bitmap index. Memory cache is recommended if you want to use Bitmap indexes to accelerate point queries.
- Introduced in: v3.1
enable_compaction_flat_jsonβ
- Default: True
- Type: Boolean
- Unit:
- Is mutable: Yes
- Description: Whether to enable compaction for Flat JSON data.
- Introduced in: v3.3.3
enable_json_flatβ
- Default: false
- Type: Boolean
- Unit:
- Is mutable: Yes
- Description: Whether to enable the Flat JSON feature. After this feature is enabled, newly loaded JSON data will be automatically flattened, improving JSON query performance.
- Introduced in: v3.3.0
enable_lazy_dynamic_flat_jsonβ
- Default: True
- Type: Boolean
- Unit:
- Is mutable: Yes
- Description: Whether to enable Lazy Dyamic Flat JSON when a query misses Flat JSON schema in read process. When this item is set to
true, StarRocks will postpone the Flat JSON operation to calculation process instead of read process. - Introduced in: v3.3.3
enable_ordinal_index_memory_page_cacheβ
- Default: true
- Type: Boolean
- Unit: -
- Is mutable: Yes
- Description: Whether to enable memory cache for ordinal index. Ordinal index is a mapping from row IDs to data page positions, and it can be used to accelerate scans.
- Introduced in: -
enable_string_prefix_zonemapβ
- Default: true
- Type: Boolean
- Unit: -
- Is mutable: Yes
- Description: Whether to enable ZoneMap for string (CHAR/VARCHAR) columns using prefix-based min/max. For non-key string columns, the min/max values are truncated to a fixed prefix length configured by
string_prefix_zonemap_prefix_len. - Introduced in: -
enable_zonemap_index_memory_page_cacheβ
- Default: true
- Type: Boolean
- Unit: -
- Is mutable: Yes
- Description: Whether to enable memory cache for zonemap index. Memory cache is recommended if you want to use zonemap indexes to accelerate scan.
- Introduced in: -
exchg_node_buffer_size_bytesβ
- Default: 10485760
- Type: Int
- Unit: Bytes
- Is mutable: Yes
- Description: The 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.
- Introduced in: -
exec_state_report_max_threadsβ
- Default: 2
- Type: Int
- Unit: Threads
- Is mutable: Yes
- Description: Maximum number of threads for the exec-state-report thread pool. This pool is used by
ExecStateReporterto asynchronously send non-priority execution status reports (such as fragment completion and error status) from BE to FE via RPC. The actual pool size at startup ismax(1, exec_state_report_max_threads). Changing this config at runtime triggersupdate_max_threadson the pool in every executor set (shared and exclusive). The pool has a fixed task queue size of 1000; report submissions are silently dropped when all threads are busy and the queue is full. Paired withpriority_exec_state_report_max_threadsfor the high-priority pool. Increase this value when delayed or dropped exec-state reports are observed under high query concurrency. - Introduced in: v4.1.0, v4.0.8, v3.5.15
file_descriptor_cache_capacityβ
- Default: 16384
- Type: Int
- Unit: -
- Is mutable: No
- Description: The number of file descriptors that can be cached.
- Introduced in: -
flamegraph_tool_dirβ
- Default:
${STARROCKS_HOME}/bin/flamegraph - Type: String
- Unit: -
- Is mutable: No
- Description: Directory of the flamegraph tool, which should contain pprof, stackcollapse-go.pl, and flamegraph.pl scripts for generating flame graphs from profile data.
- Introduced in: -
fragment_pool_queue_sizeβ
- Default: 2048
- Type: Int
- Unit: -
- Is mutable: No
- Description: The upper limit of the query number that can be processed on each BE node.
- Introduced in: -
fragment_pool_thread_num_maxβ
- Default: 4096
- Type: Int
- Unit: -
- Is mutable: No
- Description: The maximum number of threads used for query.
- Introduced in: -
fragment_pool_thread_num_minβ
- Default: 64
- Type: Int
- Unit: Minutes -
- Is mutable: No
- Description: The minimum number of threads used for query.
- Introduced in: -
hdfs_client_enable_hedged_readβ
- Default: false
- Type: Boolean
- Unit: -
- Is mutable: No
- Description: Specifies whether to enable the hedged read feature.
- Introduced in: v3.0
hdfs_client_hedged_read_threadpool_sizeβ
- Default: 128
- Type: Int
- Unit: -
- Is mutable: No
- Description: Specifies the size of the Hedged Read thread pool on your HDFS client. The thread pool size limits the number of threads to dedicate to the running of hedged reads in your HDFS client. It is equivalent to the
dfs.client.hedged.read.threadpool.sizeparameter in the hdfs-site.xml file of your HDFS cluster. - Introduced in: v3.0
hdfs_client_hedged_read_threshold_millisβ
- Default: 2500
- Type: Int
- Unit: Milliseconds
- Is mutable: No
- Description: Specifies the number of milliseconds to wait before starting up a hedged read. For example, you have set this parameter to
30. In this situation, if a read from a block has not returned within 30 milliseconds, your HDFS client immediately starts up a new read against a different block replica. It is equivalent to thedfs.client.hedged.read.threshold.millisparameter in the hdfs-site.xml file of your HDFS cluster. - Introduced in: v3.0
io_coalesce_adaptive_lazy_activeβ
- Default: true
- Type: Boolean
- Unit: -
- Is mutable: Yes
- Description: Based on the selectivity of predicates, adaptively determines whether to combine the I/O of predicate columns and non-predicate columns.
- Introduced in: v3.2
jit_lru_cache_sizeβ
- Default: 0
- Type: Int
- Unit: Bytes
- Is mutable: Yes
- Description: The LRU cache size for JIT compilation. It represents the actual size of the cache if it is set to greater than 0. If it is set to less than or equal to 0, the system will adaptively set the cache using the formula
jit_lru_cache_size = min(mem_limit*0.01, 1GB)(whilemem_limitof the node must be greater or equal to 16 GB). - Introduced in: -
json_flat_column_maxβ
- Default: 100
- Type: Int
- Unit:
- Is mutable: Yes
- Description: The maximum number of sub-fields that can be extracted by Flat JSON. This parameter takes effect only when
enable_json_flatis set totrue. - Introduced in: v3.3.0
json_flat_create_zonemapβ
- Default: true
- Type: Boolean
- Unit:
- Is mutable: Yes
- Description: Whether to create ZoneMaps for flattened JSON sub-columns during write. This parameter takes effect only when
enable_json_flatis set totrue. - Introduced in: -
json_flat_null_factorβ
- Default: 0.3
- Type: Double
- Unit:
- Is mutable: Yes
- Description: The proportion of NULL values in the column to extract for Flat JSON. A column will not be extracted if its proportion of NULL value is higher than this threshold. This parameter takes effect only when
enable_json_flatis set totrue. - Introduced in: v3.3.0
json_flat_sparsity_factorβ
- Default: 0.3
- Type: Double
- Unit:
- Is mutable: Yes
- Description: The proportion of columns with the same name for Flat JSON. Extraction is not performed if the proportion of columns with the same name is lower than this value. This parameter takes effect only when
enable_json_flatis set totrue. - Introduced in: v3.3.0
lake_tablet_ignore_invalid_delete_predicateβ
- Default: false
- Type: Boolean
- Unit: -
- Is mutable: Yes
- Description: A boolean value to control whether ignore invalid delete predicates in tablet rowset metadata which may be introduced by logic deletion to a duplicate key table after the column name renamed.
- Introduced in: v4.0
late_materialization_ratioβ
- Default: 10
- Type: Int
- Unit: -
- Is mutable: No
- Description: Integer ratio in range [0-1000] that controls the use of late materialization in the SegmentIterator (vector query engine). A value of
0(or β€ 0) disables late materialization;1000(or β₯ 1000) forces late materialization for all reads. Values > 0 and < 1000 enable a conditional strategy where both late and early materialization contexts are prepared and the iterator selects behavior based on predicate filter ratios (higher values favor late materialization). When a segment contains complex metric types, StarRocks usesmetric_late_materialization_ratioinstead. Iflake_io_opts.cache_file_onlyis set, late materialization is disabled. - Introduced in: v3.2.0
max_hdfs_file_handleβ
- Default: 1000
- Type: Int
- Unit: -
- Is mutable: Yes
- Description: The maximum number of HDFS file descriptors that can be opened.
- Introduced in: -
max_hdfs_scanner_numβ
- Default: 50
- Type: Int
- Unit: -
- Is mutable: No
- Description: Maximum number of concurrent remote scanners (HDFS, object storage, etc.) that ConnectorScanNode can run simultaneously. This value caps estimated concurrency at startup and also limits pending-scanner scheduling at runtime, controlling thread, memory, and file-handle pressure.
- Introduced in: v3.2.0
max_memory_sink_batch_countβ
- Default: 20
- Type: Int
- Unit: -
- Is mutable: Yes
- Description: The maximum number of Scan Cache batches.
- Introduced in: -
max_pushdown_conditions_per_columnβ
- Default: 1024
- Type: Int
- Unit: -
- Is mutable: Yes
- Description: The 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.
- Introduced in: -
max_scan_key_numβ
- Default: 1024
- Type: Int
- Unit: -
- Is mutable: Yes
- Description: The maximum number of scan keys segmented by each query.
- Introduced in: -
metric_late_materialization_ratioβ
- Default: 1000
- Type: Int
- Unit: -
- Is mutable: No
- Description: Controls when the late-materialization row access strategy is used for reads that include complex metric columns. Valid range: [0-1000].
0disables late materialization;1000forces late materialization for all applicable reads. Values 1β999 enable a conditional strategy where both late and early materialization contexts are prepared and chosen at runtime based on predicate/selectivity. When complex metric types exist,metric_late_materialization_ratiooverrides the generallate_materialization_ratio. Note:cache_file_onlyI/O mode will cause late materialization to be disabled regardless of this setting. - Introduced in: v3.2.0
min_file_descriptor_numberβ
- Default: 60000
- Type: Int
- Unit: -
- Is mutable: No
- Description: The minimum number of file descriptors in the BE process.
- Introduced in: -
object_storage_client_cache_sizeβ
- Default: 8
- Type: Int
- Unit: -
- Is mutable: Yes
- Description: The maximum number of object storage clients (S3-compatible and Azure Blob) cached per client factory. The value is read on each client creation, so lowering it takes effect gradually as cached clients are evicted during subsequent creations. Values below
1are treated as1. - Introduced in: v4.1.4, v4.0.14
object_storage_connect_timeout_msβ
- Default: -1
- Type: Int
- Unit: Milliseconds
- Is mutable: No
- Description: Timeout duration to establish socket connections with object storage.
-1indicates to use the default timeout duration of the SDK configurations. - Introduced in: v3.0.9
enable_poco_client_for_aws_sdkβ
- Default: false
- Type: Boolean
- Unit: -
- Is mutable: No
- Description: Whether to use the Poco HTTP client for the AWS SDK.
truereplaces the AWS SDK's default curl HTTP client with Poco.falseuses the default curl client. - Introduced in: -
object_storage_request_timeout_msβ
- Default: 10000
- Type: Int
- Unit: Milliseconds
- Is mutable: Yes
- Description: How long a request to object storage may stay stalled before the client aborts and retries. This is not a deadline on the request: for the curl client it is the low speed time, the time a transfer may stay below 1 byte/s, and for the Poco client it is the socket send/receive timeout. A transfer that keeps making progress is never cut off, however long it runs.
0disables the check; a negative value leaves the client on its own default, which on the Poco path is 60 seconds. - Introduced in: v3.0.9
parquet_late_materialization_enableβ
- Default: true
- Type: Boolean
- Unit: -
- Is mutable: No
- Description: A boolean value to control whether to enable the late materialization of Parquet reader to improve performance.
trueindicates enabling late materialization, andfalseindicates disabling it. - Introduced in: -
parquet_page_index_enableβ
- Default: true
- Type: Boolean
- Unit: -
- Is mutable: No
- Description: A boolean value to control whether to enable the pageindex of Parquet file to improve performance.
trueindicates enabling pageindex, andfalseindicates disabling it. - Introduced in: v3.3
parquet_reader_bloom_filter_enableβ
- Default: true
- Type: Boolean
- Unit: -
- Is mutable: Yes
- Description: A boolean value to control whether to enable the bloom filter of Parquet file to improve performance.
trueindicates enabling the bloom filter, andfalseindicates disabling it. You can also control this behavior on session level using the system variableenable_parquet_reader_bloom_filter. Bloom filters in Parquet are maintained at the column level within each row group. If a Parquet file contains bloom filters for certain columns, queries can use predicates on those columns to efficiently skip row groups. - Introduced in: v3.5
path_gc_check_stepβ
- Default: 1000
- Type: Int
- Unit: -
- Is mutable: Yes
- Description: The maximum number of files that can be scanned continuously each time.
- Introduced in: -
path_gc_check_step_interval_msβ
- Default: 10
- Type: Int
- Unit: Milliseconds
- Is mutable: Yes
- Description: The time interval between file scans.
- Introduced in: -
path_scan_interval_secondβ
- Default: 86400
- Type: Int
- Unit: Seconds
- Is mutable: Yes
- Description: The time interval at which GC cleans expired data.
- Introduced in: -
pipeline_connector_scan_thread_num_per_cpuβ
- Default: 8
- Type: Double
- Unit: -
- Is mutable: Yes
- Description: The number of scan threads assigned to Pipeline Connector per CPU core in the BE node. This configuration is changed to dynamic from v3.1.7 onwards.
- Introduced in: -
pipeline_enable_large_column_checkerβ
- Default: true
- Type: Boolean
- Unit: -
- Is mutable: Yes
- Description: Whether to enable large column detection in the pipeline execution framework. When enabled, queries fail with a capacity limit error if an intermediate column reaches the chunk capacity limit in pipeline execution or spill serialization.
- Introduced in: v4.0.0
pipeline_poller_timeout_guard_msβ
- Default: -1
- Type: Int
- Unit: Milliseconds
- Is mutable: Yes
- Description: When this item is set to greater than
0, if a driver takes longer thanpipeline_poller_timeout_guard_msfor a single dispatch in the poller, then the information of the driver and operator is printed. - Introduced in: -
pipeline_prepare_thread_pool_queue_sizeβ
- Default: 102400
- Type: Int
- Unit: -
- Is mutable: No
- Description: The maximum queue lenggth of PREPARE fragment thread pool for Pipeline execution engine.
- Introduced in: -
pipeline_prepare_thread_pool_thread_numβ
- Default: 0
- Type: Int
- Unit: -
- Is mutable: No
- Description: Number of threads in the pipeline execution engine PREPARE fragment thread pool.
0indicates the value is equal to the number of system VCPU core number. - Introduced in: -
pipeline_prepare_timeout_guard_msβ
- Default: -1
- Type: Int
- Unit: Milliseconds
- Is mutable: Yes
- Description: When this item is set to greater than
0, if a plan fragment exceedspipeline_prepare_timeout_guard_msduring the PREPARE process, a stack trace of the plan fragment is printed. - Introduced in: -
pipeline_scan_thread_pool_queue_sizeβ
- Default: 102400
- Type: Int
- Unit: -
- Is mutable: No
- Description: The maximum task queue length of SCAN thread pool for Pipeline execution engine.
- Introduced in: -
pk_index_parallel_get_threadpool_sizeβ
- Default: 1048576
- Type: Int
- Unit: -
- Is mutable: Yes
- Description: Sets the maximum queue size (number of pending tasks) for the "cloud_native_pk_index_get" thread pool used by PK index parallel get operations in shared-data (cloud-native/lake) mode. The actual thread count for that pool is controlled by
pk_index_parallel_get_threadpool_max_threads; this setting only limits how many tasks may be queued awaiting execution. The very large default (2^20) effectively makes the queue unbounded; lowering it prevents excessive memory growth from queued tasks but may cause task submissions to block or fail when the queue is full. Tune together withpk_index_parallel_get_threadpool_max_threadsbased on workload concurrency and memory constraints. - Introduced in: -
priority_exec_state_report_max_threadsβ
- Default: 2
- Type: Int
- Unit: Threads
- Is mutable: Yes
- Description: Maximum number of threads for the high-priority exec-state-report thread pool. This pool is used by
ExecStateReporterto asynchronously send high-priority execution status reports (such as urgent fragment failures) from BE to FE via RPC. Unlike the normal exec-state-report pool, this pool has an unbounded task queue. The actual pool size at startup ismax(1, priority_exec_state_report_max_threads). Changing this config at runtime triggersupdate_max_threadson the priority pool in every executor set (shared and exclusive). Paired withexec_state_report_max_threadsfor the normal pool. Increase this value when high-priority reports are delayed under heavy concurrent query loads. - Introduced in: v4.1.0, v4.0.8, v3.5.15
priority_queue_remaining_tasks_increased_frequencyβ
- Default: 512
- Type: Int
- Unit: -
- Is mutable: Yes
- Description: Controls how often the BlockingPriorityQueue increases ("ages") the priority of all remaining tasks to avoid starvation. Each successful get/pop increments an internal
_upgrade_counter; when_upgrade_counterexceedspriority_queue_remaining_tasks_increased_frequency, the queue increments every element's priority, rebuilds the heap, and resets the counter. Lower values cause more frequent priority aging (reducing starvation but increasing CPU cost due to iterating and re-heapifying); higher values reduce that overhead but delay priority adjustments. The value is a simple operation count threshold, not a time duration. - Introduced in: v3.2.0
query_cache_capacityβ
- Default: 536870912
- Type: Int
- Unit: Bytes
- Is mutable: No
- Description: The size of the query cache in the BE. The default size is 512 MB. The size cannot be less than 4 MB. If the memory capacity of the BE is insufficient to provision your expected query cache size, you can increase the memory capacity of the BE.
- Introduced in: -