Managed ClickHouse® settings reference

The settings listed in this reference allow you to manage the settings of your DoubleCloud Managed ClickHouse® cluster directly from the console.

logLevel

Selector

Event logging level.

Each next level contains complete information from the previous one:

  • LOG_LEVEL_ERROR: errors in the cluster

  • LOG_LEVEL_WARNING: events that can cause errors in the cluster

  • LOG_LEVEL_INFORMATION: confirmation messages, information about events that mustn't cause errors in the cluster

  • LOG_LEVEL_DEBUG: information that can be useful for debugging

  • LOG_LEVEL_TRACE: all the available information on cluster operation.

For more information, see the official ClickHouse® documentation .

maxConnections

Integer

The maximum number of inbound client connections.

Minimum value: 10

Default value: 4096

Note

This setting doesn't account for housekeeping connections that run distributed subqueries.

maxConcurrentQueries

Integer

The maximum number of requests processed in parallel.

Minimum value: 10

Default value: 500

keepAliveTimeout

Integer

The number of seconds ClickHouse® waits for incoming requests before closing the connection.

You can specify this setting in seconds or nanoseconds.

Default value: 10 seconds or 10000000000 nanoseconds.

uncompressedCacheSize

Integer

Cache size (in bytes) for uncompressed data used by the MergeTree family table engines.

Default value: 8589934592 (8 GB).

Note

The uncompressed cache is advantageous in certain cases for short queries.

markCacheSize

Integer

Approximate size (in bytes) of the cache of marks used by the MergeTree family table engines.

Default value: 5368709120 (5 GB).

maxTableSizeToDrop

Integer

Table-based size restriction (in bytes) on deletion.

If the MergeTree table size exceeds the maxTableSizeToDrop value, you can’t delete it using a DROP query.

Default value: 53687091200 (50 GB).

Tip

If you want to delete any table without restrictions, specify 0 in this setting.

maxPartitionSizeToDrop

Integer

Partition-based size restriction (in bytes) on deletion.

If the partition size for the MergeTree exceeds the maxPartitionSizeToDrop value, you can’t delete a table using this partition with a DROP query.

Default value: 53687091200 (50 GB).

Tip

If you want to delete a table using any partition size without restrictions, specify 0 in this setting.

timezone

String

Your cluster's time zone.

Specified by the IANA identifier as the UTC time zone or geographical location (for example, Africa/Abidjan).

backgroundPoolSize

Integer

Sets the number of threads performing background merges and mutations for tables with MergeTree engines.

You can only increase the number of threads at runtime. To lower the number of threads, restart the ClickHouse® server.

Warning

Before making changes to this setting, configure numberOfFreeEntriesInPoolToLowerMaxSizeOfMerge.

Default value: 16

Possible value: any positive integer.

For more information, see the official ClickHouse® documentation .

backgroundSchedulePoolSize

Integer

The number of threads for background jobs for replicated tables, streams in Apache Kafka®, and DNS cache updates .

This setting requires a ClickHouse® server restart to apply.

Default value: 128

Possible value: any positive integer.

backgroundFetchesPoolSize

Integer

The number of threads performing background fetches for replicated tables.

This setting requires a ClickHouse® server restart to apply.

Default value: 8

Possible value: any positive integer.

Tip

For production usage with frequent small insertions, we recommend using the default value.

backgroundMovePoolSize

Integer

The number of threads performing background moves of data parts for MergeTree tables.

This setting requires a ClickHouse® server restart to apply.

Default value: 8

Possible value: any positive integer.

backgroundCommonPoolSize

Integer

The number of threads performing background non-specialized operations like cleaning the filesystem for tables with MergeTree engines.

You can increase this setting at runtime. To lower it, restart the ClickHouse® server.

Default value: 8

Possible value: any positive integer.

backgroundMergesMutationsConcurrencyRatio

Integer

The ratio between the number of threads and the number of background merges and mutations that can be executed concurrently.

For example, if this setting is 2 (default value) and backgroundPoolSize is 16, ClickHouse® can execute 32 background merges in parallel.

You can only increase this ratio at runtime. To lower it, restart the ClickHouse® server.

Default value: 2

Possible value: any positive integer.

Tip

This setting is useful when giving small merges more execution priority.

totalMemoryProfilerStep

Integer

The memory size (in bytes) for a stack trace at every peak allocation step.

The data is stored in the system.trace_log system table with query_id equal to an empty string.

Default value: 4194304 (4 MB)

Possible value: any positive integer.

MergeTree

This subsection contains settings for the MergeTree table engine.

replicatedDeduplicationWindow

Integer

The number of the most recently inserted blocks for which ClickHouse Keeper stores hash sums to check for duplicates.

Default value: 100

Possible value: any positive integer.

Tip

To turn OFF deduplication, specify 0 in this setting.

For more information, see the official ClickHouse® documentation .

replicatedDeduplicationWindowSeconds

Integer

The number of seconds after which the hash sums of the inserted blocks are removed from ClickHouse Keeper.

You can specify this setting in seconds or nanoseconds.

