Skip to main content
These settings configure the ClickHouse server and are autogenerated from ClickHouse source.

background_merges_mutations_concurrency_ratio

Sets a ratio between the number of threads and the number of background merges and mutations that can be executed concurrently. For example, if the ratio equals to 2 and background_pool_size is set to 16 then ClickHouse can execute 32 background merges concurrently. This is possible, because background operations could be suspended and postponed. This is needed to give small merges more execution priority.
You can only increase this ratio at runtime. To lower it you have to restart the server.As with the background_pool_size setting background_merges_mutations_concurrency_ratio could be applied from the default profile for backward compatibility.

background_merges_mutations_scheduling_policy

The policy on how to perform a scheduling for background merges and mutations. Possible values are: round_robin and shortest_task_first. Algorithm used to select next merge or mutation to be executed by background thread pool. Policy may be changed at runtime without server restart. Could be applied from the default profile for backward compatibility. Possible values:
  • round_robin — Every concurrent merge and mutation is executed in round-robin order to ensure starvation-free operation. Smaller merges are completed faster than bigger ones just because they have fewer blocks to merge.
  • shortest_task_first — Always execute smaller merge or mutation. Merges and mutations are assigned priorities based on their resulting size. Merges with smaller sizes are strictly preferred over bigger ones. This policy ensures the fastest possible merge of small parts but can lead to indefinite starvation of big merges in partitions heavily overloaded by INSERTs.
Last modified on July 23, 2026