> ## Documentation Index
> Fetch the complete documentation index at: https://clickhouse.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# background_* server settings

> ClickHouse server settings in the background_* generated group.

export const SettingsInfoBlock = ({type, default_value, changeable_without_restart}) => {
  return <div className="not-prose" style={{
    display: "flex",
    flexWrap: "wrap",
    alignItems: "baseline",
    columnGap: "0.5rem",
    rowGap: "0.125rem",
    margin: "0.375rem 0",
    fontSize: "0.8125rem",
    lineHeight: "1.125rem"
  }}>
      <div style={{
    fontWeight: 600,
    opacity: 0.72
  }}>Type</div>
      <div style={{
    overflowWrap: "anywhere"
  }}>{type}</div>
      <div style={{
    fontWeight: 600,
    opacity: 0.72,
    marginInlineStart: "0.5rem"
  }}>Default</div>
      <div style={{
    overflowWrap: "anywhere"
  }}>{default_value}</div>
      {changeable_without_restart && <div style={{
    fontWeight: 600,
    opacity: 0.72,
    marginInlineStart: "0.5rem"
  }}>
          Changeable without restart
        </div>}
      {changeable_without_restart && <div style={{
    overflowWrap: "anywhere"
  }}>
          {changeable_without_restart}
        </div>}
    </div>;
};

These settings configure the ClickHouse server and are autogenerated from ClickHouse source.

<h2 id="background_buffer_flush_schedule_pool_size">
  background\_buffer\_flush\_schedule\_pool\_size
</h2>

<SettingsInfoBlock type="UInt64" default_value="16" changeable_without_restart="Increase only" />The maximum number of threads that will be used for performing flush operations for [Buffer-engine tables](/docs/reference/engines/table-engines/special/buffer) in the background.

<h2 id="background_common_pool_size">
  background\_common\_pool\_size
</h2>

<SettingsInfoBlock type="UInt64" default_value="8" changeable_without_restart="No" />The maximum number of threads that will be used for performing a variety of operations (mostly garbage collection) for [\*MergeTree-engine](/docs/reference/engines/table-engines/mergetree-family/index) tables in the background.

<h2 id="background_distributed_schedule_pool_size">
  background\_distributed\_schedule\_pool\_size
</h2>

<SettingsInfoBlock type="UInt64" default_value="16" changeable_without_restart="Increase only" />The maximum number of threads that will be used for executing distributed sends.

<h2 id="background_fetches_pool_size">
  background\_fetches\_pool\_size
</h2>

<SettingsInfoBlock type="UInt64" default_value="16" changeable_without_restart="No" />The maximum number of threads that will be used for fetching data parts from another replica for [\*MergeTree-engine](/docs/reference/engines/table-engines/mergetree-family/index) tables in the background.

<h2 id="background_message_broker_schedule_pool_size">
  background\_message\_broker\_schedule\_pool\_size
</h2>

<SettingsInfoBlock type="UInt64" default_value="16" changeable_without_restart="Increase only" />The maximum number of threads that will be used for executing background operations for message streaming.

<h2 id="background_move_pool_size">
  background\_move\_pool\_size
</h2>

<SettingsInfoBlock type="UInt64" default_value="8" changeable_without_restart="No" />The maximum number of threads that will be used for moving data parts to another disk or volume for \*MergeTree-engine tables in a background.

<h2 id="background_pool_size">
  background\_pool\_size
</h2>

<SettingsInfoBlock type="UInt64" default_value="16" changeable_without_restart="No" />

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

<Note>
  * This setting could also be applied at server startup from the `default` profile configuration for backward compatibility at the ClickHouse server start.
  * You can only increase the number of threads at runtime.
  * To lower the number of threads you have to restart the server.
  * By adjusting this setting, you manage CPU and disk load.
</Note>

<Danger>
  Smaller pool size utilizes less CPU and disk resources, but background processes advance slower which might eventually impact query performance.
</Danger>

Before changing it, please also take a look at related MergeTree settings, such as:

* [`number_of_free_entries_in_pool_to_lower_max_size_of_merge`](/docs/reference/settings/merge-tree-settings/number-of#number_of_free_entries_in_pool_to_lower_max_size_of_merge).
* [`number_of_free_entries_in_pool_to_execute_mutation`](/docs/reference/settings/merge-tree-settings/number-of#number_of_free_entries_in_pool_to_execute_mutation).
* [`number_of_free_entries_in_pool_to_execute_optimize_entire_partition`](/docs/reference/settings/merge-tree-settings/number-of#number_of_free_entries_in_pool_to_execute_optimize_entire_partition)

**Example**

```xml theme={null}
<background_pool_size>16</background_pool_size>
```

<h2 id="background_streaming_schedule_pool_size">
  background\_streaming\_schedule\_pool\_size
</h2>

<SettingsInfoBlock type="UInt64" default_value="16" changeable_without_restart="Increase only" />The maximum number of threads that will be used for executing streaming background operations.
