Skip to main content

Settings reference

This page lists every setting that a CamusDB node accepts, with its default, its type, when a change takes effect, and whether all nodes must agree. Each variable that SHOW VARIABLES lists has an entry here. Use this page to look up a value that you see in that output, or to choose a value before you edit config.yml.

For how to write config.yml, the order in which the configuration layers apply, and the command-line flags, see Configuration.

Most keys are top-level keys in config.yml. Two nested maps have their own tables: Kahuna keys and Diagnostics keys.

The Change column says when a new value takes effect:

  • runtime: you can change the value with SET CLUSTER SETTING, and the next statement or background pass uses it.
  • restart: edit config.yml and restart the node. SET CLUSTER SETTING rejects the key, with six exceptions: it accepts those keys, but the node applies the new value only after a restart. Their rows and notes say so.

The Scope column says whether nodes must agree:

  • cluster: every node must use the same value. A runtime change reaches every node.
  • node: nodes may use different values, set in each node's config.yml. A SET CLUSTER SETTING value still applies to every node and overrides the file.

Sizes are in bytes and durations in milliseconds unless the key name says otherwise (_seconds, _mb).

Node identity and cluster membership​

KeyDefaultTypeChangeScopeDescription
data_dir~/.camusdb/data, or $CAMUS_HOME/datapathrestartnodeWhere the node stores its data.
modestandalonestandalone or clusterrestartnodeRuns a single node, or a node in a Raft cluster.
memory_profileprodprod or devrestartnodeSizes the storage caches that you leave unset. See Memory profile.
node_name"", then the machine name in cluster modestringrestartnodeThis node's name in the cluster.
raft_node_id1intrestartnodeNumeric Raft node id. Must be above 0.
raft_hostlocalhoststringrestartnodeHost name of this node's Raft endpoint.
raft_port7070portrestartnodePort for node-to-node Raft traffic.
initial_partitions1 standalone, 3 clusterintrestartclusterInitial hash-pool partition count, fixed at first boot. Later values are ignored with a warning. Standalone mode always uses 1. Must be at least 1.
peers[]list of host:portrestartnodeRaft endpoints of the other nodes, or the seed nodes when join_existing is on.
http_peers[]list of host:portrestartnodeEach peer's HTTP address, in the same order as peers. The two lists must have the same length.
join_existingfalseboolrestartnodeJoins a running cluster as a new member, with peers as the seed list. Cluster mode only.
pitr_bootstrap_fromunsetbackup idrestartnodeSeeds a joining node from this backup before it joins. Needs join_existing and kahuna.backup_dir. See Backup and restore.
pitr_bootstrap_target_time_ms0Unix time, msrestartnodePoint in time to seed to. 0 is the latest point that the chain covers. Needs pitr_bootstrap_from.
schema_ack_wait_timeout_ms30000msrestartnodeHow long a DDL statement waits for every live node to acknowledge the previous schema version. See Distributed schema.
schema_ack_live_node_lease_ms30000msrestartnodeHow long after its last contact a node still counts as live for that wait. -1 always waits for every configured node.
schema_freshness_check_interval_ms10000msrestartnodeHow often a cluster node compares each open database's schema with its durable checkpoint, and reloads the schema when it is behind.
unhosted_control_log_probe_interval_ms250msrestartnodeHow often a node probes the checkpoint of a control log (schema or cluster settings) whose Raft partition it does not host. This matters when kahuna.replication_factor is below the node count. 0 or less turns the probe off.
coordinator_job_sweep_interval_ms10000msrestartnodeHow often the schema leader of each open database looks for a staged schema change, such as CREATE INDEX or ALTER TABLE ... ADD COLUMN, whose driver stopped, and finishes it. A failed attempt retries with a backoff that doubles each time. Runs in standalone and cluster mode. 0 or less turns the sweep off.
registry_generation_lease_ms250msrestartclusterHow long a cluster node trusts its cached database names. DROP DATABASE and RENAME DATABASE wait out one lease before they return. 0 checks on every lookup. Ignored in standalone mode.
database_idle_eviction_ms900000msrestartnodeHow long an unused database stays open on this node before the node frees its memory. 0 or less keeps it open.
extension_assemblies[]list of pathsrestartnodeC# extension DLLs loaded with the safe-assembly checks.
unsafe_extension_assemblies[]list of pathsrestartnodeReviewed extension DLLs loaded without the safe-assembly checks.

Network, TLS, and client protocols​

KeyDefaultTypeChangeScopeDescription
http_port5095portrestartnodeHTTP API port.
https_port7141portrestartnodeHTTPS port. It opens only when https_certificate is set.
https_certificate""pathrestartnodePFX certificate for the HTTPS port. Empty means no HTTPS.
http3_enabledfalseboolrestartnodeAlso serves HTTP/3 on the HTTPS port. See HTTP/3.
grpc_enabledtrueboolrestartnodeOpens the client-facing gRPC API.
grpc_port5096portrestartnodegRPC API port.
grpc_certificate""pathrestartnodePFX certificate for the gRPC port. Empty falls back to raft_certificate.
grpc_tls_enabledtrueboolrestartnodefalse serves gRPC as plaintext h2c even when a certificate is set.
grpc_batch_max_in_flight64intruntimenodeOperations one BatchExecute stream may run at once before backpressure.
raft_certificate""pathrestartnodePFX certificate for the Raft port in cluster mode.
raft_mutual_tls_enabledfalseboolrestartnodeCluster mode: each peer must present a client certificate that chains to raft_peer_ca. Needs raft_certificate and raft_peer_ca.
raft_peer_ca""pathrestartnodePEM file with the CA that peer certificates must chain to. Use a CA that signs only this cluster's nodes, because the node accepts every certificate it signed.
peer_tls_enabledfalseboolrestartnodeReaches peer HTTP endpoints over HTTPS. See Cluster peer transport.
require_tls_when_auth_enabledtrueboolruntimenodeWith authentication on, refuses credentials sent over plaintext, except from loopback.
sql_routing_advice_enabledtrueboolrestartnodeAdds routing advice to responses for clients that ask for it.
sql_routing_advice_ttl_ms5000msrestartnodeMaximum age at which a client may reuse an advertised route. 1 to 600000.

