목록으로

Programming Notes

왜 벤치마크가 내 작업에 계속 등장하는가


As the year winds down, I like to zoom out and look at the work I’m proudest of.

I wrote (and helped ship) a lot of ClickHouse content this year, but a bunch of the posts I care about most share the same backbone: each one has a benchmark behind it.

Blog-benchmarks-of-2025.gif

Blog-benchmarks-of-2025.gif

Benchmarks keep showing up in my work because they force clarity. They correct intuition, surface trade‑offs, and sometimes overturn narratives that have stuck around for too long.

Here are a few of my favorites from this year, the ones that surprised me, changed how people think about ClickHouse, or directly impacted how real systems were built. Taken together, they form a loose narrative, from data layout and ingestion, through storage and execution, and finally to cost.

And reading back through them, I kept noticing the same thing: performance comes down to how efficiently an engine moves data end‑to‑end.

The billion‑docs JSON benchmark

This benchmark started with a foundational question: what does JSON look like when you treat it as columnar data instead of a document blob?

ClickHouse completely reimagined JSON storage on top of column‑oriented storage, resulting in unmatched speed, compression, and user experience, far beyond any existing JSON data store.

To prove the speed, we created JSONBench: a reproducible benchmark that loads the same real‑world dataset (up to 1 B Bluesky events) into multiple systems, then measures storage size, cold/hot query runtimes, and data quality (how many documents were successfully ingested).

In the original billion‑docs run, ClickHouse was orders of magnitude faster while also being smaller on disk (including 20 % more compact than storing the same JSON as compressed files on disk).

JSON_Benchmarks_018_4572dccd94.png
JSON_Benchmarks_017_1e36137288.png

We also built a live online dashboard where you can slice results by dataset size, cold vs. hot, storage, and data quality, plus a toggle for systems that flatten JSON.

Blog-benchmarks-of-2025.002.png

JSONBench didn’t stop at a blog post. It’s now actively used in the community and regularly receives external pull requests, adding new or updating results for existing systems.

This is one of my favorite benchmarks this year because the results genuinely surprised me.
ClickHouse was thousands of times faster than traditional JSON data stores like MongoDB, while also using significantly less storage. It completely changed my intuition for what’s possible with analytical queries on JSON.

JSON.gif

Side story: ClickHouse already started from a strong lead in the original JSONBench results. We continued improving the JSON implementation independently, and later shipped new shared‑data serializations that dramatically improved performance and memory usage for complex JSON workloads. As a result, ClickHouse now leads even further across both cold and hot runs at all dataset sizes, with a significantly larger margin than before.

The input formats benchmark

This benchmark came from a deceptively simple question: *if ClickHouse supports 70+ input formats`, which ones actually matter for high‑throughput ingestion?

To answer that properly, we built FastFormats, a systematic benchmark that isolates server‑side ingestion cost and measures time, CPU usage, memory usage, and file size across dozens of formats, batch sizes, compression schemes, and pre‑sorting variants.

The headline result was clear and surprisingly consistent:

  • Native format wins across essentially all scenarios
  • Compression (LZ4 first, ZSTD when bandwidth matters) is a no‑brainer
  • Pre‑sorting helps, but much less than people expect
  • Batch size matters more than almost anything else

Blog_Formats_003_93c66d9a7e.png

And, like with JSONBench, we also built a live FastFormats dashboard where you can slice results by format, batch size, compression, pre‑sorting, and metric.

Blog-benchmarks-of-2025.003.png

This is one of my favorite benchmarks this year because it had direct production impact beyond ClickHouse itself.

Netflix describes how one of their biggest ingestion wins came directly from reading this post and looking at the FastFormats results. After seeing that the native ClickHouse protocol consistently outperformed RowBinary, they reverse‑engineered the Go client and implemented native‑protocol encoding with LZ4 in their Java pipeline. The result: lower CPU usage, better memory efficiency, and a system that now ingests ~5 PB of logs per day into ClickHouse.

The object storage cache benchmark

This benchmark started from a practical cloud question: why do analytics systems still feel slow even when throughput looks great on paper?

The answer turned out not to be bandwidth, but latency. Object storage can deliver decent throughput, but every read still costs hundreds of milliseconds, and for many analytical queries (small, selective, scattered reads), that latency dominates everything else.

To tackle this, we built and benchmarked a distributed cache for ClickHouse Cloud: a shared, low‑latency caching layer that sits between stateless compute nodes and object storage. Instead of each node warming its own isolated cache, hot table data is cached once and reused instantly by all nodes.

The benchmarks compare three setups using the same dataset and queries:

  1. a self‑managed server with local SSDs,
  2. ClickHouse Cloud with a traditional per‑node filesystem cache,
  3. ClickHouse Cloud with the new distributed cache.

Results

  • For throughput‑bound scans, cold queries ran up to 4× faster than a local‑SSD setup, thanks to shared caching and parallel fetch across cache nodes.
  • For latency‑sensitive scattered reads, cold queries matched SSD performance, and hot queries consistently hit sub‑60 ms memory‑speed latency—without any local disks at all.

Blog_caches_002_4142f575eb.png
Blog_caches_003_5834a2afa1.png

The key insight is that shared caching + elastic, stateless compute beats “fast disks”, even on cold starts. You get faster warm‑ups, no repeated downloads from object storage, and the ability to scale compute up or down without throwing away hot data.

This is one of my favorite benchmarks this year because it shows a real architectural shift.
Cloud‑native analytics doesn’t have to trade elasticity for performance anymore. You can have both.

The UPDATEs benchmark

For a long time, one sentence followed ClickHouse around: “Great for analytics, but you can’t really do frequent fast updates.”

This benchmark is where that narrative finally broke.

Accompanied by a post, we benchmarked every UPDATE mechanism ClickHouse supports – classic mutations, on‑the‑fly mutations, ReplacingMergeTree inserts, and the new standard SQL UPDATEs, implemented as lightweight updates with patch parts – side by side, on the same dataset, hardware, and queries.

The headline result ... (본문이 중간에서 끊긴 부분은 원문 그대로 유지)