Get the latest tech news

Hitting Peak File IO Performance with Zig


This post goes through how to maximize file IO performance on linux using zig with io_uring. All code related to this post can be found in this repo.

4) Using the SQTHREAD_POLL feature This feature creates a kernel side busy thread that is constantly checking if there are any requests submitted by the user space into the submission queue and also in our case it makes this thread poll the SSD for io completions so it ends up making the library code a bit simpler. This feature doesn't seem to be enabled in other similar libraries probably because it used to require user privilages in OS level on older versions of the kernel, and also it runs a busy thread and maxes out a CPU core completely. The maxing of the CPU core can sound bad but you can actually use a single busy kernel thread for multiple of your user space io_uring instances using the WQ_ATTACH flag.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Performance

Performance

Photo of zig

zig

Photo of peak file

peak file

Related news:

News photo

A First Look At Ubuntu 25.10 Performance On AMD Strix Halo / Framework Desktop

News photo

AMD Secure AVIC Primed For Linux 6.18 To Provide Better Security & Performance

News photo

LLVM Clang 21 Compiler Helping Squeeze More Performance On 5th Gen AMD EPYC "Turin"