Authentication and sessions​

Authentication is turned on with CAMUSDB_AUTH_ENABLED, and its secrets come only from the environment. See SQL authentication.

KeyDefaultTypeChangeScopeDescription
password_hash_iterations600000intrestartclusterPBKDF2-HMAC-SHA256 iterations for new password hashes. Existing hashes keep their stored count.
login_kdf_max_concurrency8intrestartnodePassword checks that may run at once. Others queue.
login_max_attempts_per_minute20intrestartnodeLogin attempts per account and source address in a rolling minute.
login_max_attempts_per_source_per_minute200intrestartnodeLogin attempts per source address in a rolling minute, across all accounts.
login_rate_limit_max_entries100000intrestartnodeKeys that each login rate limiter tracks. When the per-source map is full, logins fail. When the per-account map is full, it stops adding keys and the per-source limit still applies.
access_token_ttl900000msrestartclusterAbsolute lifetime of an access token.
authentication_cache_ttl1000msrestartnodeHow long a node trusts a cached token or privilege check. 0 checks the catalog on every request.
authentication_cache_max_entries10000intrestartnodePer-node authentication cache size limit.
session_reaper_interval_ms300000msrestartnodeHow often expired session records are deleted. 0 or less turns the sweep off.
expired_session_retention_ms300000msrestartclusterHow long a session record is kept after it expires, so a long-lived stream can tell expiry from revocation.

The five keys below come only from environment variables. config.yml does not accept them. SHOW VARIABLES lists them with source env when the variable is set, and masks the three secrets.

KeyEnvironment variableTypeChangeScopeDescription
authentication_enabledCAMUSDB_AUTH_ENABLEDboolrestartclustertrue requires a valid token on every request and checks privileges on every statement. Any other value, or no value, turns authentication off.
access_token_server_keyCAMUSDB_AUTH_TOKEN_KEYsecretrestartclusterKey that hashes each access-token secret (HMAC) before the session catalog stores it, so a copy of the catalog does not give usable tokens. Required while authentication is on. At least 32 bytes. Same value on every node.
bootstrap_superuserCAMUSDB_BOOTSTRAP_USERstringrestartnodeName of the first superuser. CamusDB creates it at the first start with authentication, when no user exists yet. After that, CamusDB ignores it and logs a warning.
bootstrap_superuser_passwordCAMUSDB_BOOTSTRAP_PASSWORDsecretrestartnodePassword of the bootstrap superuser. CamusDB uses it once and never stores it in cleartext.
node_secretCAMUSDB_NODE_SECRETsecretrestartnodeShared secret for node-to-node forwarding routes while authentication is on. Without it, a cluster node refuses those routes. At least 32 bytes when set. Same value on every node.

Transactions and locking​

KeyDefaultTypeChangeScopeDescription
default_isolation_levelserializableserializable or read_committedruntimeclusterIsolation level of a transaction that does not set one. See Serializable transactions.
default_transaction_lockingpessimisticpessimistic or optimisticruntimeclusterLocking mode of a transaction that does not set one.
default_read_validationnonenone or track_and_validateruntimeclusterRead-set validation of a transaction that does not set one. See Transactions and locking internals.
default_decision_durabilitybest_effortbest_effort or durableruntimeclusterCommit-decision durability of a transaction that does not set one. See Transactions and locking internals.
default_transaction_prioritynormalbackground, low, normal, high, criticalruntimeclusterPriority of a transaction that does not set one. Only the admission gate uses it, and the gate is off while kahuna.max_concurrent_sessions is 0. See Transaction priority.
transaction_admission_wait_ms0msruntimeclusterHow long a transaction queues at the admission gate before it is refused. 0 uses kahuna.default_admission_wait_ms.
range_lock_expires_ms150000msruntimeclusterInitial lease of a range lock. The coordinator renews it while the transaction lives. Must be at least twice kahuna.collection_interval_ms. 0 or less turns expiry off.
max_serializable_transaction_lifetime_ms3600000msruntimeclusterLongest time a serializable transaction may run.
transaction_finalize_retry_budget_ms15000msruntimeclusterHow long COMMIT or ROLLBACK retries while the outcome is not known yet. At least 2000, or 0 or less to turn retries off.
sequence_retry_budget_ms10000msruntimeclusterHow long a call to an internal id counter (database id, table id) retries while storage asks for a retry.
transaction_idle_timeout_ms300000msrestartclusterAn explicit transaction idle this long is rolled back and its locks are released. 0 or less turns the idle check off. See Transaction limits. SET CLUSTER SETTING accepts a new value, but the node reads it only at startup.
transaction_reaper_interval_ms30000msrestartnodeHow often the reaper looks for idle transactions. SET CLUSTER SETTING accepts a new value, but the node reads it only at startup.
abandoned_transaction_release_after_ms0msruntimeclusterAge after which a rollback of a transaction that the coordinator no longer knows releases its leftover locks and staged writes. 0 derives it: the larger of kahuna.max_transaction_timeout_ms and max_serializable_transaction_lifetime_ms, plus 30 seconds. A negative value turns the release off. A positive value must be at least max_serializable_transaction_lifetime_ms.
lock_escalation_threshold50intruntimeclusterNumber of shared point locks in one table or index bucket after which a serializable read-write transaction takes one shared lock on the whole bucket.
lock_wait_deadline_ms500msruntimeclusterLongest time one lock-acquire retry loop waits during a serializable conflict.
replication_wait_deadline_ms5000msruntimeclusterLongest time a lock or write waits on a key whose value is still replicating, or whose previous writer committed but did not settle yet. This wait is not a lock conflict, so it has its own budget, separate from lock_wait_deadline_ms. When the budget runs out, the statement fails with a retryable error. Must be above 0.
max_mutations_per_transaction20000intruntimeclusterNumber of row and index-entry writes one transaction may make. 0 or less turns the limit off.
key_range_shardingfalseboolrestartclusterRouting mode fixed at cluster creation. Unset nodes follow the stored mode; an explicit mismatch refuses startup. See Key-range sharding.

