Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

ClickHouse 5 min read Research mediumAdept

A journey to io_uring, AIO and modern storage devices

Single random read latency was benchmarked with pread(2) across HDD, SATA SSD, NVMe SSD and Intel Optane, at block sizes from 4 KB to 32 MB. On HDD, seek time dominates below 256 KB, averaging about 12 ms. SATA SSD reads 4 KB in about 140 µs. NVMe mainly improves tail latency over SATA SSD. Optane reaches 12 µs minimum latency but has high tail variance, which polling mode (preadv2 with RWF_HIPRI) halves for blocks up to 256 KB. The recommended random-read block sizes are 256 KB for HDD, 4 KB for SATA and NVMe SSDs, and 8 KB for Optane.

Related posts

  • The hidden latency inside your database

    PlanetScale easyNovice

    Cloud databases on network-attached storage like EBS pay a network round trip on every disk operation, a cost that became the dominant bottleneck once SSDs made disks ~100x faster than spinning drives. PlanetScale Metal runs databases on local NVMe instead, getting durability from a primary plus at least two replicas across availability zones, with each commit acknowledged by one replica before returning to the client. Reads never cross the network and IOPS are uncapped: an i7i with local NVMe (~300,000 IOPS) cost $551/month versus $1,514 for an r7i with a 16,000-IOPS io2 volume. Workloads whose hot data fits in RAM with low write volume may not need it. Signs you do are frequent cache misses, hitting EBS IOPS limits, or low CPU usage with high latency.

  • A case for QLC SSDs in the data center

    Meta Engineering easyNovice

    QLC flash can form a storage tier between HDDs, whose bandwidth per TB keeps falling as density grows, and TLC SSDs, which remain too costly to scale. It targets read-heavy workloads in the 10–20 MB/s/TB range, with infrequent writes and lower power use. Meta favors U.2-15mm (up to 512TB) and Pure Storage DirectFlash Modules (up to 600TB) over E1.S and E3, aiming for 6x the byte density of its densest TLC server. Adapting the software requires io_uring and ublk with zero copy, plus tuned rate controllers and I/O schedulers so latency-sensitive reads aren't serialized behind much slower writes.

  • Running ClickHouse on NVIDIA Vera CPU: Is your favorite database up to the challenge?

    ClickHouse mediumAdept

    ClickHouse, run unmodified on NVIDIA's early-access Vera CPU (2×88 Arm Olympus cores, 352 SMT threads, ~1.2 TB/s memory bandwidth), topped the ClickBench hardware leaderboard. Micro-benchmarks on a 1 TB in-memory table show near-linear scaling for CPU-bound filters, low-cardinality aggregation and parallel hash joins up to the 176 physical cores, with efficiency dropping beyond that as SMT threads give only modest gains. A simple LIKE filter becomes memory-bound at ~64 threads (~813–900 GB/s). Disabling auto-vectorization on a comparison loop made a single-threaded filter 3.5x slower, showing the value of NEON SIMD, with SVE2 support in progress.

  • Improving Lakebase Postgres Compute Cache on Neon, Part 1

    Neon hardMaster

    On large fixed-size Lakebase Postgres computes, Neon now disables its NVMe-backed local file cache and sets shared buffers to 75% of DRAM (up from a 1 GB cap), backed by explicit 2 MB HugeTLB pages provisioned through host, hypervisor and guest VM. Huge pages cut per-backend page table overhead by 512× and reduce TLB misses, lowering tail read latency by up to ~40% and CPU by up to ~30% in benchmarks. Production endpoints saw up to 2× throughput, 5× fewer storage GetPage requests and 5× lower CPU, with near-100% cache hit rates. Autoscaling computes with dynamic shared buffers are planned for part 2.

  • POSETTE Talk Recap - Postgres Isn't Slow. Your Storage Is

    ClickHouse mediumAdept

    PostgreSQL scaling symptoms such as slow UPDATE-heavy ingestion, erratic P95 reads, autovacuum lag, disruptive checkpoints and logical replication lag often share one root cause: storage I/O limits. A pgbench random-UPDATE benchmark on a 3.3-billion-row, 482 GiB table showed local NVMe reaching 16,030 TPS versus 1,734 TPS on baseline 3,000-IOPS gp3 EBS (9.24×), with latency falling from 36.9 ms to 4.0 ms. Latency breakdowns, wait events and CPU profiles show the EBS hosts mostly idle waiting on page reads and WAL fsync. Because instance-store NVMe is ephemeral, the proposed production design relies on quorum synchronous replication (ANY 1 of two standbys across AZs) and continuous WAL-G backups to object storage for durability and point-in-time recovery.

The quest for software engineering knowledge.

Look:
Layout: