fix(clickhouse): cut idle CPU from tiny parts and oversized merge pools

Observability writers flushed every few seconds with MinBatchSize unset,
creating constant small parts and merge load. Enable MinBatchSize with
MaxFlushWait, batch access logs more aggressively, and shrink ClickHouse
background pools for 3c hosts.
This commit is contained in:
ryan
2026-07-10 10:08:32 +08:00
parent b928928958
commit 9b3555c569
6 changed files with 111 additions and 8 deletions
+15 -4
View File
@@ -1,6 +1,17 @@
<?xml version="1.0"?>
<!--
Tuned for small control-plane hosts (e.g. 3c6g).
background_pool_size should stay near the vCPU count; oversized pools cause
idle merge threads to burn CPU while absorbing small parts from heartbeats.
-->
<clickhouse>
<max_concurrent_queries>50</max_concurrent_queries>
<background_pool_size>8</background_pool_size>
<background_merges_mutations_concurrency_ratio>2</background_merges_mutations_concurrency_ratio>
</clickhouse>
<max_concurrent_queries>20</max_concurrent_queries>
<background_pool_size>2</background_pool_size>
<background_merges_mutations_concurrency_ratio>1</background_merges_mutations_concurrency_ratio>
<background_schedule_pool_size>4</background_schedule_pool_size>
<background_common_pool_size>2</background_common_pool_size>
<background_fetches_pool_size>2</background_fetches_pool_size>
<background_move_pool_size>1</background_move_pool_size>
<mark_cache_size>268435456</mark_cache_size>
<uncompressed_cache_size>0</uncompressed_cache_size>
</clickhouse>