Menu

Only p99 is slow while iostat looks normal: the cause is a cgroup IOPS limit
📰

Only p99 is slow while iostat looks normal: the cause is a cgroup IOPS limit

DEV Community: docker·Kazu·9 days ago
#qfMoKcWq
#devtodocker#devto#dev#reads#limit
Long article (3613 words) — no AI summary yet.
Reading 0:00
15s threshold

In the read times measured by an application, the median stays where it usually is, but only the upper percentiles such as p99 (the value at the 99% position when the times are sorted from fastest to slowest) jump to around 100ms.

iostat -x for the same period shows an r_await (the average wait per read) far below the values that jumped, and a low %util (the fraction of time the disk was processing something).

If you see this combination, suspect a cgroup read limit. A cgroup is the kernel mechanism that groups processes and places limits on their CPU, memory, and I/O. Each systemd service and each Docker container is one cgroup.

I reproduced this combination by placing a limit on a virtual disk, and verified it.

What is happening

How the limit is written

Each cgroup has a file named io.max , where per-disk I/O limits are written.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.