Tool Preparation:
iotop: http://guichaz.free.fr/iotop/
pt-ioprofile: http://www.percona.com/downloads/percona-toolkit/2.2.1/
IO High Analysis Method:
1. View disk usage df -lh
2. Install iostat Installation command: yum install sysstat
3. iostat -d -k 2 to view the IO situation:
Which disk has a higher IO load, then let's locate the specific load source
%util: Percent of a second for I/O operations, or how much of a second the I/O queue is non-empty. That is, delta(use)/s/1000 (because the unit of use is milliseconds)
If %util is close to 100%, it means that there are too many I/O requests, the I/O system is fully loaded, and the disk may have a bottleneck.
4. Install the iotop command:
Installation command: yum install iotop iotop Check which thread consumes more IO, press o to display only the processes with disk IO activity.
5. pt-ioprofile locates the load source file
pt-ioprofile --profile-pid=1236 --cell=sizes
The principle of pt-ioprofile is to attach a strace process to a pid for IO analysis.
6. For positioning problems, it is more useful to locate by IO throughput. Use the parameter --cell=sizes, which displays the results in B/s
pt-ioprofile --profile-pid=1236 --cell=sizes
As can be seen from the above figure, the main source of IO load is jetty.
And the pressure is mostly on reading.
Source | https://urlify.cn/JNRVJb
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。