IO
写道
Disk latency is around 13ms, but it depends on the quality and rotational speed of the hard drive. RAM latency is around 83 nanoseconds.
性能指标
- IOPS (input/output operations per-second)
- iowait
写道
If your I/O wait percentage is greater than (1/# of CPU cores) then your CPUs are waiting a significant amount of time for the disk subsystem to catch up.
In the output above, I/O wait is 12.1%. This server has 8 cores (via cat /proc/cpuinfo). This is very close to (1/8 cores = 0.125).
In the output above, I/O wait is 12.1%. This server has 8 cores (via cat /proc/cpuinfo). This is very close to (1/8 cores = 0.125).
iops的计算公式
I/O Operations Per-Sec = | number of disks * Average I/O Operations on 1 disk per-sec |
% of read workload + (Raid Factor * % of write workload) |
iops和磁盘的 rotational speed关系很大
Rotational Speed (rpm) | IOPS |
5400 | 50-80 |
7200 | 75-100 |
10k | 125-150 |
15k | 175-210 |
相关命令:
sar
- sar -d -p will report activity for each block device and pretty print the device name.
lsof
参考
http://blog.scoutapp.com/articles/2011/02/10/understanding-disk-i-o-when-should-you-be-worried
http://www.cmdln.org/2010/04/22/analyzing-io-performance-in-linux/
http://www.performancewiki.com/diskio-tuning.html
http://www.moeding.net/archives/2-The-problem-with-wait-IO.html
Others:
http://blog.scoutapp.com/articles/2009/07/31/understanding-load-averages
http://mirrors.psu.ac.th/pub/bash-howto/shell-tutorial.pdf