Behind a Simple Read: Understanding Work and Waiting in the Linux I/O Stack
Yang Shen, Kai Lu, Min Xie, Huijun Wu, Zhenwei Wu, Wenzhe Zhang
Abstract
A simple read interface provides uniform functional semantics, but not equally simple or predictable performance behavior. We use synchronous large-buffer reads in Linux as an observation window and decompose the buffered-read path end to end, distinguishing work volume, processing time, and critical-path exposure. We find that Linux reduces metadata work through large folios and overlaps most cold-read copying with device waiting, but these mechanisms depend on access advice, folio granularity, cache state, and backend execution. Using an experimental kernel prototype, we validate additional opportunities from out-of-order early copying and opportunistic parallelism, while showing that faster request submission does not improve end-to-end performance when SSD supply is already sufficient. To explain device waiting, we abstract first-completion wait F and subsequent completion capacity BCQ from finite request-batch completion timelines. Measurements on a real SSD characterize how they vary with request size and batch size, while MQSim experiments connect them to internal device mechanisms and distinguish finite-batch completion from sustained throughput. We then construct a cross-layer wait chain along the actual folio--bio--request mapping. Independently calibrated device parameters predict waiting at the block layer and at readpages with errors no greater than approximately 6.9% and 3.2%, respectively. Finally, four use cases apply the model and wait chain to parallel submission, Linux readahead, dependent-read layout, and polling versus sleeping. Their gains, no gains, and gain reversals form a closed loop from observation and modeling to explanation and control, providing a measurable basis for performance decisions in layered I/O stacks.
Create a lesson
Related papers
Ember: Making Unified Virtual Memory Practical for Discrete-Memory GPUs
Senad-Leandro Lemes Galera, Michail Georgoulakis Misegiannis, Ferdinand Gruber et al.
Characterizing CPU-GPU Memory Sharing over Unified Memory Architecture
Jinrong Yang, Zimeng Wang, Rong Chen et al.
PredictIO: Decoupling Workload Prediction from OS-Controlled Storage Prefetching
Jun Lu, Yancan Mao, Zhenya Ma et al.
Mole: Tier-Specific Hotness Profiling Driven Memory Tiering for Multi-Tiered Memory Systems
Mingyang Liu, Congming Gao, Xufeng Yang et al.
No More Translation at Runtime: LLM-Empowered Static Binary Translation
Zhibo Liu, Huaijin Wang, Wai Kin Wong et al.
RetainZ: Reclaim-Time-Aware Placement for AI Checkpoints on Zoned SSDs
Minxing Chu, Ruoxi Yang