Request resource limits​

These runtime settings bound the work and state a node accepts. A value of 0 or below disables the corresponding cap.

KeyDefaultUnitChangeScopeMeaning
max_statement_bytes8388608 (8 MiB)UTF-8 bytesruntimenodeMaximum inline SQL before parsing; excess fails with CADB0557, HTTP 413. Bound parameter values are excluded.
max_buffered_result_rows1000000rowsruntimenodeRows held for one buffered response; excess fails with CADB0556.
max_buffered_result_bytes268435456 (256 MiB)estimated bytesruntimenodeMemory estimate for one buffered response; excess fails with CADB0556.
max_open_explicit_transactions10000transactionsruntimenodeOpen explicit transactions per node; excess begins fail with CADB0558, HTTP 503. Autocommit is excluded.
max_client_connections10000connectionsruntimenodeOpen HTTP, HTTPS, and gRPC client connections; excess connections are closed before reading a request. Raft is excluded.
max_databases10000databasesruntimeclusterRegistry capacity for creates, branch creates, and relinks; excess fails with CADB0408.
cluster_activity_max_concurrent_fan_outs8requestsruntimenodeConcurrent SHOW CLUSTER QUERIES/CONNECTIONS requests; excess fails with CADB0558.

Buffered results are checked before commit, so exceeding a cap rolls back the statement. The byte estimate includes in-memory overhead and counts strings at two bytes per character; it is not the JSON payload size. Ordinary streaming reads bypass these result caps. Writes with RETURNING, and locking reads that buffer before autocommit, can still hit them even on a streaming endpoint.

Lowering the connection cap does not close existing connections. Transaction slots are released on commit, rollback, reaping, or a failed begin. Database capacity is checked against each node's registry view: concurrent creates on different nodes can briefly overshoot it, so it is not a strict global quota.

These settings do not impose per-client request rates or a statement execution timeout. A small response can still require a large scan. Prepared statements also have the separate max_prepared_statement_bytes cap. See transaction limits and query activity for operational guidance.

Prepared statements​

See Prepared statements.

KeyDefaultTypeChangeScopeDescription
prepared_statement_idle_timeout_ms600000msruntimenodeA REST prepared statement unused this long is dropped. 0 keeps it until it is closed.
prepared_statement_sweep_interval_ms60000msruntimenodeHow often the REST prepared-statement sweep runs.
max_prepared_statement_bytes65536bytesruntimenodeLargest statement text that may be prepared, on either transport. 0 means no limit.
rest_max_prepared_statements8192intruntimenodeREST prepared statements this node holds, across all principals. 0 means no limit.
rest_max_prepared_statements_per_principal512intruntimenodeREST prepared statements one principal may hold. 0 means no limit.
rest_max_prepared_statement_bytes67108864bytesruntimenodeTotal REST prepared-statement text this node holds. 0 means no limit.
rest_max_prepared_statement_bytes_per_principal8388608bytesruntimenodeREST prepared-statement text one principal may hold. 0 means no limit.
grpc_max_prepared_statements_per_stream512intruntimenodePrepared statements one gRPC BatchExecute stream may hold. 0 means no limit.
grpc_max_prepared_statement_bytes_per_stream8388608bytesruntimenodePrepared-statement text one gRPC stream may hold. 0 means no limit.

Query planning and statistics​

See Query planning and SHOW STATISTICS.

KeyDefaultTypeChangeScopeDescription
cost_based_access_path_enabledtrueboolruntimeclusterChooses between indexes and a full scan by cost, for analyzed tables.
cost_based_join_order_enabledtrueboolruntimeclusterChooses the join order by cost.
net_weight0.01doubleruntimeclusterPlanner cost of each byte read from another node. 0 turns network costing off.
stats_flush_interval_ms5000msruntimeclusterShortest interval between writes of a table's in-memory statistics to storage. 0 writes after each change. -1 turns the background write off.
stats_analyze_sample_rows100000rowsruntimeclusterRows a manual ANALYZE reads, the first ones in storage order. 0 reads all rows.
stats_histogram_buckets100intruntimeclusterHistogram buckets per column. Must be at least 1.
stats_top_values100intruntimeclusterMost common values kept per column. 0 keeps none.
stats_analyze_max_columns32intruntimeclusterColumns per table that ANALYZE collects. The leading column of each index is always collected.
stats_plan_time_lookup_max_rows2000rowsruntimenodeLargest small table whose filtered rows the join planner reads while it plans. 0 turns the lookup off.
plan_cache_enabledfalseboolruntimenodeCaches access-path and join-order decisions per query shape.
plan_cache_max_entries512intruntimenodePlan cache size limit.
bound_query_cache_enabledtrueboolruntimenodeReuses name resolution for cached SELECT text across executions.

