iostat -x 1 查看磁盘的IO负载

Linux系统出现了性能问题,一般我们可以通过top.iostat,vmstat等命令来查看初步定位问题。其中iostat可以给我们提供丰富的IO状态数据

$ iostat -x -1

avg-cpu:  %user   %nice %system %iowait  %steal   %idle

10.43    0.00    1.51    1.51    0.00   86.56

Device:rrqm/s  wrqm/s  r/s   w/s  rkB/s  wkB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util

sda 4477.00   9.00  951.00  13.00 24288.00 2492.00 55.56   0.21    0.22    0.21    0.92   0.17  16.00

%user :Show the percentage  of  CPU  utilization  that  occurred while executing at the user level (application).

%nice  :Show  the  percentage  of  CPU  utilization that occurred while executing at the user level with nice priority.

%system:Show the percentage  of  CPU  utilization  that  occurred while executing at the system level (kernel).

%iowait:Show  the  percentage  of  time that the CPU or CPUs were  idle during which the system had an outstanding disk  I/O  request.

%steal :Show  the percentage of time spent in involuntary wait by the virtual CPU or CPUs while the hypervisor was  servicing another virtual processor.

%idle :Show  the  percentage  of  time that the CPU or CPUs were idle and the system did not have an outstanding disk  I/O   request.

rrqm/s:每秒进行merge的读操作数目。即delta(rmerge)/s

wrqm/s:每秒进行merge的写操作数目。即delta(wmerge)/s

r/s:每秒完成的读I/O设备次数。即delta(rio)/s

w/s:每秒完成的写I/0设备次数。即delta(wio)/s

rsec/s:每秒读扇区数。即delta(rsect)/s

wsec/s:每秒写扇区数。即delta(wsect)/s

rKB/s:每秒读K字节数。是rsec/s的一半,因为每扇区大小为512字节

wKB/s:每秒写K字节数。是wsec/s的一半

avgrq-sz:平均每次设备I/O操作的数据大小(扇区)。即delta(rsect+wsect)/delta(rio+wio)

avgqu-sz:平均I/O队列长度。即delta(aveq)/s/1000(因为aveq的单位为毫秒)

await:平均每次设备I/O操作的等待时间(毫秒)。即delta(ruse+wuse)/delta(rio+wio)

svctm:平均每次设备I/O操作的服务时间(毫秒)。即delta(use)/delta(rio+wio)

%util:一秒中有百分之多少的时间用于I/O操作,或者说一秒中有多少时间I/O队列是非空的。即delta(usr)/s/1000(因为use的单位为毫秒)

如果%util接近100%,表明I/O请求太多,I/O系统已经满负荷,磁盘可能存在瓶颈,一般%util大于70%,I/O压力就比较大.

svctm一般要小于await(因为同时等待的请求的等待时间被重复计算了),svctm的大小一般和磁盘性能有关,CPU/内存的负荷也会对其有影响,请求过多也会间接导致svctm的增加。await的大小一般取决于服务时间(svctm)以及I/O队列的长度和I/O请求的发出模式。如果svctm比较接近await,说明I/O几乎没有等待时间;如果await远大于svctm,说明I/O队列太长,应用得到的响应时间变慢,如果响应时间超过了用户可以容许的范围,这时可以考虑更换更快的磁盘,调整内核elevator算法,优化应用,或者升级CPU

队列长度(avcqu-sz)也可作为衡量系统I/O负荷的指标,但由于avcqu-sz是按照单位时间的平均值,所以不能反映瞬间的I/O洪水。

来自 <https://blog.csdn.net/smileteo/article/details/40152271>

