zpool raidz vdev how many under block dev choose for optimal performance (Best Practices and Caveats)

less than 1 minute read

背景

在创建raidz的vdev时, 到底多少个设备合适呢?下面是zfs best practices给出的答案.

推荐使用2^n+z的个数.

z指校验数据的份数, 即允许坏多少块盘.

例如

raidz1, 那么使用的底层块设备个数3, 5, 9, 17等. 建议基数不超过16(除非你的CPU特别强悍).  
raidz2, 那么使用的底层块设备个数4, 6, 10, 18等. 建议基数不超过16(除非你的CPU特别强悍).  
raidz3, 那么使用的底层块设备个数5, 7, 11, 19等. 建议基数不超过16(除非你的CPU特别强悍).  
For the number of disks in the storage pool, use the "power of two plus parity" recommendation.   
  
This is for storage space efficiency and hitting the "sweet spot" in performance.   
  
So, for a RAIDZ-1 VDEV, use three (2+1), five (4+1), or nine (8+1) disks.   
  
For a RAIDZ-2 VDEV, use four (2+2), six (4+2), ten (8+2), or eighteen (16+2) disks.   
  
For a RAIDZ-3 VDEV, use five (2+3), seven (4+3), eleven (8+3), or nineteen (16+3) disks.   
  
For pools larger than this, consider striping across mirrored VDEVs.  

参考

1. https://pthree.org/2012/12/13/zfs-administration-part-viii-zpool-best-practices-and-caveats/

Flag Counter

digoal’s 大量PostgreSQL文章入口