Automatic ANALYZE​

See Automatic ANALYZE.

KeyDefaultTypeChangeScopeDescription
auto_analyze_enabledtrueboolruntimeclusterRefreshes statistics in the background.
auto_analyze_check_interval_ms60000msruntimeclusterHow often the leader looks for stale tables. 0 or less turns the loop off.
auto_analyze_fraction_stale_rows0.20doubleruntimeclusterA table is stale once its changes since the last ANALYZE reach this fraction of its rows, plus auto_analyze_min_stale_rows.
auto_analyze_min_stale_rows500rowsruntimeclusterMinimum changes before a table can be stale.
auto_analyze_max_concurrent1intruntimenodeNumber of background analyses that may run at once on this node.
auto_analyze_max_rows_per_second50000rows/sruntimeclusterScan rate limit. 0 or less removes the limit.
auto_analyze_histogram_sample_rows10000rowsruntimeclusterSample size per column for background histograms.
auto_analyze_hll_precision11intruntimeclusterDistinct-count sketch precision. 4 to 16.
auto_analyze_load_pause_threshold16transactionsruntimenodePauses background analysis while more foreground transactions than this are running. 0 or less turns the pause off.
auto_analyze_ownership_check_rows1000rowsruntimeclusterRows scanned between checks for lost leadership and foreground load.

Query execution​

KeyDefaultTypeChangeScopeDescription
max_query_parallelism1intruntimenodeWorkers one full table scan may use. 1 scans sequentially. More workers use more memory and do not change results or row order.
index_scan_fetch_batch_size64rowsruntimenodeRow ids a non-covering index scan collects before it fetches the rows in one batch.
distributed_query_executionfalseboolrestartclusterSplits eligible scans of key-range-sharded tables into per-range fragments. See Distributed queries.
broadcast_join_max_build_rows10000rowsruntimenodeLargest hash-join build side that may be sent to remote fragments. 0 turns broadcast joins off.
hash_join_max_build_rows1000000rowsruntimenodeWhen spill is off, a hash-join build larger than this falls back to a nested-loop join.
regex_match_timeout_ms250msruntimenodeTime limit for one regex match.
slot_backed_decodetrueboolruntimenodeInternal row-decode mode. Keep the default.
borrowed_decodeadaptiveadaptive, force_eager, force_borrowedruntimenodeInternal zero-copy decode policy. Keep the default.

Spill to disk​

See Spill to disk.

KeyDefaultTypeChangeScopeDescription
spill_enabledfalseboolruntimenodeLets sorts, joins, and aggregations write to temporary files when they grow too large.
spill_threshold_rows500000rowsruntimenodeRows one operator keeps in memory before it spills. Must be above 0.
spill_threshold_bytes268435456bytesruntimenodeBytes one operator keeps in memory before it spills. The operator spills at whichever limit it reaches first.
spill_merge_fan_in16intruntimenodeSpill files merged in one pass. Must be above 0.
spill_max_frame_bytes268435456bytesruntimenodeLargest record that a spill file may declare. A larger length is treated as corruption.
spill_max_total_bytes8589934592bytesruntimenodeTotal size of all spill files on this node. A statement that would exceed it fails.

SHOW VARIABLES also lists force_spill_threshold_rows, with the value null. This is a test hook that makes every operator spill on small inputs. No configuration layer sets it, and it has no production use.

Caches​

KeyDefaultTypeChangeScopeDescription
sql_parser_cache_ttl_seconds300secondsruntimenodeHow long a parsed statement stays cached after its last use. 0 turns the cache off.
sql_parser_cache_max_entries2048intruntimenodeParser cache size limit. 0 means no limit.
sql_parser_cache_sweep_seconds60secondsruntimenodeHow often expired parser-cache entries are removed. Must be above 0.
sql_parser_cache_max_bytes67108864bytesruntimenodeApproximate parser cache memory limit. 0 means no limit.
regex_cache_max_entries1024intruntimenodeCompiled regex patterns kept in memory. 0 turns caching off.
point_read_row_id_cache_enabledtrueboolrestartnodeRemembers which row a primary key points to, so a repeated point lookup needs one storage read instead of two.
point_read_row_id_cache_max_entries1000000intrestartnodeNumber of keys remembered per table. The cache is cleared when it fills up.

Query result cache​

The result cache is on by default. A query opts in with a {cache=…} hint. Set query_result_cache_enabled: false to turn the cache off completely. See Query result cache for the purpose of each setting and for operator guidance.

SET CLUSTER SETTING accepts new values for query_result_cache_default_ttl_ms, query_result_cache_max_entries, query_result_cache_max_bytes, and query_result_cache_sweep_interval_ms, but the running cache keeps the values it started with. Restart the node to apply them.

KeyDefaultTypeChangeScopeDescription
query_result_cache_enabledtrueboolrestartnodeTurns the result cache on or off.
query_result_cache_default_ttl_ms5000msrestartnodeLifetime of an entry whose hint sets no TTL.
query_result_cache_max_entries1024intrestartnodeEntries the cache holds.
query_result_cache_max_bytes67108864bytesrestartnodeTotal size of all entries.
query_result_cache_max_entry_bytes1048576bytesruntimenodeA larger result is not cached.
query_result_cache_max_entry_rows10000rowsruntimenodeA result with more rows is not cached.
query_result_cache_max_deps4096intruntimenodeDependencies of one entry.
query_result_cache_max_point_deps2048intruntimenodePoint-key dependencies of one entry.
query_result_cache_max_ranges256intruntimenodeRange dependencies of one entry.
query_result_cache_singleflight_wait_ms250msruntimenodeHow long a query waits for an identical query in flight before it runs on its own.
query_result_cache_strict_validation_max_keys10000intruntimenodeKeys that strict validation checks before it recomputes the entry.
query_result_cache_sweep_interval_ms10000msrestartnodeHow often expired entries are removed.

