feat: io_uring-based file I/O for search hot path

Offen
#6,552 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
25/100
Issue-Typ
Feature
Klarheit
Muss geklärt werden
Aktivitätsstatus
Ruhig
Tech-Stack
linux, rust

Rechercherichtung

Beginne damit, Quickwits Search-Hot-Path und die von Tokio verwendeten Lesezugriffe des Blocking-Thread-Pools für posting lists und doc store segments nachzuverfolgen. Vergleiche die in der Issue beschriebenen Ansätze von compio und tokio-uring und lege anschließend fest, wie ältere Linux-Kernel und Nicht-Linux-Plattformen auf standardmäßige I/O zurückgreifen. Als abgeschlossen gilt die Arbeit, wenn ein vereinbarter Implementierungspfad sowie Durchsatz- und Latenzmessungen unter hoher Nebenläufigkeit vorliegen.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

area:performance area:search area:storage

Is your feature request related to a problem? Please describe.

Quickwit's file I/O goes through Tokio's blocking thread pool because epoll does not support file descriptors. Under high query concurrency, each posting list fetch is a blocking read() dispatched to a thread, adding scheduling overhead and capping throughput. At sustained high QPS this becomes the dominant bottleneck.

Describe the solution you'd like

Use io_uring for file I/O in the search hot path. io_uring eliminates the syscall round-trip via a shared ring buffer between userspace and the kernel. For random-read workloads on NVMe (posting lists, doc store segments) benchmarks consistently show 40-60% latency reduction and 2x+ throughput at high concurrency.

Two implementation paths:

  • compio -- async runtime built on io_uring, composable with existing futures. Requires replacing Tokio file I/O in the search path.
  • tokio-uring -- narrower scope, drop-in for Tokio's file ops.

Minimum kernel requirement: Linux 5.19. Can fall back to standard I/O on older kernels or non-Linux platforms.

Describe alternatives you've considered

Increasing the Tokio blocking thread pool size reduces contention but does not eliminate the syscall overhead or the context-switch cost per I/O operation.

Additional context

Apache Iggy (https://github.com/apache/iggy) runs its entire I/O stack on io_uring via compio (thread-per-core, shared-nothing). Their production experience serves as a reference implementation for this approach in a Rust async codebase.

Vorherrschende Sprache
Rust
Sterne
11.8k
Forks
628
Ø Merge
2 T. 22 Std.
Gemergte PRs (30 T.)
50

Entwicklungsumgebung

In Codespaces öffnen

Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus quickwit-oss/quickwit

Alle Issues in quickwit-oss/quickwit

Ähnliche Issues

Weitere Issues zu Rust

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.