Linux 性能检查命令总结的更多相关文章

  1. Linux性能检查命令总结[转]

    一些常用的网络.IO.内存监控指令,Linux性能检查命令总结

  2. 20个常用Linux性能监控工具/命令

    20个常用Linux性能监控工具/命令 对于 Linux/Unix 系统管理员非常有用的并且最常用的20个命令行系统监视工具.这些命令可以在所有版本的 Linux 下使用去监控和查找系统性能的实际原因 ...

  3. Linux性能相关命令

    Linux性能相关命令 目录 Linux性能相关命令 1. 查看硬盘相关信息 2. 查看CPU相关信息 3. 查看内存相关信息 4. 查看进程运行的信息 1. 查看硬盘相关信息 cat /proc/s ...

  4. Linux性能评估命令

    Linux性能评估工具 https://www.cnblogs.com/dianel/p/10085454.html Linux性能评估工具 目录 介绍 负载:uptime 查看内核的信息: dmes ...

  5. Linux性能分析命令工具汇总

    转自:http://rdc.hundsun.com/portal/article/731.html?ref=myread 出于对Linux操作系统的兴趣,以及对底层知识的强烈欲望,因此整理了这篇文章. ...

  6. Linux 性能检查常用命令

    ####消耗CPU最多的进程 [root@Yong ~]# ;|head ##拼接进程号 [root@Yong ~]# |awk '{print $1}' |awk BEGIN{RS=EOF}'{gs ...

  7. linux性能分析命令top

    发布时间: 2013-12-14浏览次数:154分类: 服务器 top是linux最常用的性能分析工具了,它是个交互式工具,提供系统的整体性能,如正在执行的进程信息包括进程ID,内存占用率,CPU占用 ...

  8. linux性能监控命令(vmstat、sar、iostat、netstat)

    1.常用系统命令Vmstat.sar.iostat.netstat.free.ps.top等 2.常用组合方式• 用vmstat.sar.iostat检测是否是CPU瓶颈• 用free.vmstat检 ...

  9. linux 性能分析命令及其解释

    很多时候,我们需要对linux上运行的环境大体有一个了解,那么久需要大体知道当前系统的相关资源的使用情况,那么可以用一些linux提供的丰富的命令来查看 性能分析 vmstat 虚拟内存统计 用法 U ...

随机推荐

  1. Monitor和Lock以及区别

    1.Monitor.Enter(object)方法是获取锁,Monitor.Exit(object)方法是释放锁,这就是Monitor最常用的两个方法,当然在使用过程中为了避免获取锁之后因为异常,致锁 ...

  2. weblogic 10 无密码启动

    首先确定你的domain目录 [c21rms@c21wls10 RMS4]$ pwd/opt/psa/rel/weblogic/RMS4 其次找到下面这个文件夹 servers/AdminServer ...

  3. Supervisor-进程监控自动重启

    Supervisor是一个进程监控程序. 需求一:我现在有一个进程需要每时每刻不断的跑,但是这个进程又有可能由于各种原因有可能中断.当进程中断的时候我希望能自动重新启动它,此时,我就需要使用到了Sup ...

  4. Zepto Code Rush 2014-A. Feed with Candy(HACK)

    A. Feed with Candy time limit per test 2 seconds memory limit per test 256 megabytes input standard ...

  5. Candy [leetcode] O(n)时间复杂度,O(1)空间复杂度的方法

    对于ratings[i+1],和ratings[i]的关系有下面几种: 1. 相等.相等时ratings[i+1]相应的糖果数为1 2.ratings[i + 1] > ratings[i].在 ...

  6. 【LeetCode OJ 232】Implement Queue using Stacks

    题目链接:https://leetcode.com/problems/implement-queue-using-stacks/ 题目:Implement the following operatio ...

  7. cannot find -l****问题的解决的方法

    在ubuntu下编译C或cpp文件时,可能会出现找不到链接库的问题,其形式为: cannot find -l**** 这里的**通常是指的链接库.比方,刚刚装好opencv,依照网上教程一步步编译好了 ...

  8. CentOS-6.5安装配置Tomcat-7

    https://my.oschina.net/u/593517/blog/304483 http://blog.csdn.net/lgh0824/article/details/51194116 摘要 ...

  9. 线性回归(最小二乘法、批量梯度下降法、随机梯度下降法、局部加权线性回归) C++

    We turn next to the task of finding a weight vector w which minimizes the chosen function E(w). Beca ...

  10. PCB 无需解压,直接读取Zip压缩包指定文件 实现方法

    最近有一项需求,将电测试点数后台批量写入到工程系统流程指示中,而电测试文件存在压缩包中,压缩包存在公共网络盘 示例图: 一.采用原始方法(4步完成): 第1步:.网络盘ZIP拷到本地, 第2步:解压Z ...