I/O in Rust: the whole story
summary
Rust file reads often end up as blocking syscalls for files (std::fs read or Tokio spawning blocking threads), while networking uses multiplexing (poll/select via mio/Tokio). Linux offers true async with io_uring submission and completion queues, but it is low‑level and unsafe to use directly. DMA has been the disk mode for ~40 years. Tokio defaults to blocking for files, tokio-uring exists for real async and works but adds significant complexity and unsafe plumbing.
AI-written summary · about
chapters (11)
- 0:00I/O in Rust intro
- 1:04Hardware I/O devices
- 3:57Interrupts and DMA
- 7:07OS I/O interfaces
- 12:04Blocking vs non-blocking I/O
- 18:17Synchronous I/O in Rust
- 20:03Async I/O with Tokio
- 23:14Async networking with Tokio
- 25:04Async I/O challenges in Linux
- 26:10io_uring modern async I/O
- 28:37Summary
related talks
06mZero-copy Transfers with io_uring and Rust
16mTokio’s New io_uring-Based File I/O
33mStorage-intensive apps on tokio: when it's time to reach for io_uring
38mLess Tokio is More Tokio: Strategies for Accelerating a Rust Native Search Database
30mWriting High Performance Async IO Apps
32mTechniques for writing concurrent applications with asynchronous I/O
29mAsychronous programming in Rust
50mHigh Performance Network Programming in Rust
