[原]RAID 0 vs RAID 5 超小規(guī)模測試
相信大家對RAID 0 和 RAID 5 都有一定的認(rèn)識,測試數(shù)據(jù)也看到不少了,近日整理舊服務(wù)器的時(shí)候發(fā)現(xiàn)剛好湊出兩臺同一批次的舊HP DL 380 G5服務(wù)器,一臺是3塊硬硬盤 RAID 5,另一臺抽走一塊硬盤剛好是2塊硬盤做RAID 0,RAID卡緩存都是512MB。
CPU一樣,內(nèi)存一樣也是8GB,硬盤也是一樣 72GB 2.5寸 10000 RPM SAS盤。
兩臺機(jī)器的磁盤剛好是RAID 0 和 RAID 5 的最少組成方式,非常巧合,于是做了一下I/O測試。
測試工具使用 bonnie++ 1.03e 。
測試腳本是:
sync; time ./bonnie++ -d /tmp/test -r 256 -s 8192 -n 4096 -u root
以下是測試的輸出,首先是RAID 0的機(jī)器:
[root@test01 bonnie++-1.03e]# sync; time ./bonnie++ -d /tmp/test -r 256 -s 8192 -n 4096 -u root
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
test01 8G 84797 99 215967 42 50581 8 49144 71 158925 11 8104 5
------Sequential Create------ --------Random Create--------
-Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
files /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP
4096 12687 51 383162 99 1564 5 13175 53 447532 99 905 3
test01,8G,84797,99,215967,42,50581,8,49144,71,158925,11,8104.3,5,4096,12687,51,383162,99,1564,5,13175,53,447532,99,905,3
real 142m5.843s
user 3m26.405s
sys 12m29.689s
然后是 RAID 5 的機(jī)器:
[root@test03 bonnie++-1.03e]# sync; time ./bonnie++ -d /tmp/test -r 256 -s 8192 -n 4096 -u root
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
test03 8G 77683 95 89103 19 15012 2 45894 65 168197 9 2478 2
------Sequential Create------ --------Random Create--------
-Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
files /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP
4096 16069 46 460732 99 684 1 16386 46 565151 99 424 1
test03,8G,77683,95,89103,19,15012,2,45894,65,168197,9,2478.3,2,4096,16069,46,460732,99,684,1,16386,46,565151,99,424,1
real 292m39.652s
user 3m28.035s
sys 8m58.005s
從測試時(shí)間來看 RAID 5 機(jī)器完成的時(shí)間要長很多,以下是數(shù)據(jù)的整理并繪制成圖。
CPU占用率其實(shí)都差多,畢竟大部分的工作都是交給 RAID 卡去做的,重點(diǎn)關(guān)注的指標(biāo)還是第一、第三張圖。
第一張圖中的:Sequential Output Block Transmission Speed 和 Sequential Output Rewrite Transmission Speed 這兩項(xiàng)測試 RAID 0 拉開 RAID 5 一大截,可能是得益于 RAID 0 無需做校驗(yàn)的優(yōu)勢,不過這個(gè)優(yōu)勢也太大了吧。
浙公網(wǎng)安備 33010602011771號