Default value: 604800 seconds or 604800000000000 nanoseconds (1 week).

Possible value: any positive integer.

For more information, see the official ClickHouse® documentation .

partsToDelayInsert

Integer

If the number of active parts in a single partition exceeds the value for this setting, it forces INSERT queries to slow down.

ClickHouse® artificially executes INSERT longer (adds SLEEP to your query), so that the background merge process can merge parts faster than they're added.

Default value: 150

Possible value: any positive integer.

partsToThrowInsert

Integer

If the number of active parts in a single partition exceeds the value for this setting, INSERT is interrupted with the following exception:

Too many parts (N). Merges are processing significantly slower than inserts.

Default value: 300

Possible value: any positive integer.

Tip

To achieve maximum performance of SELECT queries, minimize the number of parts processed.

For more information, see the official ClickHouse® documentation .

maxReplicatedMergesInQueue

Integer

The maximum number of merge tasks that can be in the MergeTree queue at the same time.

Default value: 16

Possible value: any positive integer.

numberOfFreeEntriesInPoolToLowerMaxSizeOfMerge

Integer

The threshold value of free entries in the pool. If the number of entries in the pool falls below this value, ClickHouse® reduces the maximum size of a data part to merge.

Default value: 8

Possible value: any positive integer.

Tip

This setting can help handle small merges faster.

maxBytesToMergeAtMinSpaceInPool

Integer

The maximum total part size (in bytes) to be merged into one part, with the minimum available resources in the background pool.

Default value: 1048576 (1 MB)

Possible value: any positive integer.

For more information, see the official ClickHouse® documentation .

maxBytesToMergeAtMaxSpaceInPool

Integer

The maximum total parts size (in bytes) to be merged into one part if there are enough resources available.

Default value: 161061273600 (150 GB)

Possible value: any positive integer.

For more information, see the official ClickHouse® documentation .

minBytesForWidePart

Integer

The minimum number of bytes in a data part that can be stored in Wide format.

You can configure this setting alone, both this setting and minRowsForWidePart, or none of them.

Possible value: any positive integer.

For more information, see the official MergeTree Data Storage documentation.

minRowsForWidePart

Integer

The minimum number of rows in a data part that can be stored in Wide format.

You can configure this setting alone, both this setting and minBytesForWidePart, or none of them.

Possible value: any positive integer.

For more information, see the official MergeTree Data Storage documentation .

ttlOnlyDropParts

Checkbox

Enables or disables complete dropping of data parts where all rows are expired in MergeTree tables.

When this setting is OFF (by default), ClickHouse® only deletes expired rows according to their TTL.

When this setting is ON, ClickHouse®r drops a whole part when all rows in it are expired.

Dropping whole parts instead of partial cleaning rows after TTL allows shorter mergeWithTtlTimeout times and the lower impact on system performance.

Default value: OFF.

Possible values: ON or OFF.

inactivePartsToDelayInsert

Integer

If the number of inactive parts in a single partition in the table equals this value, INSERT artificially slows down.

This setting s useful when ClickHouse® fails to clean up enough parts in time.

Default value: 0 (unlimited)

Possible value: any positive integer.

inactivePartsToThrowInsert

Integer

If the number of inactive parts in a single partition exceeds this setting's value, INSERT is interrupted with the following exception:

Too many inactive parts (N). Parts cleaning are processing significantly slower than inserts.

Default value: 0 (unlimited)

Possible value: any positive integer.

allowRemoteFsZeroCopyReplication

Checkbox

If the data is stored remotely on several machines and needs to be synchronized, then only the metadata is replicated (paths to the data parts), but not the data itself.

Default value: Off.

mergeWithTtlTimeout

Integer

Minimum delay in seconds before repeating a merge with delete TTL.

You can specify this setting in seconds or nanoseconds.

Default value: 14400 seconds or 14400000000000 nanoseconds (4 hours)

Possible value: any positive integer.

mergeWithRecompressionTtlTimeout

Integer

Minimum delay in seconds before repeating a merge with recompression TTL.

You can specify this setting in seconds or nanoseconds.

Default value: 14400 seconds or 14400000000000 nanoseconds (4 hours)

Possible value: any positive integer.

Compression

These are data compression settings for MergeTree type tables.

Warning

We suggest you don't use the settings in this section if you're new to ClickHouse®.

You can configure multiple compression case sections. To create a case section, click +.

method

Selector

Compression method.

You can select one of the following compression methods:

  • METHOD_LZ4 - the lz4 compression.

  • METHOD_ZSTD - the zstd compression.

  • METHOD_LZ4HC - the lz4HC, a high-compression lz4 derivative.

minPartSize

Integer

The minimum size of a data part (in bytes).

Possible value: any positive integer.

level

Integer

Compression level.

Default value: 1

Possible value: any positive integer.

For more information, see the official ClickHouse® Codecs documentation .

graphiteRollup patterns

These settings allow you to configure multiple rollup patterns. To create a pattern, click +.

Warning

Patterns must follow a strict order:

  1. Patterns without function or retention.

  2. Patterns with both function and retention.

