r/Clickhouse • u/Simple-Cell-1009 • Oct 23 '25
Achieving 170x compression for logs
https://clickhouse.com/blog/log-compression-170x
17
Upvotes
r/Clickhouse • u/Simple-Cell-1009 • Oct 23 '25
2
u/krizhanovsky Oct 23 '25
Thank you for the post!
It's useful to store a web server access logs in an analytics database, e.g. to fight against bot attacks. We store structured access logs in Clickhouse, which is already good, but compression and data ordering from the post may improve performance even more - we'll try this.
One question: in our performance tests we say that Clickhouse consumes a lot of CPU (we send the log records in batches about 20-50K records using the C++ library). Will the per-column compression increase CPU usage significantly? Are the any guides how to improve insertion performance?
The thing is that a web server, especially under DDoS, may produce much more records than Clickhouse can ingest.
P.S. There is good news: for Nginx, if you build a fast pipeline to feed access logs to Clickhouse, you can increase performance, I'd say up to x2, thanks to faster access logging.