BE Configuration - Logging, Server, and Metadata
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:
Loggingβ
diagnose_stack_trace_interval_msβ
- Default: 1800000 (30 minutes)
- Type: Int
- Unit: Milliseconds
- Is mutable: Yes
- Description: Controls the minimum time gap between successive stack-trace diagnostics performed by DiagnoseDaemon for
STACK_TRACErequests. When a diagnose request arrives, the daemon skips collecting and logging stack traces if the last collection happened less thandiagnose_stack_trace_interval_msmilliseconds ago. Increase this value to reduce CPU overhead and log volume from frequent stack dumps; decrease it to capture more frequent traces to debug transient issues (for example, in load fail-point simulations of longTabletsChannel::add_chunkblocking). - Introduced in: v3.5.0
lake_replication_slow_log_msβ
- Default: 30000
- Type: Int
- Unit: Milliseconds
- Is mutable: Yes
- Description: Threshold for emitting slow-log entries during lake replication. After each file copy the code measures elapsed time in microseconds and marks the operation as slow when elapsed time is greater than or equal to
lake_replication_slow_log_ms * 1000. When triggered, StarRocks writes an INFO log with file size, cost and trace metrics for that replicated file. Increase the value to reduce noisy slow logs for large/slow transfers; decrease it to detect and surface smaller slow-copy events sooner. - Introduced in: -
load_rpc_slow_log_frequency_threshold_secondsβ
- Default: 60
- Type: Int
- Unit: Seconds
- Is mutable: Yes
- Description: Controls how frequently the system prints slow-log entries for load RPCs that exceed their configured RPC timeout. The slow-log also includes the load channel runtime profile. Setting this value to 0 causes per-timeout logging in practice.
- Introduced in: v3.4.3, v3.5.0
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
-1and0.-1indicates that logs are not buffered in memory. - Introduced in: -
pprof_profile_dirβ
- Default:
${STARROCKS_HOME}/log - Type: String
- Unit: -
- Is mutable: No
- Description: Directory path where StarRocks writes pprof artifacts (Jemalloc heap snapshots and gperftools CPU profiles).
- Introduced in: v3.2.0
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, WARNING, 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_timezoneβ
- Default: false
- Type: Boolean
- Unit: -
- Is mutable: No
- Description: Whether to show timezone information in the log prefix.
trueindicates to show timezone information,falseindicates not to show. - 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: -
sys_log_verbose_modulesβ
- Default:
- Type: Strings
- Unit: -
- Is mutable: No
- Description: Specifies the file names (without extensions) or file name wildcards for which VLOG logs should be printed. Multiple file names can be separated by commas. For example, if you set this configuration item to
storage_engine,tablet_manager, StarRocks prints VLOG logs from the storage_engine.cpp and tablet_manager.cpp files. You can also use wildcards, e.g., set to*to print VLOG logs from all files. The VLOG log printing level is controlled by thesys_log_verbose_levelparameter. - Introduced in: -
Serverβ
abort_on_large_memory_allocationβ
- Default: false
- Type: Boolean
- Unit: -
- Is mutable: Yes
- Description: When a single allocation request exceeds the configured large-allocation threshold (g_large_memory_alloc_failure_threshold
>0 and requested size>threshold), this flag controls how the process responds. If true, StarRocks calls std::abort() immediately (hard crash) when such a large allocation is detected. If false, the allocation is blocked and the allocator returns failure (nullptr or ENOMEM) so callers can handle the error. This check only takes effect for allocations that are not wrapped with the TRY_CATCH_BAD_ALLOC path (the mem hook uses a different flow when bad-alloc is being caught). Enable for fail-fast debugging of unexpected huge allocations; keep disabled in production unless you want an immediate process abort on over-large allocation attempts. - Introduced in: v3.4.3, 3.5.0, 4.0.0
arrow_flight_portβ
- Default: -1
- Type: Int
- Unit: -
- Is mutable: No
- Description: TCP port for the BE Arrow Flight SQL server.
-1indicaes to disable the Arrow Flight service. On non-macOS builds, BE invokes Arrow Flight SQL Server with this port during startup; if the port is unavailable, the server startup fails and the BE process exits. The configured port is reported to the FE in the heartbeat payload. - Introduced in: v3.4.0, v3.5.0
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: -
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_http_portβ
- Default: 8040
- Type: Int
- Unit: -
- Is mutable: No
- Description: The BE HTTP server port.
- Introduced in: -
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: -
be_service_threadsβ
- Default: 64
- Type: Int
- Unit: Threads
- Is mutable: No
- Description: Number of worker threads the BE Thrift server uses to serve backend RPC/execution requests. This value is passed to ThriftServer when creating the BackendService and controls how many concurrent request handlers are available; requests are queued when all worker threads are busy. Tune based on expected concurrent RPC load and available CPU/memory: increasing it raises concurrency but also per-thread memory and context-switch cost, decreasing it limits parallel handling and may increase request latency.
- Introduced in: v3.2.0
brpc_connection_typeβ
- Default:
"single" - Type: string
- Unit: -
- Is mutable: No
- Description: The bRPC channel connection mode. Valid values:
"single"(Default): One persistent TCP connection for each channel."pooled": A pool of persistent connections for higher concurrency at the cost of more sockets/file descriptors."short": Shortβlived connections created per RPC to reduce persistent resource usage but with higher latency. The choice affects per-socket buffering behavior and can influenceSocket.Writefailures (EOVERCROWDED) when unwritten bytes exceed socket limits.
- Introduced in: v3.2.5
brpc_max_body_sizeβ
- Default: 2147483648
- Type: Int
- Unit: Bytes
- Is mutable: No
- Description: The maximum body size of a bRPC.
- Introduced in: -
brpc_max_connections_per_serverβ
- Default: 1
- Type: Int
- Unit: -
- Is mutable: No
- Description: The maximum number of persistent bRPC connections the client keeps for each remote server endpoint. For each endpoint
BrpcStubCachecreates aStubPoolwhose_stubsvector is reserved to this size. On first accesses, new stubs are created until the limit is reached. After that, existing stubs are returned in a roundβrobin fashion. Increasing this value raises perβendpoint concurrency (reduces contention on a single channel) at the cost of more file descriptors, memory, and channels. - Introduced in: v3.2.0
brpc_num_threadsβ
- Default: -1
- Type: Int
- Unit: -
- Is mutable: No
- Description: The number of bthreads of a bRPC. The value
-1indicates the same number with the CPU threads. - Introduced in: -
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_socket_max_unwritten_bytesβ
- Default: 1073741824
- Type: Int
- Unit: Bytes
- Is mutable: No
- Description: Sets the per-socket limit for unwritten outbound bytes in the bRPC server. When the amount of buffered, not-yet-written data on a socket reaches this limit, subsequent
Socket.Writecalls fail with EOVERCROWDED. This prevents unbounded per-connection memory growth but can cause RPC send failures for very large messages or slow peers. Align this value withbrpc_max_body_sizeto ensure single-message bodies are not larger than the allowed unwritten buffer. Increasing the value raises memory usage per connection. - Introduced in: v3.2.0
brpc_stub_expire_sβ
- Default: 3600
- Type: Int
- Unit: Seconds
- Is mutable: Yes
- Description: The expire time of bRPC stub cache. The default value is 60 minutes.
- 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.
trueindicates compressing the row batches, andfalseindicates not compressing them. - Introduced in: -
consistency_max_memory_limit_percentβ
- Default: 20
- Type: Int
- Unit: -
- Is mutable: No
- Description: Percentage cap used to compute the memory budget for consistency-related tasks. During BE startup, the final consistency limit is computed as the minimum of the value parsed from
consistency_max_memory_limit(bytes) and (process_mem_limit * consistency_max_memory_limit_percent / 100). Ifprocess_mem_limitis unset (-1), consistency memory is considered unlimited. Forconsistency_max_memory_limit_percent, values less than 0 or greater than 100 are treated as 100. Adjusting this value increases or decreases memory reserved for consistency operations and therefore affects memory available for queries and other services. - Introduced in: v3.2.0
delete_worker_count_normal_priorityβ
- Default: 2
- Type: Int
- Unit: Threads
- Is mutable: No
- Description: Number of normal-priority worker threads dedicated to handling delete (REALTIME_PUSH with DELETE) tasks on the BE agent. At startup this value is added to delete_worker_count_high_priority to size the DeleteTaskWorkerPool (see agent_server.cpp). The pool assigns the first delete_worker_count_high_priority threads as HIGH priority and the rest as NORMAL; normal-priority threads process standard delete tasks and contribute to overall delete throughput. Increase to raise concurrent delete capacity (higher CPU/IO usage); decrease to reduce resource contention.
- Introduced in: v3.2.0
disable_mem_poolsβ
- Default: false
- Type: Boolean
- Unit: -
- Is mutable: No
- Description: Whether to disable MemPool. When this item is set to
true, the MemPool chunk pooling is disabled so each allocation gets its own sized chunk instead of reusing or increasing pooled chunks. Disabling pooling reduces long-lived retained buffer memory at the cost of more frequent allocations, increased number of chunks, and skipped integrity checks (which are avoided because of the large chunk count). Keepdisable_mem_poolsasfalse(default) to benefit from allocation reuse and fewer system calls. Set it totrueonly when you must avoid large pooled memory retention (for example, low-memory environments or diagnostic runs). - Introduced in: v3.2.0
enable_httpsβ
- Default: false
- Type: Boolean
- Unit: -
- Is mutable: No
- Description: When this item is set to
true, the BE's bRPC server is configured to use TLS:ServerOptions.ssl_optionswill be populated with the certificate and private key specified byssl_certificate_pathandssl_private_key_pathat BE startup. This enables HTTPS/TLS for incoming bRPC connections; clients must connect using TLS. Ensure the certificate and key files exist, are accessible to the BE process, and match bRPC/SSL expectations. - Introduced in: v4.0.0
enable_jemalloc_memory_trackerβ
- Default: true
- Type: Boolean
- Unit: -
- Is mutable: No
- Description: When this item is set to
true, the BE starts a background thread (jemalloc_tracker_daemon) that polls jemalloc statistics (once per second) and updates the GlobalEnv jemalloc metadata MemTracker with the jemalloc "stats.metadata" value. This ensures jemalloc metadata consumption is included in StarRocks process memory accounting and prevents underβreporting of memory used by jemalloc internals. The tracker is only compiled/started on nonβmacOS builds (#ifndef APPLE) and runs as a daemon thread named "jemalloc_tracker_daemon". Because this setting affects startup behaviour and threads that maintain MemTracker state, changing it requires a restart. Disable only if jemalloc is not used or when jemalloc tracking is intentionally managed differently; otherwise keep enabled to maintain accurate memory accounting and allocation safeguards. - Introduced in: v3.2.12
enable_jvm_metricsβ
- Default: false
- Type: Boolean
- Unit: -
- Is mutable: No
- Description: Controls whether the system initializes and registers JVM-specific metrics at startup. When enabled the metrics subsystem will create JVM-related collectors (for example, heap, GC and thread metrics) for export, and when disabled, those collectors are not initialized. This parameter is intended for forward compatibility and may be removed in a future release. Use
enable_system_metricsto control system-level metric collection. - Introduced in: v4.0.0
get_pindex_worker_countβ
- Default: 0
- Type: Int
- Unit: -
- Is mutable: Yes
- Description: Sets the number of worker threads for the "get_pindex" thread pool in UpdateManager, which is used to load / fetch persistent index data (used when applying rowsets for primary-key tables). At runtime, a config update will adjust the pool's maximum threads: if
>0that value is applied; if 0 the runtime callback uses the number of CPU cores (CpuInfo::num_cores()). On initialization the pool's max threads is computed as max(get_pindex_worker_count, max_apply_thread_cnt * 2) where max_apply_thread_cnt is the apply-thread pool maximum. Increase to raise parallelism for pindex loading; lowering reduces concurrency and memory/CPU usage. - Introduced in: v3.2.0
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: -
local_library_dirβ
- Default:
${UDF_RUNTIME_DIR} - Type: string
- Unit: -
- Is mutable: No
- Description: Local directory on the BE where UDF (user-defined function) libraries are staged and where Python UDF worker processes operate. StarRocks copies UDF libraries from HDFS into this path, creates per-worker Unix domain sockets at
<local_library_dir>/pyworker_<pid>, and chdirs Python worker processes into this directory before exec. The directory must exist, be writable by the BE process, and reside on a filesystem that supports Unix domain sockets (i.e., a local filesystem). Because this config is immutable at runtime, set it before startup and ensure adequate permissions and disk space on each BE. - Introduced in: v3.2.0
max_transmit_batched_bytesβ
- Default: 262144
- Type: Int
- Unit: Bytes
- Is mutable: No
- Description: Maximum number of serialized bytes to accumulate in a single transmit request before it is flushed to the network. Sender implementations add serialized ChunkPB payloads into a PTransmitChunkParams request and send the request once the accumulated bytes exceed
max_transmit_batched_bytesor when EOS is reached. Increase this value to reduce RPC frequency and improve throughput at the cost of higher per-request latency and memory use; reduce it to lower latency and memory but increase RPC rate. - Introduced in: v3.2.0
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: -
memory_max_alignmentβ
- Default: 16
- Type: Int
- Unit: Bytes
- Is mutable: No
- Description: Sets the maximum byte alignment that MemPool will accept for aligned allocations. Increase this value only when callers require larger alignment (for SIMD, device buffers, or ABI constraints). Larger values increase per-allocation padding and reserved memory waste and must remain within what the system allocator and platform support.
- Introduced in: v3.2.0
memory_urgent_levelβ
- Default: 85
- Type: long
- Unit: Percentage (0-100)
- Is mutable: Yes
- Description: The emergency memory waterβlevel expressed as a percentage of the process memory limit. When process memory consumption exceeds
(limit * memory_urgent_level / 100), BE triggers immediate memory reclamation, which forces data cache shrinkage, evicts update caches, and causes persistent/lake MemTables to be treated as "full" so they will be flushed/compacted soon. The code validates that this setting must be greater thanmemory_high_level, andmemory_high_levelmust be greater or equal to1, and less thant or equal to100). A lower value causes more aggressive, earlier reclamation, that is, more frequent cache evictions and flushes. A higher value delays reclamation and risks OOM if too close to 100. Tune this item together withmemory_high_leveland Data Cache-related autoβadjust settings. - Introduced in: v3.2.0
net_use_ipv6_when_priority_networks_emptyβ
- Default: false
- Type: Boolean
- Unit: -
- Is mutable: No
- Description: A boolean value to control whether to use IPv6 addresses preferentially when
priority_networksis not specified.trueindicates to allow the system to use an IPv6 address preferentially when the server that hosts the node has both IPv4 and IPv6 addresses andpriority_networksis not specified. - Introduced in: v3.3.0
num_coresβ
- Default: 0
- Type: Int
- Unit: Cores
- Is mutable: No
- Description: Controls the number of CPU cores the system will use for CPU-aware decisions (for example, thread-pool sizing and runtime scheduling). A value of 0 enables auto-detection: the system reads
/proc/cpuinfoand uses all available cores. If set to a positive integer, that value overrides the detected core count and becomes the effective core count. When running inside containers, cgroup cpuset or cpu quota settings can further restrict usable cores;CpuInfoalso respects those cgroup limits. - Introduced in: v3.2.0
plugin_pathβ
- Default:
${STARROCKS_HOME}/plugin - Type: String
- Unit: -
- Is mutable: No
- Description: Filesystem directory where StarRocks loads external plugins (dynamic libraries, connector artifacts, UDF binaries, etc.).
plugin_pathshould point to a directory accessible by the BE process (read and execute permissions) and must exist before plugins are loaded. Ensure correct ownership and that plugin files use the platform's native binary extension (for example, .so on Linux). - Introduced in: v3.2.0