我开始创build了16个10亿字节的空文件:
for i in {1..16}; do dd if=/dev/zero of=/mnt/temp/block$i bs=1000000 count=1000 &> /dev/null; done
然后我创build了越来越大的RAIDZ2卷,迫使ashift = 12模拟4K扇区驱动器,例如
zpool create tank raidz2 -o ashift=12 /mnt/temp/block1 /mnt/temp/block2...
然后使用df -B1
进行比较来查看实际大小。
Filesystem 1B-blocks tank 12787777536
我的结果:
+-------+-------------+-------------+------------+------------+ | disks | expected | actual | overhead | efficiency | +-------+-------------+-------------+------------+------------+ | 3 | 1000000000 | 951975936 | 48024064 | 95.2 | | 4 | 2000000000 | 1883766784 | 116233216 | 94.2 | | 5 | 3000000000 | 2892234752 | 107765248 | 96.4 | | 6 | 4000000000 | 3892969472 | 107030528 | 97.3 | | 7 | 5000000000 | 4530896896 | 469103104 | 90.6 | | 8 | 6000000000 | 5541068800 | 458931200 | 92.4 | | 9 | 7000000000 | 6691618816 | 308381184 | 95.6 | | 10 | 8000000000 | 7446331392 | 553668608 | 93.1 | | 11 | 9000000000 | 8201175040 | 798824960 | 91.1 | | 12 | 10000000000 | 8905555968 | 1094444032 | 89.1 | | 13 | 11000000000 | 10403577856 | 596422144 | 94.6 | | 14 | 12000000000 | 11162222592 | 837777408 | 93.0 | | 15 | 13000000000 | 12029263872 | 970736128 | 92.5 | | 16 | 14000000000 | 12787908608 | 1212091392 | 91.3 | +-------+-------------+-------------+------------+------------+
作为图表:
glib的答案,因为RAIDZ(2)吸4K驱动器。
这与平价计算有关,尤其是在较小文件的情况下。 如果您想查看一些真正的低效率,请尝试对50MB以下的文件进行相同的testing。