CentOSでベンチマークツールを試してみる(IO系)
VirtualBoxにCentOSをとりあえずインストール
の続き
事前準備
まずは、必要なツールをインストールしておく。
# yum -y install wget gcc
あと、RPMForgeのリポジトリを有効にしておく。
# rpm -ivh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm # vi /etc/yum.repos.d/rpmforge.repo enable=0 ↓ enable=1
hdparm
インストールする。
# yum -y install hdparm
実行すると、
# hdparm -t /dev/sda
結果が表示される。
/dev/sda: Timing buffered disk reads: 888 MB in 3.00 seconds = 295.78 MB/sec
bonnie++
インストールする。
# yum -y install bonnie++ --enablerepo=rpmforge
実行すると、
# bonnie++ -d /tmp -u root
結果が表示される。
Writing a byte at a time...done Writing intelligently...done Rewriting...done Reading a byte at a time...done Reading intelligently...done start 'em...done...done...done...done...done... Create files in sequential order...done. Stat files in sequential order...done. Delete files in sequential order...done. Create files in random order...done. Stat files in random order...done. Delete files in random order...done. Version 1.96 ------Sequential Output------ --Sequential Input- --Random- Concurrency 1 -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks-- Machine Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec %CP localhost.locald 4G 648 99 113015 17 72369 16 3301 95 216657 22 7193 256 Latency 46310us 180ms 157ms 34626us 33064us 72106us Version 1.96 ------Sequential Create------ --------Random Create-------- localhost.localdoma -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete-- files /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP 16 +++++ +++ +++++ +++ +++++ +++ +++++ +++ +++++ +++ +++++ +++ Latency 2361us 947us 841us 7715us 330us 804us 1.96,1.96,localhost.localdomain,1,1399668939,4G,,648,99,113015,17,72369,16,3301,95,216657,22,7193,256,16,,,,,+++++,+++,+++++,+++,+++++,+++,+++++,+++,+++++,+++,+++++,+++,46310us,180ms,157ms,34626us,33064us,72106us,2361us,947us,841us,7715us,330us,804us
fio
インストールする。
# yum -y install fio --enablerepo=rpmforge
適当に設定ファイルを書いて、実行すると、
# vi sample.fio [random-read] rw=randread size=100m directory=/tmp/
# fio sample.fio
結果が表示される。
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): [r] [100.0% done] [6721KB/0KB/0KB /s] [1680/0/0 iops] [eta 00m:00s] random-read: (groupid=0, jobs=1): err= 0: pid=2027: Sat May 10 06:52:24 2014 read : io=102400KB, bw=6857.4KB/s, iops=1714, runt= 14933msec clat (usec): min=90, max=41855, avg=574.46, stdev=603.27 lat (usec): min=91, max=41856, avg=574.98, stdev=603.30 clat percentiles (usec): | 1.00th=[ 366], 5.00th=[ 402], 10.00th=[ 414], 20.00th=[ 438], | 30.00th=[ 462], 40.00th=[ 502], 50.00th=[ 564], 60.00th=[ 596], | 70.00th=[ 612], 80.00th=[ 636], 90.00th=[ 684], 95.00th=[ 748], | 99.00th=[ 1160], 99.50th=[ 1416], 99.90th=[ 4768], 99.95th=[13120], | 99.99th=[29568] bw (KB /s): min= 6048, max= 8720, per=99.88%, avg=6849.10, stdev=836.98 lat (usec) : 100=0.01%, 250=0.10%, 500=39.48%, 750=55.42%, 1000=3.60% lat (msec) : 2=1.20%, 4=0.10%, 10=0.03%, 20=0.05%, 50=0.03% cpu : usr=1.12%, sys=11.27%, ctx=25705, majf=0, minf=28 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=6857KB/s, minb=6857KB/s, maxb=6857KB/s, mint=14933msec, maxt=14933msec Disk stats (read/write): dm-0: ios=25580/6, merge=0/0, ticks=11039/1, in_queue=11040, util=73.59%, aggrios=25600/5, aggrmerge=0/2, aggrticks=11058/1, aggrin_queue=11056, aggrutil=73.59% sda: ios=25600/5, merge=0/2, ticks=11058/1, in_queue=11056, util=73.59%
ioping
ダウンロードして、インストールする。
# wget http://ioping.googlecode.com/files/ioping-0.6.tar.gz # tar zxvf ioping-0.6.tar.gz # cd ioping-0.6 # make # make install
実行すると
# ioping -c 10 /home/hoge
結果が表示される。
4096 bytes from /home/hoge (ext4 /dev/mapper/VolGroup-lv_home): request=1 time=2.0 ms 4096 bytes from /home/hoge (ext4 /dev/mapper/VolGroup-lv_home): request=2 time=0.3 ms 4096 bytes from /home/hoge (ext4 /dev/mapper/VolGroup-lv_home): request=3 time=0.5 ms 4096 bytes from /home/hoge (ext4 /dev/mapper/VolGroup-lv_home): request=4 time=0.4 ms 4096 bytes from /home/hoge (ext4 /dev/mapper/VolGroup-lv_home): request=5 time=0.4 ms 4096 bytes from /home/hoge (ext4 /dev/mapper/VolGroup-lv_home): request=6 time=0.3 ms 4096 bytes from /home/hoge (ext4 /dev/mapper/VolGroup-lv_home): request=7 time=0.3 ms 4096 bytes from /home/hoge (ext4 /dev/mapper/VolGroup-lv_home): request=8 time=0.4 ms 4096 bytes from /home/hoge (ext4 /dev/mapper/VolGroup-lv_home): request=9 time=0.3 ms 4096 bytes from /home/hoge (ext4 /dev/mapper/VolGroup-lv_home): request=10 time=0.4 ms --- /home/hoge (ext4 /dev/mapper/VolGroup-lv_home) ioping statistics --- 10 requests completed in 9010.4 ms, 1872 iops, 7.3 mb/s min/avg/max/mdev = 0.3/0.5/2.0/0.5 ms