arXiv:2610.10137cs.OSOct 2026

Manuscript Offprint

arXiv:2610.10137

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 the amount of work, its processing time, and the time ultimately exposed on the critical path. Our analysis shows that the benefit of host-side optimizations is jointly determined by the actual object granularity, the order in which data becomes ready, and the backend execution model; reducing a local cost or accelerating request submission does not necessarily shorten the complete read. Linux reduces the number of page-cache objects through large folios and overlaps most cold-read copying with device waiting, but these capabilities depend on access advice, folio granularity, cache state, and execution path. Using an experimental kernel prototype, we further validate the remaining opportunities when these mechanisms cease to apply through out-of-order early copying, parallel execution of the remaining copy, and parallel processing of synchronous backends.

In the SSD cold reads we measured, device waiting constitutes the main part of the critical path. To explain this waiting, we abstract first-completion wait F and subsequent completion capacity BCQB_{CQ} from finite request-batch completion timelines. Controlled experiments on a real SSD reveal how these quantities vary with request size and batch size. Internal event tracing and one-factor interventions in MQSim further explain their mechanistic origins and distinguish finite-batch completion capacity from the throughput plateau under sustained supply. To connect the completion model to waiting observed by upper software layers, we construct a cross-layer wait chain along the actual folio-bio-request mapping. It tracks request merging, splitting, and rebatching, as well as how supply contention and serial dependencies reshape upper-layer waiting. In controlled experiments, independently calibrated device parameters predict waiting at the block layer and at read_pages with errors no greater than approximately 6.9% and 3.2%, respectively.

Finally, we apply the device-completion model and wait chain to four classes of software decisions: determining when parallel SSD submission is worthwhile, predicting waiting under Linux readahead windows and the conditions for selecting them, predicting the benefit of merging dependent reads and layout reversals under conditional access, and scheduling polling and sleeping using first-completion wait. These cases cover gains, no gains, and gain reversals, and compare model predictions against the outcomes of actual interventions. Together, they form a closed loop from observation, modeling, and understanding to control. The resulting framework provides a measurable and testable basis for performance decisions in layered I/O stacks and a reusable perspective for analyzing other storage paths jointly governed by host work, request supply, and device completions.

1 Introduction

Modern I/O systems meet application performance demands through an expanding set of interfaces, parameters, and execution mechanisms. On the software side, asynchronous I/O, readahead, cache management at different granularities, and multiqueue submission provide more options for utilizing CPU and storage resources. These mechanisms span database buffer pools and storage engines, application runtimes, the operating-system page cache, filesystems, the block layer, and drivers, and policies at different layers interact with one another [23, 24]. On the hardware side, diverse storage backends; mechanisms inside SSDs, including caches, parallel resources, scheduling, garbage collection, and wear leveling; and designs such as computational storage and processing in memory [28, 31] make externally observable performance harder to predict. The pursuit of performance has driven these designs, while also making the process from expressing a read request to returning its data more complex.

This complexity is not confined to any individual module. Access advice from an application can change how the kernel organizes requests, the granularity of cached objects can affect management costs, and the software submission pace can change the work received by the device. These cross-layer effects make performance bottlenecks difficult to locate and the effects of optimizations difficult to anticipate. In practice, optimization therefore often relies on experience: random access should disable readahead, and greater parallelism can improve throughput. Such judgments are useful under the appropriate conditions, but their effects depend on the workload, resource state, and execution path. Outside those conditions, the same operation may provide no benefit or even degrade performance. The issue is not whether experience is valuable, but that the conditions under which it holds are often left implicit, and an improvement in local behavior does not necessarily translate into a faster end-to-end read.

We use Linux buffered reads as an observation window because they provide transparent caching and data reuse through a concise interface while spanning both host-side work and device-side waiting; the analytical methods developed in this paper are not limited to this interface. We focus on the execution path of synchronous, large-buffer reads in Linux. An application expresses the range of data it needs through simple read-like calls, and the kernel organizes cache accesses, request submission, and data movement. The value of this interface is that the application need not explicitly orchestrate all underlying operations, but hiding execution details does not hide their performance effects. A simple read interface provides uniform functional semantics, but not equally simple or predictable performance behavior. Seemingly reasonable access advice can also introduce unexpected costs by changing internal execution paths.

Random-access advice provides one example. An application may choose read positions randomly within a file while requiring a relatively large, contiguous region of data in each call. This choice is also reflected in commonly used benchmarking tools: in the fio configuration used in our experiments, random-read workloads enable the corresponding random-access advice by default; according to the workload type, fadvise_hint=1 selects POSIX_FADV_RANDOM for random reads [5]. Providing POSIX_FADV_RANDOM is therefore well motivated, yet its performance effect cannot be inferred solely from randomness across calls: each individual read still contains contiguous demand. In a controlled comparison on the same instance, simply disabling fio's random-access advice increased Linux read bandwidth from 734.2 MiB/s to 1413.8 MiB/s, approximately 1.93 times the original bandwidth. This observation shows that choosing parameters based on the name of an access pattern is insufficient: reasonable access advice can also cause unexpected performance loss. The application requested the same data on the same hardware, yet paid a substantial performance penalty for seemingly reasonable advice.

