Determining If There is an I/O Bottleneck in LVM
sbodily 100000RUAA Visits (5542)
One way to determine if there is an I/O bottleneck in AIX's Logical Volume Manager (LVM) layer is to run the "filemon" command. The filemon output shows I/O response times for both Logical Volume (LV) and Physical Volume (PV) layers. If the difference is over 2-3 ms, there could be an I/O bottleneck in LVM.
If so, check the LVM buffer statistics at peak I/O loads. Run the "vmstat -v" several times, and look for increasing "I/Os blocked" in any of the buffers. (The rate of change is important, not absolute values). Use the "ioo" command to increase constrained LVM buffers. (Consult the documentation or IBM Support for more information)
I wrote a filemon.pl.gz PERL script examines filemon output for differences in LV and PV layers (note you'll have to unzip the file using "gunzip filemon.pl.gz"). Here's a quick example of how to use.
# filemon -T 320000 -o filemon.out; sleep 20; trcstop# filemon.pl filemon.out
The filemon.pl output from a "healthy" system would look like the following. Both Read(ms) and Write(ms) differences are small.
(....skipped lines...)*** LV - PV Differences ***Name Reads Read(ms) Writes Write(ms) Thru
The output from a system with a serious I/O bottleneck would look like the following. The Read(ms) and Write(ms) differences are large.
(...skipped lines....)*** LV - PV Differences ***Name Reads Read(ms) Writes Write(ms) Thru
The difference in I/O response times for reads and writes are 6.0 and 4780.9 ms, respectively.
The number of read/writes to the LV and PV layers can be significantly different. Some of the reasons include insufficient filesystem buffers, inodelocking, queuing, syncd, etc.