Schema limits​

KeyDefaultTypeChangeScopeDescription
max_identifier_length64UTF-16 unitsruntimeclusterLongest name of a new database, table, column, or index. Existing names still load.
max_columns_per_table512intruntimeclusterColumns per table.
max_indexes_per_table64intruntimeclusterSecondary indexes per table.
max_tables_per_database10000intruntimeclusterTables per database.
max_index_columns32intruntimeclusterKey and INCLUDE columns of one index. See Indexes.
max_index_include_tuple_bytes4096bytesruntimeclusterEncoded size of the INCLUDE values in one index entry. A larger row is rejected.
max_view_expansion_depth32intruntimeclusterNesting depth of views over views.

For the first six keys, 0 or less turns the limit off.

Large values and disk space​

The large_value_* settings control compression, out-of-line storage, and rewrite batching for large STRING, BYTES/BLOB, and ARRAY values. See Large values.

KeyDefaultTypeChangeScopeDescription
large_value_threshold_bytes2048bytesruntimeclusterStored size at which a value moves out of its row, when the column's storage strategy allows it.
large_value_compression_enabledtrueboolruntimeclusterLets the writer compress values of 256 bytes or more. Reads work either way.
large_value_compression_min_saving_percent12percentruntimeclusterA compressed value that saves less is stored raw.
large_value_rewrite_batch_rows200rowsruntimeclusterRows per transaction for ALTER TABLE ... REWRITE STORAGE. At most half of max_mutations_per_transaction.
large_value_resolve_batch_bytes67108864bytesruntimenodeDecoded size of compressed and out-of-line values that one read resolves at a time.
min_free_disk_bytes67108864bytesruntimenodeNew DML writes fail with CADB0536 when the data volume has less free space. Reads, DDL, and rollbacks still work. 0 or less turns the check off.

Row-level TTL​

See Row-level TTL. The ttl_default_* keys apply to a table that does not set its own value.

KeyDefaultTypeChangeScopeDescription
ttl_enabledtrueboolruntimeclusterRuns the expired-row sweep. Only tables with a TTL expression take part.
ttl_default_job_cron@daily@hourly, @daily, @weekly, @monthlyruntimeclusterHow often a table's sweep runs.
ttl_default_select_batch_size500rowsruntimeclusterRows read per batch while looking for expired rows.
ttl_default_delete_batch_size100rowsruntimeclusterRows deleted per transaction.
ttl_default_select_rate_limit0rows/sruntimeclusterRead rate limit. 0 means no limit.
ttl_default_delete_rate_limit100rows/sruntimeclusterDelete rate limit. 0 means no limit.
ttl_spans_per_table64intruntimeclusterNumber of spans a table is divided into for each run.
ttl_max_concurrent_spans_per_node1intruntimenodeNumber of spans one node processes at once.
ttl_load_pause_threshold16transactionsruntimenodePauses the sweep while more foreground transactions than this are running. 0 or less turns the pause off.
ttl_span_lease_ms30000msruntimeclusterLease on a claimed span. Another node takes over a span whose lease lapses.
ttl_span_lease_renew_interval_ms10000msruntimeclusterHow often the owner renews its span lease. Must be below ttl_span_lease_ms.

Materialized views, branches, and dropped objects​

KeyDefaultTypeChangeScopeDescription
materialized_view_refresh_enabledtrueboolruntimenodeLets this node run materialized view refreshes. Reads and DDL work either way.
materialized_view_refresh_chunk_rows10000rowsruntimeclusterRows a refresh writes per transaction. At most half of max_mutations_per_transaction.
materialized_view_refresh_takeover_attempts3intruntimeclusterRestarts of an interrupted refresh before it gives up. The view then keeps its previous contents.
branch_snapshot_hold_lease_ms300000msruntimeclusterLease on the history a branch pins on its parent. It is renewed while the branch exists. At least 5000.
snapshot_hold_retry_budget_ms10000msruntimeclusterHow long a statement that needs a snapshot hold, such as creating a branch, retries during a leader election. 0 or less tries once.
orphan_retention_ms604800000msruntimeclusterHow long a dropped database or table stays recoverable. 0 or less turns automatic reclaim off.
orphan_reclaim_interval_ms300000msruntimeclusterHow often one elected node reclaims expired dropped objects. 0 or less turns the sweep off.
fence_lease_ms30000msruntimeclusterLease on the lock that DROP, RELINK, and the reclaim sweep take on a database or table. A crashed holder frees it after the lease.
fence_lease_renew_interval_ms10000msruntimeclusterHow often the holder renews that lease. Must be below fence_lease_ms.
keyspace_purge_batch_size512keysruntimenodeKeys per DROP DATABASE purge batch. Each batch shares one delete-many round trip, bounding memory and amortizing Raft work.

Observability and the dashboard​

KeyDefaultTypeChangeScopeDescription
engine_metrics_enabledtrueboolrestartnodeCollects storage-engine metrics for SHOW ENGINE STATS.
slow_query_log_enabledfalseboolruntimenodeRecords slow statements; enabling or disabling takes effect on the next statement. See Slow query log.
slow_query_log_threshold_ms1000msruntimenodeStatements at least this slow are recorded. 0 records every statement.
slow_query_log_max_entries200intrestartnodeEntries the log keeps.
slow_query_log_max_sql_length4096charactersruntimenodeSQL text stored per slow entry or statement-statistics sample.
statement_stats_enabledfalseboolruntimenodeCollects per-shape statement statistics. Disabling preserves totals.
statement_stats_max_shapes2000intrestartnodeMaximum recorded shapes. Existing shapes are retained; new admissions are refused at capacity.
index_usage_enabledtrueboolruntimenodeCollects index usage reads, constraint reads, and writes. Disabling preserves counters.
query_activity_enabledtrueboolruntimenodeLists running statements for SHOW QUERIES and CANCEL QUERY.
query_activity_max_sql_length1024charactersruntimenodeSQL text shown per SHOW QUERIES row.
cluster_activity_peer_timeout_ms2000msruntimenodeHow long SHOW CLUSTER QUERIES, SHOW CLUSTER CONNECTIONS, and a forwarded CANCEL QUERY wait for each peer.
dashboard_enabledtrueboolrestartnodeServes the operator dashboard.
dashboard_refresh_seconds2secondsruntimenodeDashboard load panel refresh interval. The server clamps it to 1 to 300.
query_tracing_enabledfalseboolruntimenodeLogs one line per executed plan step.
lock_tracing_enabledfalseboolruntimenodeLogs one line per lock acquired.

Kahuna keys​

Every key below goes under the kahuna: map. Each one is read once when the node starts, so a change requires a restart, and SET CLUSTER SETTING rejects it. Each node reads its own file; where a row says so, give every node the same value.

"Kahuna default" means the value comes from the storage engine itself.

Storage and Raft log​

KeyDefaultTypeDescription
kahuna.storagerocksdbmemory, sqlite, rocksdb, solariumKey-value storage backend.
kahuna.storage_revisionv2stringOn-disk layout revision of the store. Read Kahuna engine section before you change it.
kahuna.wal_storagerocksdbmemory, sqlite, rocksdb, solariumRaft log backend.
kahuna.solarium_environmentdefaultdefault, io_uringFile I/O for Solarium layers; io_uring requires Linux support.
kahuna.storage_compaction_rate_mbpsunsetinteger MB/sKV flush/compaction pacing for RocksDB or Solarium; 0 means unlimited.
kahuna.storage_max_background_compactionsunsetintKV compaction concurrency; 0 uses the engine default.
kahuna.wal_revisionv2stringOn-disk layout revision of the Raft log.
kahuna.wal_sync_writestrue (Kahuna default)boolControls Raft log write syncing for backends that honor it. With false, an operating system crash or power loss can lose recent log entries. SQLite Raft metadata uses synchronous=NORMAL regardless of this flag.
kahuna.raft_lost_acknowledged_entries_policyquarantinequarantine, accept_and_logRestart-only policy when recovery finds lost acknowledged log entries. See storage damage and lost log entries before changing it.
kahuna.wal_group_commit_linger_ms0 (Kahuna default)msHow long a log writer waits to group more commits into one fsync. 0 turns the wait off.
kahuna.wal_single_fsync_committrueboolAcknowledges an autocommit write once a majority has stored it, and writes its commit marker with the next flush. This removes one fsync from the commit path.
kahuna.wal_shard_write_buffer_size_mbunset (64)MiBSee Raft WAL shard column families for this key and the next seven. 1 to 65536.
kahuna.wal_shard_min_write_buffer_number_to_mergeunset (2)int1 to 64.
kahuna.wal_shard_max_write_buffer_numberunset (4)int1 to 64. Must exceed the merge count.
kahuna.wal_shard_level0_file_num_compaction_triggerunset (8)int1 to 64.
kahuna.wal_shard_level0_slowdown_writes_triggerunset (28)int1 to 64.
kahuna.wal_shard_level0_stop_writes_triggerunset (44)int1 to 64.
kahuna.wal_shard_max_bytes_for_level_base_mbunset (256)MiB1 to 65536.
kahuna.wal_shard_universal_compactionunset (false)boolUniversal instead of leveled compaction.

Transactions and admission​

KeyDefaultTypeDescription
kahuna.default_transaction_timeout_ms5000 (Kahuna default)msSession timeout when a caller passes none. Must not exceed kahuna.max_transaction_timeout_ms.
kahuna.max_transaction_timeout_ms300000, raised to max_serializable_transaction_lifetime_ms when that is largermsUpper bound on any session timeout. An explicit value must be at least max_serializable_transaction_lifetime_ms.
kahuna.max_concurrent_sessions0intSessions open at once on this node. Further transactions queue by priority. 0 turns the admission gate off.
kahuna.default_admission_wait_ms5000 (Kahuna default)msHow long a transaction queues at the gate before it is refused. Must not exceed kahuna.max_admission_wait_ms.
kahuna.max_admission_wait_ms30000 (Kahuna default)msUpper bound on any admission wait.
kahuna.transaction_priority_reserved_slots0intSession slots only high and critical transactions may use. Must be below kahuna.max_concurrent_sessions.
kahuna.transaction_priority_aging_threshold1000 (Kahuna default)msWait time after which a queued transaction gains one priority level. 0 turns aging off.
kahuna.transaction_priority_max_queued4096 (Kahuna default)intTransactions that may wait at the gate. More are refused with a retryable error. 0 means no limit.
kahuna.transaction_outcome_retention_ttl_ms300000 (Kahuna default)msHow long a finished transaction's outcome record is kept. 0 turns age pruning off. See Transaction outcome retention.
kahuna.transaction_outcome_retention_max10000 (Kahuna default)intOutcome records kept per node.
kahuna.one_phase_apply_time_validationtrueboolLets an eligible single-partition read-modify-write commit in one Raft round. Same value on every node. See One-phase apply-time validation.
kahuna.staged_base_fence_retention_ms600000 (Kahuna default)msHow long the validation fence remembers committed keys. Same value on every node. Must be above 0.
kahuna.durable_materialize_on_resolvetrueboolA committed transaction installs its values on every replica when it resolves, instead of writing a separate record per key. During a rolling upgrade from a Kahuna version older than 1.10.1, set it to false until every node is upgraded.
kahuna.scan_page_retry_budget_ms5000 (Kahuna default)msHow long one range-scan page retries transient errors before the scan fails with an error that names the range. Keep it below the client command deadline.

