I/O-bound process

Also known as: I/O-bound

On this page 7

An I/O-bound process is a process whose progress is limited mainly by the speed of input and output operations, such as disk reads, network transfers or user input, rather than by processor speed. It runs in short CPU bursts separated by long waits, so a faster CPU barely shortens its total run time, while faster storage or networking does.

In operating systems, the distinction between I/O-bound and CPU-bound processes is central to processes and scheduling. Schedulers deliberately favor I/O-bound work so that devices stay busy and interactive programs remain responsive, which improves overall system throughput.

How an I/O-bound process behaves

Every process alternates between a CPU burst, when it executes instructions, and an I/O burst, when it waits for a device. An I/O-bound process has many short CPU bursts and comparatively long I/O waits. When it issues a blocking system call such as a file read, the kernel moves it from the running state to the blocked or waiting state and dispatches another process.

When the device finishes, an interrupt signals completion, the kernel marks the process ready again and places it in the run queue. The process typically runs for only a few microseconds or milliseconds, issues the next request and blocks again. Its CPU utilization stays low, often well under 10 percent, even while it is busy from the user’s point of view.

The table below lists typical latencies that dominate the life of an I/O-bound process. The values are orders of magnitude and vary widely with hardware and load.

OperationTypical latencyRelative to one CPU cycle
CPU instructionUnder 1 nanosecondAbout 1 cycle
Main memory accessAbout 100 nanosecondsHundreds of cycles
NVMe SSD readTens of microsecondsTens of thousands of cycles
Hard disk seekSeveral millisecondsMillions of cycles
Network round trip across a continentTens of millisecondsTens of millions of cycles
Human keystrokeHundreds of millisecondsHundreds of millions of cycles
Typical operation latencies compared with CPU work

I/O-bound and CPU-bound processes compared

The two classes differ in which resource sets the pace. A CPU-bound process, such as video encoding, keeps the processor busy for long bursts and rarely waits. An I/O-bound process, such as a web server handling many slow clients, spends most of its life blocked. Real programs often change class between phases, for example a compiler that reads files and then optimizes code.

CharacteristicI/O-bound processCPU-bound process
CPU burst lengthShort, often below the time sliceLong, often uses the full time slice
Main bottleneckDisk, network or userProcessor speed and cores
Typical stateMostly blocked or waitingMostly running or ready
Benefit from faster CPUSmallLarge
Benefit from faster storage or networkLargeSmall
Scheduler treatmentUsually boosted priorityUsually lowered priority
ExamplesDatabase queries, file copying, chat clientsRendering, compression, scientific simulation
Characteristics of the two process classes

A simple test identifies the class: if CPU utilization of the process is low while it still takes long to finish, and tools show high device wait time, the process is I/O-bound.

Why schedulers favor I/O-bound work

Schedulers favor I/O-bound processes because running them first keeps devices busy at almost no CPU cost. If such a process gets the CPU promptly, it issues its next request quickly, and the disk or network works in parallel with the CPU-bound processes that run afterward. This overlap raises total system throughput.

Without this preference, the convoy effect appears: under first-come, first-served scheduling, many I/O-bound processes queue behind one long CPU-bound job, devices sit idle and responsiveness collapses. Different scheduling designs address the problem in different ways.

PolicyTreatment of I/O-bound workEffect
First-come, first-servedNo special treatmentConvoy effect and poor responsiveness
Round-robin schedulingEqual time slices for allFair, but short bursts waste part of each slice
Shortest job firstShort bursts run firstGood throughput, needs burst prediction
Multilevel feedback queueProcesses that block early stay in high-priority queuesAutomatic boost for interactive tasks
Linux CFS and EEVDFSleeping tasks accumulate less runtimeWoken tasks are scheduled quickly
How common scheduling policies treat I/O-bound processes

The multilevel feedback queue illustrates the principle well. A process that gives up the CPU before its time slice expires is assumed to be I/O-bound and keeps a high priority, while one that consumes full slices is demoted. Windows applies a related idea with priority boosts after an I/O wait completes.

Designing efficient I/O-bound programs

Because an I/O-bound process waits most of the time, the main design goal is to overlap waiting with useful work. Adding CPU cores alone rarely helps. Effective techniques let a program keep many operations in flight at once, which hides latency instead of trying to eliminate it.

TechniqueHow it helpsTrade-off
Asynchronous I/OIssues requests without blocking the threadMore complex control flow
Event loopsOne thread serves thousands of connectionsA long computation blocks all clients
Thread poolsBlocked threads do not stall othersMemory and context switch overhead
CachingAvoids repeated slow readsStale data and memory use
Batching and bufferingFewer, larger operationsHigher latency for single items
Faster devicesReduces each wait directlyHardware cost
Techniques for improving I/O-bound workloads

Interfaces such as epoll on Linux, kqueue on BSD and macOS, I/O completion ports on Windows and the newer io_uring exist precisely to let I/O-bound programs manage large numbers of outstanding requests with few threads.

Common misconceptions and measurement pitfalls

Classifying a process requires measurement rather than intuition, because several misleading signals are common in practice.

  • Low CPU usage is not always I/O-bound: a process may be waiting on a lock, which is contention rather than device I/O.
  • High iowait does not prove a disk problem: it only means the CPU was idle while I/O was outstanding.
  • Memory-bound code looks CPU-bound: cache misses show up as CPU time, not as I/O wait.
  • Classification can change: moving data to an SSD or into a cache can turn an I/O-bound job into a CPU-bound one.

Tools such as iostat, vmstat, pidstat and Windows Resource Monitor show per-device wait times and queue lengths, which together with per-process CPU time give a reliable classification.

A plain-language summary

Some programs think hard. Others mostly wait. An I/O-bound process is one that mostly waits. It waits for a file, a network reply or a person to type.

Picture a cook who keeps waiting for deliveries. A faster cook would not help much. Faster deliveries would. The computer knows this, so it lets the waiting programs go first when their delivery arrives. They do their quick job and step aside. That keeps everything feeling fast and responsive.

An example from practice

A small company runs a web application on a server with eight CPU cores. During peak hours, pages load slowly, and the team first plans to buy a server with more cores. Monitoring shows something different: the application processes use only about 15 percent of the CPU, while each request waits roughly 80 milliseconds for database queries on a shared hard disk array.

The application is clearly I/O-bound. The team moves the database to NVMe storage and adds a cache for frequent queries. Average database wait falls to a few milliseconds, and page response times drop by more than half without any change to the CPU. Only after this change does the processor become the next limiting resource.