Hi team, we see our Clickhouse have too much stora...
# support
h
Hi team, we see our Clickhouse have too much storage caused by
zookeeper_log
table which seems abnormal. Any suggestions to reduce it?
Copy code
SELECT
    database,
    table,
    sum(bytes) AS total_bytes,
    formatReadableSize(sum(bytes)) AS total_size
FROM system.parts
GROUP BY
    database,
    table
ORDER BY total_bytes DESC
LIMIT 10

Query id: af84f6ab-6e2d-4412-a2d1-44ce0d13cc06

┌─database───────┬─table───────────────┬──total_bytes─┬─total_size─┐
│ system         │ zookeeper_log       │ 441949776174 │ 411.60 GiB │
│ signoz_logs    │ logs                │ 159756017169 │ 148.78 GiB │
│ signoz_metrics │ samples_v2          │  30754960877 │ 28.64 GiB  │
│ signoz_metrics │ samples_v4          │  27124827786 │ 25.26 GiB  │
│ system         │ query_log           │  10204533140 │ 9.50 GiB   │
│ system         │ part_log            │   8962585768 │ 8.35 GiB   │
│ signoz_logs    │ tag_attributes      │   5775550329 │ 5.38 GiB   │
│ signoz_metrics │ time_series_v4      │   4774899549 │ 4.45 GiB   │
│ signoz_metrics │ time_series_v4_6hrs │   4429241062 │ 4.13 GiB   │
│ signoz_metrics │ time_series_v4_1day │   4044959761 │ 3.77 GiB   │
└────────────────┴─────────────────────┴──────────────┴────────────┘
s
Share the output of
SHOW CREATE TABLE system.zookeeper_log
?
h
I found it’s a CH system table and saw there is a TTL config to retain X days.
s
@Herb He How did you resolve this, i seem to be having the same issue? @Srikanth Chekuri here is my system.zookeeper_log attached as image
h
@Samuel Olowoyeye just change the ttl to smaller value that make sense to your case
s
Thank you.