Server Settings

Allows to use jemalloc memory.

## allowed\_disks\_for\_table\_engines[​](#allowed_disks_for_table_engines "Direct link to allowed_disks_for_table_engines")

List of disks allowed for use with Iceberg

## async\_insert\_queue\_flush\_on\_shutdown[​](#async_insert_queue_flush_on_shutdown "Direct link to async_insert_queue_flush_on_shutdown")

If true queue of asynchronous inserts is flushed on graceful shutdown

## async\_insert\_threads[​](#async_insert_threads "Direct link to async_insert_threads")

Maximum number of threads to actually parse and insert data in background. Zero means asynchronous mode is disabled

## async\_load\_databases[​](#async_load_databases "Direct link to async_load_databases")

Asynchronous loading of databases and tables.

- If `true` all non-system databases with `Ordinary`, `Atomic` and `Replicated` engine will be loaded asynchronously after the ClickHouse server start up. See `system.asynchronous_loader` table, `tables_loader_background_pool_size` and `tables_loader_foreground_pool_size` server settings. Any query that tries to access a table, that is not yet loaded, will wait for exactly this table to be started up. If load job fails, query will rethrow an error (instead of shutting down the whole server in case of `async_load_databases = false`). The table that is waited for by at least one query will be loaded with higher priority. DDL queries on a database will wait for exactly that database to be started up. Also consider setting a limit `max_waiting_queries` for the total number of waiting queries.
- If `false`, all databases are loaded when the server starts.

**Example**

```
<async_load_databases>true</async_load_databases>
```

## async\_load\_system\_database[​](#async_load_system_database "Direct link to async_load_system_database")

Asynchronous loading of system tables. Helpful if there is a high amount of log tables and parts in the `system` database. Independent of the `async_load_databases` setting.

- If set to `true`, all system databases with `Ordinary`, `Atomic`, and `Replicated` engines will be loaded asynchronously after the ClickHouse server starts. See `system.asynchronous_loader` table, `tables_loader_background_pool_size` and `tables_loader_foreground_pool_size` server settings. Any query that tries to access a system table, that is not yet loaded, will wait for exactly this table to be started up. The table that is waited for by at least one query will be loaded with higher priority. Also consider setting the `max_waiting_queries` setting to limit the total number of waiting queries.
- If set to `false`, system database loads before server start.

**Example**

```
<async_load_system_database>true</async_load_system_database>
```

## asynchronous\_heavy\_metrics\_update\_period\_s[​](#asynchronous_heavy_metrics_update_period_s "Direct link to asynchronous_heavy_metrics_update_period_s")

Period in seconds for updating heavy asynchronous metrics.

## asynchronous\_insert\_log[​](#asynchronous_insert_log "Direct link to asynchronous_insert_log")

Settings for the [asynchronous\_insert\_log](/docs/operations/system-tables/asynchronous_insert_log) system table for logging async inserts.

The following settings can be configured by sub-tags:

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Setting Description Default Note|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | | `database` Name of the database. |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | | `table` Name of the system table. |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | | `engine` [MergeTree Engine Definition](/docs/engines/table-engines/mergetree-family/mergetree#table_engine-mergetree-creating-a-table) for a system table. Cannot be used if `partition_by` or `order_by` defined. If not specified `MergeTree` is selected by default| `partition_by` [Custom partitioning key](/docs/engines/table-engines/mergetree-family/custom-partitioning-key) for a system table. If `engine` is specified for system table, `partition_by` parameter should be specified directly inside 'engine'| `ttl` Specifies the table [TTL](/docs/engines/table-engines/mergetree-family/mergetree#table_engine-mergetree-ttl). If `engine` is specified for system table, `ttl` parameter should be specified directly inside 'engine'| `order_by` [Custom sorting key](/docs/engines/table-engines/mergetree-family/mergetree#order_by) for a system table. Can't be used if `engine` defined. If `engine` is specified for system table, `order_by` parameter should be specified directly inside 'engine'| `storage_policy` Name of the storage policy to use for the table (optional). If `engine` is specified for system table, `storage_policy` parameter should be specified directly inside 'engine'| `settings` [Additional parameters](/docs/engines/table-engines/mergetree-family/mergetree#settings) that control the behavior of the MergeTree (optional). If `engine` is specified for system table, `settings` parameter should be specified directly inside 'engine'| `flush_interval_milliseconds` Interval for flushing data from the buffer in memory to the table. `7500` |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | | `max_size_rows` Maximal size in lines for the logs. When the amount of non-flushed logs reaches the max\_size, logs are dumped to the disk. `1048576` |  |  |  |  |  |  |  |  |  |  |  |  | | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | | `reserved_size_rows` Pre-allocated memory size in lines for the logs. `8192` |  |  |  |  |  |  |  |  | | --- | --- | --- | --- | --- | --- | --- | --- | | `buffer_size_rows_flush_threshold` Threshold for amount of lines. If the threshold is reached, flushing logs to the disk is launched in background. `max_size_rows / 2` |  |  |  |  | | --- | --- | --- | --- | | `flush_on_crash` Sets whether logs should be dumped to the disk in case of a crash. `false`  | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |

**Example**