Workers and threads​

KeyDefaultTypeDescription
kahuna.locks_workersmax(32, 4 × CPU cores)intLock actors. Each lock resource is served by one of them.
kahuna.key_value_workersmax(32, 4 × CPU cores)intKey-value actors. Each key is served by one of them.
kahuna.background_writer_workers1 (Kahuna default)intWorkers that write changed objects to the storage backend.
kahuna.read_io_threads4 (Kahuna default)intThreads that serve Raft log reads.
kahuna.write_io_threads8 (Kahuna default)intThreads that flush Raft log writes.

All five must be above 0 when set.

Raft timing​

KeyDefaultTypeDescription
kahuna.start_election_timeout_ms2000 cluster, 500 standalonemsLower bound of the random election timeout. Must be below kahuna.end_election_timeout_ms.
kahuna.end_election_timeout_ms4000 cluster, 1500 standalonemsUpper bound of the random election timeout.
kahuna.start_election_timeout_increment_ms100 (Kahuna default)msAdded to the lower bound after each failed election round.
kahuna.end_election_timeout_increment_ms200 (Kahuna default)msAdded to the upper bound after each failed election round.
kahuna.heartbeat_interval_ms100 (Kahuna default)msHow often a leader sends heartbeats.
kahuna.recent_heartbeat_msa quarter of kahuna.heartbeat_interval_msmsA leader skips the heartbeat to a peer it contacted this recently. Must be below kahuna.heartbeat_interval_ms.
kahuna.voting_timeout_ms1500 (Kahuna default)msHow long a candidate waits for votes before it starts a new election round.

Caches, eviction, and log compaction​

KeyDefaultTypeDescription
kahuna.max_entries_per_actorcomputed from memoryintCached entries per actor. See Cache defaults proportional to memory.
kahuna.max_bytes_per_actorcomputed from memorybytesCache size per actor.
kahuna.cache_entry_ttl_ms300000 (Kahuna default)msIdle time after which the collection sweep may evict a cached entry.
kahuna.cache_entries_to_remove1000 (Kahuna default)intEntries one collection pass evicts.
kahuna.collection_interval_ms60000 (Kahuna default)msHow often the collection sweep runs. range_lock_expires_ms must be at least twice this value.
kahuna.compact_every_operations1000 (Kahuna default)intPersisted Raft log batches between compaction passes.
kahuna.compact_number_entries50 (Kahuna default)intTrailing log entries each pass keeps.
kahuna.max_entries_per_compaction5000 (Kahuna default)intLog entries one pass may delete.
kahuna.rocksdb_shared_memorytrueboolOne RocksDB block cache and write-buffer budget for both the store and the Raft log. Only applies when both use rocksdb.
kahuna.rocksdb_shared_memory_budget_mbcomputed from memoryMiBShared cache for RocksDB or Solarium, sized from machine/container memory.
kahuna.rocksdb_shared_memtable_budget_mbcomputed from memoryMiBShared memtable sub-budget for RocksDB or Solarium. Must not exceed kahuna.rocksdb_shared_memory_budget_mb.
kahuna.rocksdb_direct_readsfalseboolReads SST files with direct I/O, past the operating system page cache.

The count and size keys above must be above 0 when set.

Write aggregation keys​

See Write aggregation.

KeyDefaultTypeDescription
kahuna.key_value_write_max_in_flight_batches_per_partition1 (Kahuna default)intWrite batches a partition may have waiting on Raft. 1 to 64.
kahuna.key_value_write_linger_ms1 (Kahuna default)msHow long the oldest queued write may wait while nothing is in flight. 0 to 1000.
kahuna.key_value_write_post_completion_hold_ms1msWait after a batch completes before the next one is sent. 0 to 1000.
kahuna.key_value_write_precise_wakefalse (Kahuna default)boolRuns the aggregator's timers on a dedicated thread.
kahuna.key_value_write_fill_target_triggerfalse (Kahuna default)boolSends a held batch as soon as it reaches the learned fill target.
kahuna.key_value_write_max_batch_items512 (Kahuna default)intItems per write batch. 1 to 65536.

Backup and point-in-time recovery​

See Backup and restore.

KeyDefaultTypeDescription
kahuna.backup_dirunset (backups off)pathDirectory for backups. Setting it turns backups on. Must not be blank when present.
kahuna.pitr_window_seconds3600 (Kahuna default)secondsHow far back a restore may target. 1 to 21600.
kahuna.base_snapshot_interval_seconds1800 (Kahuna default)secondsHow often a new base image is taken. Must not exceed kahuna.pitr_window_seconds.
kahuna.restore_rootunsetpathTurns on remote restore, with destinations confined to this directory.
kahuna.allow_unconfined_remote_restorefalseboolAllows remote restore without kahuna.restore_root, to any path. Not safe.
kahuna.backup_cluster_idunsetstringCluster identity written into backup manifests. Same value on every node.
kahuna.backup_mac_key_fileunsetpathKey file that signs and verifies backup manifests. Same file on every node.
kahuna.backup_retention_max_chains0intBackup chains to keep. 0 means no limit.
kahuna.backup_retention_max_age_seconds0secondsMaximum chain age. 0 means no limit.
kahuna.backup_retention_max_bytes0bytesTotal backup size. 0 means no limit.
kahuna.backup_gc_interval_seconds3600 (Kahuna default)secondsHow often the backup cleanup runs. 0 turns the timer off.
kahuna.backup_restore_throttle_bytes_per_sec0bytes/sCopy rate limit of a restore. 0 means no limit.

