CentOSでbonnie++を使ってHDDのベンチマーク

WindowsだとGUIなソフトで簡単にベンチがとれるけどLinuxではやったことなかったのでやってみた。

bonnie++というものを使うといいらしい

インストール

checkinstall使っていれようと思ったんだけどSPECついてたのでrpmbuildしてRPMつくっていれた。

## ダウンロードして展開してspecとソースを/usr/src/redhat以下にコピーしとく
# cd /usr/local/src
# wget http://www.coker.com.au/bonnie++/bonnie++-1.03e.tgz
# tar xvzf bonnie++-1.03e.tgz
# cd bonnie++-1.03e
# cp bonnie++.spec /usr/src/redhat/SPECS
# cp ../bonnie++-1.03e.tgz /usr/src/redhat/SOURCES


## RPM作る
# cd /usr/src/redhat/SPECS
# rpmbuild -ba bonnie++.spec

## なんかエラーでる
エラー: 旧来の構文はサポートされません: copyright
エラー: 5 行目: 不明なタグ: Copyright: GPL

specファイルの書き方が古いらしいのでちょっと書き換える

--- /usr/local/src/bonnie++-1.03e/bonnie++.spec 2008-12-10 07:19:43.000000000 +0900
+++ /usr/src/redhat/SPECS/bonnie++.spec 2011-05-16 01:44:24.000000000 +0900
@@ -2,7 +2,7 @@
 Name: bonnie++
 Version: 1.03e
 Release: 1
-Copyright: GPL
+License: GPL
 Group: Utilities/Benchmarking
 URL: http://www.coker.com.au/bonnie++
 Source: http://www.coker.com.au/bonnie++/bonnie++-%{version}.tgz

再度実行してみる

# rpmbuild -ba bonnie++.spec

## RPMできてるのでインストール
# cd /usr/src/redhat/RPMS/i386
# rpm -ivh bonnie++-1.03e-1.i386.rpm
準備中...                ########################################### [100%]
1:bonnie++               ########################################### [100%]

できた

やってみたらそんなに遅くはなかった。
>|||
# bonnie++ -u 0:0 -d /tmp
Using uid:0, gid:0.
Writing with putc()...done
Writing intelligently...done
Rewriting...done
Reading with getc()...done
Reading intelligently...done
start 'em...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.03e ------Sequential Output------ --Sequential Input- --Random-
-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
machinename 4G 42986 92 55632 13 22915 5 42690 88 57132 5 189.0 0
------Sequential Create------ --------Random Create--------
-Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
files /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP
16 +++++ +++ +++++ +++ +++++ +++ +++++ +++ +++++ +++ +++++ +++
machinename,4G,42986,92,55632,13,22915,5,42690,88,57132,5,189.0,0,16,+++++,+++,+++++,+++,+++++,+++,+++++,+++,+++++,+++,+++++,+++
|

参考サイト