![]() |
||
Junior Member
![]() ![]() ![]() 加入日期: Jan 2002
文章: 864
|
請教 raid 5/6 的 stripe size
一直以來有一個模糊的概念:
循序讀寫和隨機讀寫的效能,和 raid stripe size 有關。 雖然一般來說不太理這件事,既然常常兩種應用都有,就按照 raid card 的預設值設個中立的 64KB 或 128KB 就好。 但最近想把這件事情搞清楚,發現 google 大神越教越迷糊。 oracle 建議要設大一些: http://www.dba-oracle.com/t_setting...stripe_size.htm toms hardware 測試也是大一些好: http://www.tomshardware.com/reviews...RTS,1735-4.html 網路仁兄 3ware raid card 的測試也是大一些好: http://blog.tinlans.org/2010/04/29/...B8%AC%E8%A9%A6/ areca raid card 的說明符合我長久以來的印象: A larger stripe size produces better read performance, especially if your computer does mostly sequential reads. However, if you are sure that your computer does random reads more often, select a smaller stripe size. (但此建議跟 oracle 不太相符了)。 3ware raid card 的建議和 areca 相反(和 oracle 一樣), 但是上面 3ware card 的實際測試似乎不太支持這樣的說法: The default stripe size of 64KB will give the best performance with applications that have many sequential reads and writes. A larger stripe size will give better performance with applications that have a lot of random reads and writes. In general, the smaller the stripe size, the better the sequential I/O and the worse the ransom I/O. The larger the stripe size, the worse the sequential I/O and the better the random I/O. 關於為何 stripe size 大反而 random I/O 比較好 (和一般人直覺相反),看到常見的解釋如下, with a small stripe size, all disks in an array will contribute to the IO of the same (larger) file, thereby multiplying the sequential bandwidth most of the time. With a large stripe size, disks will be able to service small files separately and independently, thereby increasing the random IOPS of the array. 所以,究竟什麼情境下該把 stripe size 設小呢? 為何各方說明,理論,與實測不太一致.. |
|||||||
![]() |
![]() |
Elite Member
加入日期: May 2002 您的住址: 地球的上面..
文章: 5,854
|
![]() stripe size的設定決定於RAID f/w以及RAID controller的操作機能..
根據大多的實務情況下.. 較大的stripe size對於SEQ I/O有較好的表現.. 當然!..stripe size設定太小可能會對SEQ I/O寫入造成重創... 一個平衡的建議設定大多是在256KB(adaptec or LSI)... but...SSD RAID是另外一回事... for HDD, 64kb stripe size is bad... 不要以為64KB是很最佳設定.. 那其實在實務表現上對SEQ I/O實在是不盡理想... 比方說一個8個PD(HDD)組成一個VD... 結果SS=64KB進行切割8組blocks以差異分布在每顆PD上.. 你一個條帶設定那麼小... 大量的I/O會對IOP提升負擔... 這在SEQ I/O下, 對於Write I/O只會變得比較難看... 美好的stripe writing會是以下這種情況: https://sites.google.com/a/storaid....l-stripe-writes 此文章於 2013-06-06 04:09 PM 被 vxr 編輯. |
||
![]() |
![]() |
Junior Member
![]() ![]() ![]() 加入日期: Jan 2002
文章: 864
|
hi:
感謝您的提示: "stripe size設定太小可能會對SEQ I/O寫入造成重創"。 發現我的觀念漏了一點,那就是 stripe size 再怎樣小,應該不能小於 block io size 。所以理論上 stripe size 應該要小到一個剛剛好的程度,這個時候 SEQ I/O 會有最好的表現(目前都是討論硬碟,還沒辦法想到 SSD 去)。觀察 toms hardware 的 areca 測試數據,的確 raid6 小到 32KB 的 stripe size 時,效能最好,而 raid5 要小到 16KB 時,效能最好。 所以理論上的 "stripe size 越小, SEQ I/O 越好" 應該是沒有錯的。 反之 "stripe size 越大,random I/O 越好" 也是對的, 但同樣不能太大,太大了會有其他的問題,所以 oracle 才建議 stripe size 設為 64KB-1MB。但是若大於 1MB 又會產生其他問題.. 看來設定 stripe size 還真的是學問啊,沒有真正測試,不知道應用的甜蜜點在哪邊。 引用:
此文章於 2013-06-06 10:00 PM 被 tbsky 編輯. |
|
![]() |
![]() |
Elite Member
加入日期: May 2002 您的住址: 地球的上面..
文章: 5,854
|
![]() stripe size愈大...
random I/O會受到影響... 不是愈好... 否則拿顆SSD做RAID把stripe size 開到256KB以上.. 就會知道結果了... 隨機I/O只會更糟糕... "所以理論上的 "stripe size 越小, SEQ I/O 越好" 應該是沒有錯的。" 老兄.. 只會更慘... 我不是講了... 只會增加對IOP的負載... 你愈切愈細... 而且每一次的RAID f/w對stripe size的業務操作不可能百分之百都是美好的full stripe write... 更多的機率分佈在常常發生的read-modify-write操作上.. 特別是那些具備parity機制的RAID model.... 你只會使得SEQ I/O對於write I/O遭受更大的壓力 32KB, 16KB?? 別說笑了.. 只會慘得更離譜... SAS 6Gb/s 1TB x8測R5, SS=64KB, LISAS2108SAS RoC架構.. 我都不敢想像那SEQ I/O的寫入部分會多慘.. 此文章於 2013-06-06 10:24 PM 被 vxr 編輯. |
![]() |
![]() |
Junior Member
![]() ![]() ![]() 加入日期: Jan 2002
文章: 864
|
hi:
請去看看理論說法,然後觀察實測數據吧(至少觀察 toms hardware 測試結果是如此)。我也是覺得疑惑所以才提出來討論。 而且 3ware raid card 的說明書也是這樣說。areca raid card 的說明書相反,但是看 toms hardware areca 的測試結果,應該 3ware 的說明比較正確,才是和大多數主要講解 raid 的網站一樣。 雖然說某個 stripe size 以上,數值差距不大就是了。 另外目前小弟討論的都是硬碟,不是 SSD, 還沒想到 SSD 那邊去... oracle 的 database 應用應該算是 random I/O 吧? 人家建議是 stripe size 大一些好,最好是 1MB。但是不要超過 1MB。 引用:
|
|
![]() |
![]() |
Master Member
![]() ![]() ![]() ![]() 加入日期: Jun 2002
文章: 2,332
|
![]() tbsky兄,雖然RAID卡在下不是專家…
但你看的實測結果都是數年前的東西,光是卡上的架構都跟現在不同;;; 以在下目前公司那幾張新LSI的卡設定和實際使用上來說,是比較接近 vxr大講的情況…即便是oracle 的 database 應用上到快1MB的stripe size 反而效能大降,或許是敝公司使用情況和測試軟體有所差異,不過目前 的情況是這樣了
__________________
Es muss sein! |
![]() |
![]() |
Junior Member
![]() ![]() ![]() 加入日期: Jan 2002
文章: 864
|
hi:
的確有可能如此,所以才令人感覺疑惑不是嗎.. 如果能有最近的實測數據可以看當然更好了,但是關於 不同 stripe size 的測試,目前在網路上找到的就是上面提的那些 link... 而能夠找到的理論說法,也只有那些。若有更新的理論說法配合實測數據來闡明,當然是最好不過了... 另外好奇的是,你們使用 oracle 也是設大的 stripe size 是嗎? 只是現在 1MB 可能已經太大了? 你們是用硬碟還是 SSD 呢? raid 5/6 or raid 10? 感謝協助釐清.. 引用:
此文章於 2013-06-07 02:23 PM 被 tbsky 編輯. |
|
![]() |
![]() |
Amateur Member
![]() 加入日期: Nov 2001 您的住址: 台北市
文章: 40
|
引用:
路過幫一下,關於文章連結中提到Oracle,是使用ASM才需設定為1M, 因為ASM最小單位為AU,AU預設值就是1M,所以才建議將stripe設為1M, 便於管理,如果不用ASM可以不用管,如果連ASM都不知道,就請忘記 stripe設為1M的事 「Oracle ideally suggest that the RAID stripe size at the SAN layer should match ASM stripe size (1MB by default).」 請參考:http://www.hellodb.net/2009/07/oracle_asm.html 其實花點時間翻閱v大的文章,裡面寶物很多,很多講得很清楚, 可以再深入了解一下,到底是哪一層的關係,有時候不同硬體設備, 層級不同,無法相比,其中還包括檔案寫入的關聯性,也要了解一下, data block <-> extent <-> segment <-> data file , 這樣才有助於釐清觀念 在實務上都還是會參考測試過的資訊,在LSI的領域中, 目前看到最完整可靠的測試資訊,都還是都參考v大的 --
__________________
像睡覺和剝橘子一樣簡單的幸福 怎麼會這麼難得到 ... |
|
![]() |
![]() |