This observation reveals a more general difficulty: hardware capability does not automatically translate into performance obtained by the application. A similar throughput plateau may arise because of host-side work, insufficient request supply, or a device that has already reached its processing plateau, and each cause demands a fundamentally different intervention. As devices become faster and their internal organization more complex, this problem will become even more pronounced: a fixed software path may exploit only a fraction of the available hardware capability, and a hardware upgrade may fail to produce an application-level performance improvement. Our experiments further show that fully utilizing an SSD does not necessarily require asynchronous I/O interfaces with more complex programming models, such as io_uring, more submission threads, or a more powerful machine. In the scenarios we measured, when reads were issued through the synchronous read system call, a single submission executor was already able to supply the device fully. What matters is understanding how work is organized, how requests reach the device, and how device completions translate into application progress.

These seemingly scattered optimization experiences and counterintuitive negative results share a common source and admit a unified explanation. Application performance is not determined by any isolated layer; it is the joint result of host-side work, request supply, device completion behavior, and the overlap among them. Without understanding this process, final metrics such as throughput or latency alone make it difficult both to identify the bottleneck and to select a reliable optimization.

To determine the conditions under which these optimization experiences apply, we need an analytical framework that is measurable and testable. It must explain where a read is slow and distinguish whether an intervention reduces work, increases processing capacity, or overlaps existing work with other stages. We organize our study around three questions: Which costs remain exposed on the read critical path? Which problems have existing Linux mechanisms addressed, and on what conditions do their effects depend? For complex behavior hidden inside devices, can a small number of independently calibratable quantities describe the completion process observed by software and thereby guide optimization choices? We organize these questions into two connected parts: host-side work and device-side waiting.

For host-side work, we begin by decomposing costs across the entire path, analyzing metadata management and data movement, and examining the distinct roles of work volume, overlap, and parallel execution. Existing Linux folio management and readahead mechanisms can reduce or amortize some costs, but their actual effects depend on access advice, object granularity, and execution organization. Linux can also already overlap some I/O with copying, so the entire duration of the copy stage cannot simply be treated as removable serial overhead. Building on these mechanisms, we further examine the effects of preparing user pages in advance, copying cache-hit or already-ready data early, and executing the remaining copying work in parallel. Differences among backend execution paths also bound the effect of parallelism. In paths such as BRD and zram, where the submission context synchronously advances most of the processing, adding executors can distribute actual host-side work, much as parallel copying does. In SSD paths, where the device proceeds asynchronously after submission, parallel submission primarily increases the rate of request supply rather than device processing capacity. In the SSD scenarios we measured, a single executor already supplied the device fully; further parallel submission accelerated request submission but did not improve end-to-end read performance. Our goal is to identify which costs have already been handled effectively, which capabilities require appropriate configuration to realize their benefits, and how much more aggressive work organization can further shorten the critical path.

For device-side waiting, we start from the completion timeline observable by software and organize the processing time of a finite batch into the wait until the first completion, F, and the subsequent completion capability, BCQB_{CQ}. The decomposition obtained from the endpoints of the same batch is itself a definitional relation. We further investigate how these quantities vary with request size, batch size, supply conditions, and access state, and whether, after independent calibration, they can be applied to other read scenarios. Through measurements on real devices and internal simulator events, we analyze how internal service, completion clustering, and startup and draining processes form the completion behavior observed by the host, and distinguish finite-batch endpoint bandwidth from the plateau under sustained supply. We then connect this framework to the block layer, filesystems, and Linux readahead by following actual request mappings. The cross-layer analysis preserves overlap among batches and the order in which data is needed, avoiding the direct summation of device intervals or per-batch waits until first completion as application blocking time.

We evaluate the practical value of these insights through four classes of software decisions: explaining how Linux readahead and concentrated submission change waiting, determining when parallel submission is worthwhile, predicting the benefit of combining dependent reads and the choice of data layout under conditional access probabilities, and using the wait until first completion to schedule polling and sleeping. These cases cover buffered-read and controlled direct-I/O paths and include gains, no gains, and reversals of gains. They span request organization, parallel supply, dependent reads, data layout, and waiting strategies, further demonstrating the framework's applicability across different execution paths and software decisions. By distinguishing independent prediction from post-hoc attribution and comparing model recommendations with the results of actual interventions, we form a closed loop of observation, modeling, understanding, and control within the scope of our study, providing explicit grounds for applying empirical optimizations.

The main contributions of this paper are as follows:

  1. Systematic analysis and key findings on the read path. We analyze host-side work and device-side waiting in Linux reads, distinguishing work volume, processing time, and critical-path exposure. We reveal the connections among access advice, folio granularity, work overlap, and request supply, explaining unexpected costs and the conditions under which local speedups may not improve end-to-end reads.

  2. Host-side optimizations and the limits of parallelism. Through more aggressive work overlap, parallel copying, and synchronous backend processing, we validate opportunities to shorten the host critical path, and use SSD submission comparisons to analyze the benefits and limitations of adding executors.

  3. A calibratable cross-layer model and decision validation. We study completion-time structure by combining device measurements, internal mechanism analysis, and cross-layer prediction, and examine the model's ability to guide configuration, execution organization, data layout, and waiting strategies through four use cases.

We plan to release the measurement tools, experimental configurations, data, and analysis scripts supporting our main findings alongside the paper to enable reproduction and future research.

References (27)