From 06c1593e9bbb69b549e087cb363bc74ee88dc6f3 Mon Sep 17 00:00:00 2001 From: Masaki Yatsu Date: Wed, 3 Dec 2025 16:07:07 +0900 Subject: [PATCH] fix(clickhouse): fix high memory usage --- clickhouse/clickhouse.gomplate.yaml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/clickhouse/clickhouse.gomplate.yaml b/clickhouse/clickhouse.gomplate.yaml index 2470d0f..c7f5df4 100644 --- a/clickhouse/clickhouse.gomplate.yaml +++ b/clickhouse/clickhouse.gomplate.yaml @@ -17,6 +17,18 @@ spec: nodes: - host: zookeeper port: 2181 + files: + # Use transposed schema for system log tables to reduce memory usage during merges + # See: https://altinity.com/blog/a-clickhouse-25-8-detective-story-high-memory-usage-and-how-to-fix-it + system_logs.xml: | + + + transposed + + + transposed + + users: admin/k8s_secret_password: clickhouse-credentials/admin admin/networks/ip: "::/0" @@ -46,4 +58,4 @@ spec: - ReadWriteOnce resources: requests: - storage: 100Mi + storage: 1Gi