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

Đang mở
#6,552 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Ít trao đổi
Công nghệ
linux, rust
Lĩnh vực
backend, performance, search

Hướng nghiên cứu

Bắt đầu bằng cách lần theo search hot path của Quickwit và các lần đọc tệp của blocking-thread-pool của Tokio được sử dụng cho posting lists và doc store segments. So sánh các cách tiếp cận của compio và tokio-uring được mô tả trong issue, sau đó xác định cách các kernel Linux cũ hơn và các nền tảng không phải Linux fallback về I/O tiêu chuẩn. Công việc được hoàn tất khi có một hướng triển khai đã được thống nhất cùng các phép đo throughput và latency dưới mức độ đồng thời cao.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Rust
Star
11.8k
Fork
628
Merge trung bình
2 ngày 22 giờ
Pull request đã merge (30 ngày)
50

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của quickwit-oss/quickwit

Tất cả issue của quickwit-oss/quickwit

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.