一直以來有一個模糊的概念:
循序讀寫和隨機讀寫的效能,和 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 設小呢?
為何各方說明,理論,與實測不太一致..