From 5c4e06479d2fade041be65b996a5b6d2bfe20d05 Mon Sep 17 00:00:00 2001 From: Eric Allam Date: Tue, 12 May 2026 19:01:38 +0100 Subject: [PATCH] chore(docker): disable ClickHouse system log tables in local dev (#3565) ## Summary Local ClickHouse was burning ~325% CPU endlessly merging its own telemetry tables (`metric_log`, `asynchronous_metric_log`, `part_log`, `trace_log`) after the container had been running long enough to accumulate hundreds of GB of system-log data. OrbStack Helper reflected this on the host (~400% CPU). These tables are not used by anything in the dev stack. They only exist for ClickHouse to log itself, so disabling them eliminates the merge churn entirely. ## Changes - Adds `docker/config/clickhouse-disable-system-logs.xml`, mounted into `/etc/clickhouse-server/config.d/`, that removes the noisy system log tables via ``. - Mounts the override file in `docker/docker-compose.yml`. After applying, idle CPU dropped from 325% to ~12% on my machine. ## Test plan - [ ] `pnpm run docker` brings up the stack cleanly - [ ] `docker stats clickhouse` shows low idle CPU - [ ] App functionality unaffected (system log tables are not queried by the webapp) --- docker/config/clickhouse-disable-system-logs.xml | 13 +++++++++++++ docker/docker-compose.yml | 1 + 2 files changed, 14 insertions(+) create mode 100644 docker/config/clickhouse-disable-system-logs.xml diff --git a/docker/config/clickhouse-disable-system-logs.xml b/docker/config/clickhouse-disable-system-logs.xml new file mode 100644 index 000000000..440df4c07 --- /dev/null +++ b/docker/config/clickhouse-disable-system-logs.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 6b64e901b..547c64d81 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -137,6 +137,7 @@ services: volumes: - clickhouse-data:/var/lib/clickhouse - clickhouse-logs:/var/log/clickhouse-server + - ./config/clickhouse-disable-system-logs.xml:/etc/clickhouse-server/config.d/disable-system-logs.xml:ro networks: - app_network healthcheck: