fio
ディスク I/O を計測するコマンド
インストール
# yum install libaio-devel libibverbs # wget -P /usr/local/src/ http://pkgs.repoforge.org/fio/fio-2.1.7-1.el6.rf.x86_64.rpm # rpm -Uvh /usr/local/src/fio-2.1.7-1.el6.rf.x86_64.rpm # rpm -qa | grep fio fio-2.1.7-1.el6.rf.x86_64
CPU クロックパフォーマンステスト
# fio --cpuclock-test cs: reliable_tsc: no time 12636 cycles[0]=2600 time 12636 cycles[1]=2599 time 12636 cycles[2]=2599 time 12636 cycles[3]=2599 time 12636 cycles[4]=2599 time 12636 cycles[5]=2599 time 12636 cycles[6]=2599 time 12636 cycles[7]=2599 time 12636 cycles[8]=2599 time 12636 cycles[9]=2598 time 12636 cycles[10]=2599 (中略) time 12724 avg: 2600 time 12724 mean=2599.220000, S=0.668632 time 12724 inv_cycles_per_usec=6452 cs: Testing 3 CPUs cs: cpu 0: 62811301 clocks seen cs: cpu 1: 63239106 clocks seen cs: cpu 2: 54690194 clocks seen cs: Pass!
ビルドインチェックサムコマンドスピードテスト
# fio --crctest md5: 488.82 MB/sec crc64: 371.67 MB/sec crc32: 311.05 MB/sec crc32c: 8045.76 MB/sec crc16: 339.03 MB/sec crc7: 331.25 MB/sec sha1: 366.12 MB/sec sha256: 144.87 MB/sec sha512: 208.34 MB/sec xxhash: 4687.01 MB/sec
/tmp/fio/ に、100 M のファイルを転送させる。
設定ファイル
# cat random-read [random-read] rw=randread size=100m directory=/tmp/fio/
計測
# fio random-read random-read: (g=0): rw=randread, bs=4K-4K/4K-4K/4K-4K, ioengine=sync, iodepth=1 fio-2.1.7 Starting 1 process Jobs: 1 (f=1) random-read: (groupid=0, jobs=1): err= 0: pid=13079: Sun Aug 10 05:44:09 2014 read : io=102400KB, bw=67280KB/s, iops=16819, runt= 1522msec clat (usec): min=46, max=312, avg=56.07, stdev= 9.24 lat (usec): min=46, max=312, avg=56.43, stdev= 9.25 clat percentiles (usec): | 1.00th=[ 50], 5.00th=[ 51], 10.00th=[ 52], 20.00th=[ 53], | 30.00th=[ 54], 40.00th=[ 54], 50.00th=[ 54], 60.00th=[ 55], | 70.00th=[ 55], 80.00th=[ 56], 90.00th=[ 59], 95.00th=[ 64], | 99.00th=[ 90], 99.50th=[ 121], 99.90th=[ 155], 99.95th=[ 197], | 99.99th=[ 278] bw (KB /s): min=67136, max=67464, per=100.00%, avg=67282.67, stdev=166.73 lat (usec) : 50=0.98%, 100=98.32%, 250=0.69%, 500=0.01% cpu : usr=5.19%, sys=30.64%, ctx=25604, majf=0, minf=27 IO depths : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0% submit : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0% complete : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0% issued : total=r=25600/w=0/d=0, short=r=0/w=0/d=0 latency : target=0, window=0, percentile=100.00%, depth=1 Run status group 0 (all jobs): READ: io=102400KB, aggrb=67279KB/s, minb=67279KB/s, maxb=67279KB/s, mint=1522msec, maxt=1522msec Disk stats (read/write): vda: ios=23462/0, merge=0/0, ticks=809/0, in_queue=794, util=53.15%