For more information on rollup patterns, see the official Graphite MergeTree documentation .

regexp

String

A pattern for the metric name (a regular or DSL).

function

String

The name of the aggregating function to apply to data whose age falls within the range: [age, age + precision].

Accepted functions:

  • MIN

  • MAX

  • ANY

  • AVG

Note

The average is calculated imprecisely, like the average of the averages.

retention

You can configure multiple sets of retention parameters. To create a new set, click +.

age

Integer

Compression level.

Default value: 0

Possible value: any positive integer.

precision

Integer

How precisely to define the age of the data in seconds.

Possible value: must be a divisor for 86400 (seconds in a day).

Kafka

Settings for cluster-level Kafka access configuration.

securityProtocol

Selector

Protocol used to communicate with brokers.

You can select one of the following security protocols:

  • SECURITY_PROTOCOL_PLAINTEXT - plain text

  • SECURITY_PROTOCOL_SSL - SSL protocol

  • SECURITY_PROTOCOL_SASL_PLAINTEXT - Kafka's SASL-enabled plain text authentication mechanism

  • SECURITY_PROTOCOL_SASL_SSL - SASL-enabled SSL protocol.

saslMechanism

Selector

SASL mechanism to use for authentication.

You can select one of the following mechanisms:

  • SASL_MECHANISM_GSSAPI - GSSAPI

  • SASL_MECHANISM_PLAIN - Kafka's SASL-enabled plain text authentication mechanism

  • SASL_MECHANISM_SCRAM_SHA_256 - SCRAM-SHA-256 mechanism

  • SASL_MECHANISM_SCRAM_SHA_512 - SCRAM-SHA-512 mechanism.

saslUsername

String

SASL username for use with the PLAIN and SASL-SCRAM-... mechanisms.

saslPassword

String

SASL password for use with the PLAIN and SASL-SCRAM-... mechanisms.

kafkaTopics

Settings for topic-level Kafka access configuration.

The settings topic-level are similar to the cluster-level authentication settings in the Kafka section.

Note

If topic-level authentication settings are not specified for a Kafka table, global settings from the Kafka section will apply.

rabbitmq

These settings allow to connect your Managed ClickHouse® cluster to RabbitMQ .

For more information on the RabbitMQ engine, see the official ClickHouse® documentation .

username

String

Username for the RabbitMQ account.

password

String

Password for the RabbitMQ account.

vhost

String

RAbbitMQ virtual host name.

totalMemoryTrackerSampleProbability

Integer

Allows to collect random allocations and deallocations, and writes them in the system.trace_log system table with trace_type equal to a MemorySample with the specified probability. The probability is for every allocation or deallocations, regardless of the allocation size.

Sampling happens only when the amount of untracked memory exceeds the untracked memory limit (default value is 4 MB). You can lower the value if the totalMemoryProfilerStep setting's value is also lowered.

Default value: 0 (Disable writing of random allocations and deallocations in the system.trace_log system table)

Possible value: any positive integer.

Tip

You can set totalMemoryProfilerStep to 1 for extra fine-grained sampling.

system.query_log

You can't turn off this table

You can't apply system.query_log_enabled: false, only change the size and time.

query_log_retention_size

default: 1073741824

query_log_retention_time

default: 2592000

system.query_thread_log

query_thread_log_enabled

default: ON

query_thread_log_retention_size

default: 536870912

query_thread_log_retention_time

default: 2592000

system.query_views_log

query_views_log_enabled

default: OFF

query_views_log_retention_size

default: 0

query_views_log_retention_time

default: 2592000

system.part_log

You can't turn off this table

You can't apply system.part_log_enabled: false, only change the size and time.

part_log_retention_size

default: 536870912

part_log_retention_time

default: 2592000

system.metric_log

metric_log_enabled

default: ON

metric_log_retention_size

default: 536870912

metric_log_retention_time

default: 2592000

system.asynchronous_metric_log:

asynchronous_metric_log_enabled

default: OFF

asynchronous_metric_log_retention_size

default: 0

asynchronous_metric_log_retention_time

default: 2592000

system.text_log

text_log_enabled

default: OFF

text_log_retention_size

default: 536870912

text_log_retention_time

default: 2592000

text_log_level

default: trace

system.trace_log

trace_log_enabled

default: OFF

trace_log_retention_size

default: 536870912

trace_log_retention_time

default: 2592000

system.opentelemetry_span_log

opentelemetry_span_log_enabled

default: OFF

opentelemetry_span_log_retention_size

default: 0

opentelemetry_span_log_retention_time

default: 2592000

system.session_log

session_log_enabled

default: OFF

session_log_retention_size

default: 0

session_log_retention_time

default: 2592000

system.zookeeper_log

zookeeper_log_enabled

default: OFF

zookeeper_log_retention_size

default: 0

zookeeper_log_retention_time

default: 2592000

system.asynchronous_insert_log

asynchronous_insert_log_enabled

default: OFF

asynchronous_insert_log_retention_size

default: 0

asynchronous_insert_log_retention_time

default: 2592000