Skip to content
ClickHouse Docs
ClickHouse DocsClickHouse Docs

distributed_background_* session settings

These settings are available in system.settings and are autogenerated from source.

distributed_background_insert_batch

Aliases: distributed_directory_monitor_batch_inserts

Type
Bool
Default
0

Enables/disables inserted data sending in batches.

When batch sending is enabled, the Distributed table engine tries to send multiple files of inserted data in one operation instead of sending them separately. Batch sending improves cluster performance by better-utilizing server and network resources.

Possible values:

  • 1 — Enabled.
  • 0 — Disabled.

distributed_background_insert_max_sleep_time_ms

Aliases: distributed_directory_monitor_max_sleep_time_ms

Type
Milliseconds
Default
30000

Maximum interval for the Distributed table engine to send data. Limits exponential growth of the interval set in the distributed_background_insert_sleep_time_ms setting.

Possible values:

  • A positive integer number of milliseconds.

distributed_background_insert_sleep_time_ms

Aliases: distributed_directory_monitor_sleep_time_ms

Type
Milliseconds
Default
100

Base interval for the Distributed table engine to send data. The actual interval grows exponentially in the event of errors.

Possible values:

  • A positive integer number of milliseconds.

distributed_background_insert_split_batch_on_failure

Aliases: distributed_directory_monitor_split_batch_on_failure

Type
Bool
Default
0

Enables/disables splitting batches on failures.

Sometimes sending particular batch to the remote shard may fail, because of some complex pipeline after (i.e. MATERIALIZED VIEW with GROUP BY) due to Memory limit exceeded or similar errors. In this case, retrying will not help (and this will stuck distributed sends for the table) but sending files from that batch one by one may succeed INSERT.

So installing this setting to 1 will disable batching for such batches (i.e. temporary disables distributed_background_insert_batch for failed batches).

Possible values:

  • 1 — Enabled.
  • 0 — Disabled.

distributed_background_insert_timeout

Aliases: insert_distributed_timeout

Type
UInt64
Default
0

Timeout for insert query into distributed. Setting is used only with insert_distributed_sync enabled. Zero value means no timeout.

Navigation