SHOW VARIABLES also lists a top-level pitr_window_seconds. It is a copy of the effective kahuna.pitr_window_seconds, 3600 when that key is unset. The restore command uses it to reject a target time outside the window. You cannot set it directly. Set kahuna.pitr_window_seconds instead.

Row history retention​

See Persistent MVCC revision retention and Time travel reads.

KeyDefaultTypeDescription
kahuna.persistent_revision_retention_age_secondskahuna.pitr_window_seconds when both retention keys are unsetsecondsAge after which old row versions are pruned. 0 turns age pruning off. A nonzero value must be at least the PITR window.
kahuna.persistent_revision_retention_count0intRow versions kept per key. 0 turns count pruning off.

Range splits and merges​

These apply only with key-range sharding. See Key-range sharding and range splits.

KeyDefaultTypeDescription
kahuna.range_split_threshold0keysSampled key count at which a range splits. 0 turns count-based splits off. A nonzero value must be at least twice kahuna.range_split_min_range_size.
kahuna.range_split_min_range_size10 (Kahuna default)keysKeys each child range must keep after a split.
kahuna.range_split_load_threshold0operations/sSustained load at which a range splits. 0 turns load-based splits off.
kahuna.range_split_load_min_queue_depth8 (Kahuna default)intPending log writes a partition must also show.
kahuna.range_split_load_min_commit_wait_ms0 (Kahuna default)msCommit wait a partition must also show. 0 turns this check off.
kahuna.range_split_load_window_ms15000 (Kahuna default)msHow long the load must last before a split.
kahuna.range_split_load_poll_interval_ms5000 (Kahuna default)msHow often load is sampled. Must be below the window.
kahuna.range_split_load_imbalance_max0.8 (Kahuna default)fractionA split is refused when one child would still get this share of the writes. Above 0.5, at most 1.0.
kahuna.range_split_settle_window_ms10000 (Kahuna default)msHow long a new child range is left alone. Must be at least kahuna.min_leader_stability_ms.
kahuna.range_split_indivisible_cooldown_ms300000 (Kahuna default)msHow long a range that could not be split is skipped.
kahuna.range_move_settle_timeout_ms10000 (Kahuna default)msLongest pause a split or merge holds on the moving range while it settles pending writes.
kahuna.range_merge_min_size10 (Kahuna default)keysTwo neighboring ranges smaller than this may merge. 0 turns merges off.
kahuna.enable_load_reportsfalseboolShares per-partition load reports between nodes even when nothing else needs them.

Replica placement and leader balancing​

KeyDefaultTypeDescription
kahuna.replication_factor0intReplicas per data partition. 0 places every partition on every node. Prefer an odd number. See Cluster.
kahuna.zoneunsetstringFailure-domain label of this node, such as a rack or availability zone. Replicas of a range spread across zones.
kahuna.enable_placement_rebalancerfalseboolMoves replicas over time: repairs ranges that lost a replica, and evens out the spread as nodes join and leave.
kahuna.placement_pass_interval_ms5000 (Kahuna default)msHow often the placement pass runs.
kahuna.max_replica_moves_per_pass4 (Kahuna default)intReplica moves one pass may start.
kahuna.max_concurrent_replica_transfers1 (Kahuna default)intBalancing moves in flight.
kahuna.max_concurrent_replica_repairs3 (Kahuna default)intRepair moves in flight.
kahuna.replica_count_deadband1 (Kahuna default)intReplica-count imbalance per node that is tolerated before balancing.
kahuna.decommission_drain_timeout_ms120000 (Kahuna default)msHow long a decommission waits for the leaving node's replicas to move before it removes the node anyway.
kahuna.enable_leader_balancerfalseboolMoves Raft leaders between nodes to spread load. Same value on every node.
kahuna.leader_balancer_interval_ms30000 (Kahuna default)msHow often the leader balancer runs.
kahuna.leader_balancer_report_interval_ms5000 (Kahuna default)msHow often each node publishes its load report.
kahuna.leader_balancer_report_ttl_ms20000 (Kahuna default)msAge after which a load report is ignored. Must be above the report interval.
kahuna.min_leader_stability_ms5000 (Kahuna default)msShortest time a partition keeps its leader before the balancer may move it again.

The interval, count, and timeout keys in this table must be above 0 when set.

Diagnostics keys​

Keys under the diagnostics: map export server metrics and traces. Everything is off by default. The node reads these keys at startup, so a change needs a restart. See Performance diagnostics.

KeyDefaultTypeDescription
diagnostics.enabledfalseboolTurns diagnostics on. When false, the other keys have no effect.
diagnostics.prometheus_enabledfalseboolServes a Prometheus scrape endpoint on the HTTP port.
diagnostics.prometheus_path/metricspathPath of the scrape endpoint. Must start with /.
diagnostics.otlp_endpointunsetURLOTLP collector address. Setting it turns on the OTLP exporter. Must be an absolute URL.
diagnostics.trace_sample_ratio0.010 to 1Share of requests that are traced.
diagnostics.include_runtime_metricstrueboolAlso exports .NET runtime and process metrics (GC, thread pool, CPU).