Turso exposes io_uring’s hidden readahead tax
Turso’s O_DIRECT-based io_uring backend loses kernel readahead, but application-side prefetching cut TPC-H device requests from roughly 196,000 to 16,300 by keeping reads in flight.
The lesson is less “io_uring is faster” than “async I/O needs an explicit queueing strategy”: bypassing the page cache trades kernel convenience for application responsibility.
- –A 32-page prefetch window enabled 91–93% request merging, turning tiny reads into larger device requests.
- –O_DIRECT avoids copying through the page cache but can shift the cost into CPU cache misses.
- –SQPOLL helps when spare vCPUs exist; otherwise, its polling thread competes with application work.
- –Turso’s plain io_uring path can batch submissions, but its pager still waits one page at a time.
- –Database and AI-serving workloads should benchmark latency, CPU, cache behavior, and device merges—not just IOPS.
DISCOVERED
2h ago
2026-09-01
PUBLISHED
5h ago
2026-09-01
RELEVANCE
AUTHOR
porridgeraisin
