r/cpp•
joakimthun

I built a 3.9M ops/sec io_uring KV server in C++ — ~90% of the code written by AI

I’ve been experimenting with high-performance networking on Linux and built a small project called dalahash.

It’s an in-memory key-value server using a thread-per-core architecture with io_uring.

Design:

  • worker thread per CPU (pinned) and RX/TX queue
  • one io_uring instance per worker
  • SO_REUSEPORT listener sharding
  • lock-free shared KV store
  • Redis and Memcached protocols (small subset)

Quick benchmark using memtier_benchmark:

  • ~3.9M ops/sec
  • 230 µs average client latency
  • 823 µs p99.99 client latency
  • ~18.8M ops/sec with pipelining

About 90% of the code was written using AI agents (OpenAI GPT-5.3-Codex and Claude Opus 4.6). I mainly focused on the architecture and reviewed the generated code.

Repo:
https://github.com/joakimthun/dalahash

Curious what people working with io_uring or high-performance servers think.

Posted Mar 6, 2026, 3:50 PM UTC

01
Loading comments…