3. 用iozone 来测一下
安装
# tar -xvf iozone3_345.tar
# make linux-AMD64
指定64G的文件,只测read/reread和write/rewrite,记录大小从4k-16k.同时生成一个excel文件iozone.wks
# 。/iozone -Rab iozone.wks -s64G -i 0 -i 1 -y 4k -q 16k
Iozone: Performance Test of File I/O
Version $Revision: 3.345 $
Compiled for 64 bit mode.
Build: linux-AMD64
Contributors:William Norcott, Don Capps, Isom Crawford, Kirby Collins
Al Slater, Scott Rhine, Mike Wisner, Ken Goss
Steve Landherr, Brad Smith, Mark Kelly, Dr. Alain CYR,
Randy Dunlap, Mark Montague, Dan Million, Gavin Brebner,
Jean-Marc Zucconi, Jeff Blomberg, Benny Halevy, Dave Boone,
Erik Habbinga, Kris Strecker, Walter Wong, Joshua Root,
Fabrice Bacchella, Zhenghua Xue, Qin Li.
Run began: Tue Nov 11 10:23:25 2008
Excel chart generation enabled
Auto Mode
File size set to 67108864 KB
Using Minimum Record Size 4 KB
Using Maximum Record Size 16 KB
Command line used: 。/iozone -Rab iozone.wks -s64G -i 0 -i 1 -y 4k -q 16k
Output is in Kbytes/sec
Time Resolution = 0.000001 seconds.
Processor cache size set to 1024 Kbytes.
Processor cache line size set to 32 bytes.
File stride size set to 17 * record size.
random random bkwd record stride
KB reclen write rewrite read reread read write read rewrite read fwrite frewrite fread freread
67108864 4 72882 69470 104898 125512
67108864 8 72083 69256 133689 109061
67108864 16 73375 69155 142019 116034
iozone test complete.
Excel output is below:
“Writer report”
“4” “8” “16”
“67108864” 72882 72083 73375
“Re-writer report”
“4” “8” “16”
“67108864” 69470 69256 69155
“Reader report”
“4” “8” “16”
“67108864” 104898 133689 142019
“Re-Reader report”
“4” “8” “16”
“67108864” 125512 109061 116034
可以看到,8k的写是72M/s左右,读是133M/s左右,跟dd的结果比较接近