Server Settings

**See Also**

- [Workload Scheduling](/docs/operations/workload-scheduling)

## cpu\_slot\_quantum\_ns[​](#cpu_slot_quantum_ns "Direct link to cpu_slot_quantum_ns")

It defines how many CPU nanoseconds a thread is allowed to consume after acquired a CPU slot and before it should request another CPU slot. Makes sense only if `cpu_slot_preemption` is enabled and CPU resource is defined for MASTER THREAD or WORKER THREAD.

**Example**

```
<cpu_slot_quantum_ns>10000000</cpu_slot_quantum_ns>
```

**See Also**

- [Workload Scheduling](/docs/operations/workload-scheduling)

## crash\_log[​](#crash_log "Direct link to crash_log")

Settings for the [crash\_log](/docs/operations/system-tables/crash_log) system table operation.

The following settings can be configured by sub-tags:

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Setting Description Default Note|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | | `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` |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | | `database` Name of the database. |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | | `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| `flush_interval_milliseconds` Interval for flushing data from the buffer in memory to the table. `7500` |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | | `flush_on_crash` Sets whether logs should be dumped to the disk in case of a crash. `false` |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | | `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. `1024` |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | | `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'| `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'| `reserved_size_rows` Pre-allocated memory size in lines for the logs. `1024` |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | | `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'| `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'| `table` Name of the system table. |  |  |  |  | | --- | --- | --- | --- | | `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' | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |

The default server configuration file `config.xml` contains the following settings section:

```
<crash_log>
    <database>system</database>
    <table>crash_log</table>
    <partition_by>toYYYYMM(event_date)</partition_by>
    <flush_interval_milliseconds>7500</flush_interval_milliseconds>
    <max_size_rows>1024</max_size_rows>
    <reserved_size_rows>1024</reserved_size_rows>
    <buffer_size_rows_flush_threshold>512</buffer_size_rows_flush_threshold>
    <flush_on_crash>false</flush_on_crash>
</crash_log>
```

## custom\_cached\_disks\_base\_directory[​](#custom_cached_disks_base_directory "Direct link to custom_cached_disks_base_directory")

This setting specifies the cache path for custom (created from SQL) cached disks.
`custom_cached_disks_base_directory` has higher priority for custom disks over `filesystem_caches_path` (found in `filesystem_caches_path.xml`),
which is used if the former one is absent.
The filesystem cache setting path must lie inside that directory,
otherwise an exception will be thrown preventing the disk from being created.

Note

This will not affect disks created on an older version for which the server was upgraded.
In this case, an exception will not be thrown, to allow the server to successfully start.

Example:

```
<custom_cached_disks_base_directory>/var/lib/clickhouse/caches/</custom_cached_disks_base_directory>
```

## custom\_settings\_prefixes[​](#custom_settings_prefixes "Direct link to custom_settings_prefixes")

List of prefixes used for [custom settings](/docs/operations/settings/query-level#custom_settings).
Multiple prefixes should be separated by commas.

**Example**

```
<custom_settings_prefixes>SQL_</custom_settings_prefixes>
```

**See Also**

- [Custom settings](/docs/operations/settings/query-level#custom_settings)

## database\_atomic\_delay\_before\_drop\_table\_sec[​](#database_atomic_delay_before_drop_table_sec "Direct link to database_atomic_delay_before_drop_table_sec")

The delay during which a dropped table can be restored using the [`UNDROP`](/docs/sql-reference/statements/undrop) statement. If `DROP TABLE` ran with a `SYNC` modifier, the setting is ignored.
The default for this setting is `480` (8 minutes).