In this lesson, you will learn how to use essential diagnostic tools to isolate performance bottlenecks within complex, multi-disk software RAID topographies.
When a multi-disk array performs poorly, the bottleneck is rarely the RAID layer itself; it is usually hidden in the physical interaction between the kernel, the block device queue, or a failing underlying disk. To profile this, we must move beyond simple throughput tests and look at per-device latency and request merging.
Analyzing Disk I/O with iostat
The iostat utility is your primary diagnostic tool. When analyzing RAID, you must look at both the logical array (e.g., /dev/md0) and the constituent physical drives (e.g., /dev/sda, /dev/sdb).
Run the following command to see real-time statistics:
iostat -dx 1
Pay close attention to these columns:
await: The average time (in milliseconds) for I/O requests to be served. If the RAID device has a highawaitbut the physical disks don't, the bottleneck is in the RAID controller/driver settings. If a specific physical disk has a highawait, that disk is failing or saturated.%util: This indicates the percentage of time the device spent processing requests. If this reaches 100% on a single disk in your array while others are idle, you have identified an unbalanced workload or a "slow" disk slowing down the entire array (a classic "straggler" problem).
Detecting Request Queuing
Bottlenecks often occur when the OS submits more requests than the hardware can handle. You can observe this by checking the avgqu-sz (average queue size) in the same iostat output. If this number is consistently high, your array is experiencing "I/O starvation," suggesting your RAID rebuild priority or readahead settings are misconfigured for your current storage workload.
By comparing the wMB/s and rMB/s of the individual disks against the aggregate speed of the md device, you can quickly determine if the bottleneck is caused by a specific physical drive failing to keep up with the parity calculations or read demands of the array.
Key Takeaway: Use iostat -dx to compare the await and %util of individual physical disks against the logical RAID device to pinpoint whether a bottleneck is a drive failure, a queue saturation issue, or a configuration mismatch.