---
title: "A journey to io_uring, AIO and modern storage devices"
description: "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."
url: "https://swe.quest/articles/a-journey-to-io-uring-aio-and-modern-storage-devices-ea62e6880dceaf0b"
canonical: "https://clickhouse.com/blog/a-journey-to-io_uring-aio-and-modern-storage-devices"
source: "ClickHouse"
published: "2021-03-09"
difficulty: "medium"
kind: "Research"
reading_minutes: 5
tags: ["storage-systems","hardware","performance","linux"]
---

# A journey to io\_uring, AIO and modern storage devices

A post on [ClickHouse](https://swe.quest/sources/clickhouse.md), published 2021-03-09, 5 min read, Research. Original: [https://clickhouse.com/blog/a-journey-to-io\_uring-aio-and-modern-storage-devices](https://clickhouse.com/blog/a-journey-to-io_uring-aio-and-modern-storage-devices)

## Summary

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.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Storage systems](https://swe.quest/tags/storage-systems.md) (Infrastructure)
- [Hardware](https://swe.quest/tags/hardware.md) (Infrastructure)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)
- [Linux](https://swe.quest/tags/linux.md) (Infrastructure)

## Prerequisites

- block devices
- Linux system calls ([easy posts on Linux](https://swe.quest/tags/linux.md?difficulty=easy))
- latency percentiles ([easy posts on Performance engineering](https://swe.quest/tags/performance.md?difficulty=easy))

## Keywords

io\_uring, Linux AIO, pread, Intel Optane, NVMe, preadv2, ClickHouse

## Related posts

- [The hidden latency inside your database](https://swe.quest/articles/the-hidden-latency-inside-your-database-263d79fde3372538.md): PlanetScale · 2026-11-03 · Easy · 8 min read · Storage systems, Databases, Performance engineering, Cloud platforms, Replication
  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.
- [A case for QLC SSDs in the data center](https://swe.quest/articles/a-case-for-qlc-ssds-in-the-data-center-15a5d65a93f5feee.md): Meta Engineering · 2025-03-04 · Easy · 5 min read · Storage systems, Hardware, Datacenters, Cost optimization
  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.
- [Running ClickHouse on NVIDIA Vera CPU: Is your favorite database up to the challenge?](https://swe.quest/articles/running-clickhouse-on-nvidia-vera-cpu-is-your-favorite-database-up-to-the-2e92c798f70f3113.md): ClickHouse · 2026-10-21 · Medium · 12 min read · Performance engineering, Query engines, Hardware, Analytics & OLAP
  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.
- [Improving Lakebase Postgres Compute Cache on Neon, Part 1](https://swe.quest/articles/improving-lakebase-postgres-compute-cache-on-neon-part-1-96696f73ade727a0.md): Neon · 2026-09-09 · Hard · 9 min read · PostgreSQL, Caching, Performance engineering, Memory management, Virtualization
  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.
- [POSETTE Talk Recap - Postgres Isn't Slow. Your Storage Is](https://swe.quest/articles/posette-talk-recap-postgres-isn-t-slow-your-storage-is-bd5c03e12884ee39.md): ClickHouse · 2026-08-20 · Medium · 7 min read · PostgreSQL, Performance engineering, Storage systems, Replication, Cloud platforms
  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.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
