linux下测试磁盘的读写IO速度(IO物理测速)

1:使用hdparm命令
这是一个是用来获取ATA/IDE硬盘的参数的命令,是由早期Linux IDE驱动的开发和维护人员 Mark Lord开发编写的( hdparm has been written by Mark Lord <mlord@pobox.com>, the primary developer and maintainer of the (E)IDE driver for Linux, with suggestions from many netfolk).该命令应该也是仅用于Linux系统,对于UNIX系统,ATA/IDE硬盘用的可能比较少,一般大型的系统都是使用磁盘阵列的.

使用方法很简单
# hdparm -Tt /dev/sda

/dev/sda:
Timing cached reads: 6676 MB in 2.00 seconds = 3340.18 MB/sec
Timing buffered disk reads: 218 MB in 3.11 seconds = 70.11 MB/sec
可以看到,2秒钟读取了6676MB的缓存,约合3340.18 MB/sec;
在3.11秒中读取了218MB磁盘(物理读),读取速度约合70.11 MB/sec

 

0 Comments
Leave a Reply