Course contentsShow
← Linux
Lesson 751 of 1,8197. Storage Management and Logical VolumesFree lesson

I/O request queue monitoring

Interpret queue depth and wait times to identify storage saturation points.

Understanding Storage Saturation via I/O Queues

In this lesson, you will learn how to interpret queue depth and wait times to identify when your storage hardware has reached its performance limit.

When a Linux application requests data from a disk, that request doesn't always hit the hardware instantly. Instead, it enters an I/O request queue. Think of this like a checkout line at a grocery store: the "queue depth" is the number of people waiting, and the "wait time" is how long each person spends standing in that line.

Monitoring with iostat

To see this in action, we typically use the iostat command. When you run iostat -x 1, look for two critical columns: avgqu-sz (average queue size) and await (average wait time in milliseconds).

  • avgqu-sz: This is the number of requests waiting to be processed. If this number is consistently high (often greater than 1 or 2, depending on your hardware), your storage is becoming a bottleneck. It means the disk cannot keep up with the incoming demand, and requests are "piling up."
  • await: This represents the total time a request spends in the queue plus the time it takes to actually complete the operation. If await climbs significantly higher than your typical disk latency (e.g., jumping from 2ms to 50ms), your system is officially saturated.

Identifying Saturation

Saturation occurs when the storage device is processing at 100% capacity and can no longer accept new requests without making them wait. If you notice a high avgqu-sz combined with a ballooning await time, your disk is struggling.

Here is a simplified view of what you might see during a period of saturation:

Device            r/s     w/s     avgqu-sz    await    %util
sda            150.00   80.00       8.50     45.20     99.8%

In this example, the high avgqu-sz (8.50) and high await (45.20ms) indicate that the queue is backed up and the device is saturated. Your storage is not just busy; it is actively slowing down every application that needs to read or write data.

Key Takeaway: When average queue depth and request wait times consistently climb, your storage hardware has reached its saturation point and can no longer process requests in a timely manner.