centos7 io过高问题定位

centos7 io过高问题定位

1 挂载iso

2 mkdir /mnt/cdrom

3 mount /dev/cdrom /mnt/cdrom

4 cd /etc/yum.repos.d/

5 vi iso.repo

name=iso
baseurl=file:///mnt/cdrom
gpgcheck=0
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

6 更新本地yum源

yum clean all
yum makecache

7 安装软件

yum install iostat
yum install iotop

8 环境定位

iostat -d -x -k 1 10

rrqm/s:每秒这个设备相关的读取请求有多少被Merge了(当系统调用需要读取数据的时候,VFS将请求发到各个FS,如果FS发现不同的读取请求读取的是相同Block的数据,
FS会将这个请求合并Merge);
wrqm/s:每秒这个设备相关的写入请求有多少被Merge了。
rsec/s:每秒读取的扇区数;
wsec/:每秒写入的扇区数。
rKB/s:The number of read requests that were issued to the device per second;
wKB/s:The number of write requests that were issued to the device per second;
avgrq-sz 平均请求扇区的大小
avgqu-sz 是平均请求队列的长度。毫无疑问,队列长度越短越好。    
await:  每一个IO请求的处理的平均时间(单位是微秒毫秒)。这里可以理解为IO的响应时间,一般地系统IO响应时间应该低于5ms,如果大于10ms就比较大了。

iotop

根据进程号

ll /proc/进程号/exe 找到对应进程

原文地址:https://www.cnblogs.com/fb010001/p/11496379.html