Calculate average disk queue length from IOPS and service time using queuing theory.
Disk queue length grows non-linearly with utilization: the M/M/1 queuing approximation L = ρ/(1−ρ) (ρ = utilization fraction) shows that queue length is small at low utilization but rises sharply as utilization approaches 100% — going from 80% to 95% utilization roughly triples average queue length. Alternatively, Little's Law (L = λ × W) computes average items in the system directly from arrival rate (IOPS) and average time each request spends in the system, without assuming a specific queuing model.
Utilization-based queue length (M/M/1)
avg_queue = utilization / (1 − utilization)
Little's Law
L = λ × W
Because L = ρ/(1-ρ) has a vertical asymptote as ρ approaches 1 — at 50% utilization L=1, at 90% L=9, and at 99% L=99. This is why disk subsystems that look 'fine' at moderate load can suddenly show severe latency once utilization crosses roughly 80-85%, and why %util is a leading indicator of trouble, not just a usage statistic.
`iostat -x 1` reports avgqu-sz (or aqu-sz on newer versions) directly as the average queue length, alongside %util, r/s, w/s and await — comparing avgqu-sz against this calculator's estimate is a good sanity check on whether your system matches simple queuing theory assumptions.
It's a useful approximation, not an exact model — real disk I/O has variable service times, multiple concurrent queues (per-CPU or per-NVMe-queue), and request merging/reordering that M/M/1 doesn't capture. Treat the result as a directional estimate of how queue length scales with load, not a precise prediction.