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 `<table remove="1"/>`.
- 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)
This commit is contained in:
Eric Allam
2026-05-12 19:01:38 +01:00
committed by GitHub
parent e8ef374fe0
commit 5c4e06479d
2 changed files with 14 additions and 0 deletions
@@ -0,0 +1,13 @@
<clickhouse>
<metric_log remove="1"/>
<asynchronous_metric_log remove="1"/>
<part_log remove="1"/>
<trace_log remove="1"/>
<query_thread_log remove="1"/>
<session_log remove="1"/>
<text_log remove="1"/>
<zookeeper_log remove="1"/>
<processors_profile_log remove="1"/>
<asynchronous_insert_log remove="1"/>
<backup_log remove="1"/>
</clickhouse>
+1
View File
@@ -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: