Use bonnie++ to Test system IO speed

來源:互聯網
上載者:User

原文連結:

http://www.eygle.com/unix/Use.Bonnie++.To.Test.IO.speed.htm

 

由於Bonnie存在一些眾所周知的問題,比如>2G的檔案支援.
Russell Coker (russell@coker.com.au) 開發了一套新的代碼,用以支援>2G的檔案等.
得到Tim Bray (tbray@textuality.com)的許可之後,Russell把他的軟體命名為bonnie++,在網上發布,並開始流行起來.

目前的版本已經更新到了1.03a,你可以到以下地址下載:
http://www.coker.com.au/bonnie++/
你也可以點擊這裡下載,這個版本需要編譯,如果你沒有編譯環境,可以點擊這裡下載我編譯好的,適用於SUN Solaris環境(Solaris8測試通過)

Russell Coker的個人首頁是:
http://www.coker.com.au/

Bonnie++ 與 bonnie的區別主要是:
http://www.coker.com.au/bonnie++/diff.html

我簡單介紹一下Bonnie++的編譯及使用:

1.編譯

你需要把以上下載的源碼編譯以後才能使用,如果你沒有編譯環境,可以點擊這裡下載我編譯好的,適用於SUN Solaris環境(Solaris8測試通過)

當然你需要安裝make,及gcc等必要編譯器.在編譯過程中,如果遇到以下錯誤,可能是因為你沒有設定正確的環境變數

$ ./configure
grep: illegal option -- q
Usage: grep -hblcnsviw pattern file . . .
grep: illegal option -- q
Usage: grep -hblcnsviw pattern file . . .
checking for g++... g++
checking for C++ compiler default output... a.out
checking whether the C++ compiler works... configure: error: cannot run C++ compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.

設定環境變數後繼續編譯,一般可以成功.

 

# export LD_LIBRARY_PATH=/usr/lib:/usr/local/lib
# ./configure
grep: illegal option -- q
Usage: grep -hblcnsviw pattern file . . .
grep: illegal option -- q
Usage: grep -hblcnsviw pattern file . . .
checking for g++... g++
checking for C++ compiler default output... a.out
checking whether the C++ compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for a BSD-compatible install... /usr/bin/install -c
checking for an ANSI C-conforming const... yes
checking for egrep... egrep
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... no
checking for unistd.h... yes
checking for size_t... yes
checking vector.h usability... yes
checking vector.h presence... yes
checking for vector.h... yes
checking vector usability... yes
checking vector presence... yes
checking for vector... yes
checking algorithm usability... yes
checking algorithm presence... yes
checking for algorithm... yes
checking algo.h usability... yes
checking algo.h presence... yes
checking for algo.h... yes
checking algo usability... no
checking algo presence... no
checking for algo... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating bonnie.h
config.status: creating port.h
config.status: creating bonnie++.spec
config.status: creating bon_csv2html
config.status: creating bon_csv2txt
config.status: creating sun/pkginfo
config.status: creating conf.h
config.status: conf.h is unchanged

 

編譯完成之後會產生bonnie++,可以用來測試了.

2.下面是一些測試結果

a.T3大檔案讀寫測試

 # ./bonnie++ -d /data1 -u root -s 4096 -m billingUsing uid:0, gid:1.Writing with putc()...doneWriting intelligently...doneRewriting...doneReading with getc()...doneReading intelligently...donestart '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.03 ------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 %CPbilling 4G 9915 87 30319 56 11685 38 9999 99 47326 66 177.6 3 ------Sequential Create------ --------Random Create-------- -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete-- files /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP 16 639 19 +++++ +++ 1258 22 679 16 +++++ +++ 1197 27billing,4G,9915,87,30319,56,11685,38,9999,99,47326,66,177.6,3,16,639,19,+++++,+++,1258,22,679,16,+++++,+++,1197,27

b. EMC CLARiiON CX500 測試資料

這個是在我禁用了寫Cache以後的測試資料:

4塊盤的Raid1+0測試:

 # ./bonnie++ -d /eygle -u root -s 4096 -m jump Using uid:0, gid:1.File size should be double RAM for good results, RAM is 4096M.# ./bonnie++ -d /eygle -u root -s 8192 -m jumpUsing uid:0, gid:1.Writing with putc()...doneWriting intelligently...doneRewriting...doneReading with getc()...doneReading intelligently...donestart '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.03 ------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 %CPjump 8G 12647 36 13414 8 7952 13 33636 97 146503 71 465.7 5 ------Sequential Create------ --------Random Create-------- -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete-- files /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP 16 86 1 +++++ +++ 161 1 81 1 +++++ +++ 163 1jump,8G,12647,36,13414,8,7952,13,33636,97,146503,71,465.7,5,16,86,1,+++++,+++,161,1,81,1,+++++,+++,163,1

4塊盤的Raid5,禁用寫Cache後的速度:

 # ./bonnie++ -d /eygle -u root -s 8192 -m jumpUsing uid:0, gid:1.Writing with putc()...doneWriting intelligently...doneRewriting...doneReading with getc()...doneReading intelligently...donestart '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.03 ------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 %CPjump 8G 10956 30 10771 6 3388 5 34169 98 158861 75 431.1 5 ------Sequential Create------ --------Random Create-------- -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete-- files /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP 16 81 1 +++++ +++ 160 1 82 1 +++++ +++ 109 1jump,8G,10956,30,10771,6,3388,5,34169,98,158861,75,431.1,5,16,81,1,+++++,+++,160,1,82,1,+++++,+++,109,1

對比這兩個結果我們發現(單位K/sec):
 字元寫Block寫字元讀Block讀Raid1012,64713,41433,636146,503Raid510,95610,77134,169158,861Diff1,6912,643-533-12,358
我們看到,在直接讀寫上,寫Raid10會略快於Raid5;而在讀取上,Raid5會略快於Raid10,這符合我們通常的觀點.

這裡需要提一下的是,通常我們建議把RedoLog file存放在Raid10的磁碟上,因其具有寫優勢.


相關文章

Beyond APAC's No.1 Cloud

19.6% IaaS Market Share in Asia Pacific - Gartner IT Service report, 2018

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。