ZFS RaidZ2 vs mdadm Raid6

Im Vorfeld habe ich RaidZ2 gestet. Nun Werden die gleichen Tests mit mdadm durchgeführt. Dazu muss zuerst der Pool Tank gelöscht werden. Dies geht mit zpool destroy tank. Im Anschluss werden die von ZFS angelegten Partitionen gelöscht (bzw. eine neue, leere, gpt Tabelle erstellt):
for i in {a..e}; do parted /dev/sd$i mklabel gpt; done

Das Raid6 wird wie folgt angelegt:
root@debian:~# mdadm --zero-superblock /dev/sda /dev/sdb /dev/sdc /dev/sdd /dev/sde
root@debian:~# mdadm --create md0 --verbose --level=6 --raid-devices=5 /dev/sda /dev/sdb /dev/sdc /dev/sdd /dev/sde
mdadm: layout defaults to left-symmetric
mdadm: layout defaults to left-symmetric
mdadm: chunk size defaults to 512K
mdadm: /dev/sda appears to be part of a raid array:
level=raid0 devices=0 ctime=Thu Jan 1 01:00:00 1970
mdadm: partition table exists on /dev/sda but will be lost or
meaningless after creating array
mdadm: /dev/sdb appears to be part of a raid array:
level=raid0 devices=0 ctime=Thu Jan 1 01:00:00 1970
mdadm: partition table exists on /dev/sdb but will be lost or
meaningless after creating array
mdadm: /dev/sdc appears to be part of a raid array:
level=raid0 devices=0 ctime=Thu Jan 1 01:00:00 1970
mdadm: partition table exists on /dev/sdc but will be lost or
meaningless after creating array
mdadm: /dev/sdd appears to be part of a raid array:
level=raid0 devices=0 ctime=Thu Jan 1 01:00:00 1970
mdadm: partition table exists on /dev/sdd but will be lost or
meaningless after creating array
mdadm: /dev/sde appears to be part of a raid array:
level=raid0 devices=0 ctime=Thu Jan 1 01:00:00 1970
mdadm: partition table exists on /dev/sde but will be lost or
meaningless after creating array
mdadm: size set to 77528576K
Continue creating array? y
mdadm: Defaulting to version 1.2 metadata
mdadm: array /dev/md/md0 started.
root@debian:~#

Der Aufbau des Arrays muss noch gestartet werden:
root@debian:~# mdadm --readwrite /dev/md127
root@debian:~# cat /proc/mdstat
Personalities : [raid6] [raid5] [raid4]
md127 : active raid6 sde[4] sdd[3] sdc[2] sdb[1] sda[0]
232585728 blocks super 1.2 level 6, 512k chunk, algorithm 2 [5/5] [UUUUU]
[>....................] resync = 0.1% (105448/77528576) finish=73.4min speed=17574K/sec

unused devices:
root@debian:~#

Dies kann man noch ein bisschen beschleunigen mit ‘echo 99999999999999 > /proc/sys/dev/raid/speed_limit_min && echo 999999999999999 > /proc/sys/dev/raid/speed_limit_max’ (minimale und maximale sync speed raufsetzen)
In ~70min geht es hier wieder

[~70min später]

So, als nächstes kommt ext4 auf das Softwareraid mit mkfs.ext4 ‘/dev/md127’. Dann folgt der erste Benchmark mit dd:
root@debian:/test# dd if=/dev/zero of=10gb.bin bs=1M count=10000 && dd if=10gb.bin of=/dev/null bs=1M
10000+0 Datensätze ein
10000+0 Datensätze aus
10485760000 Bytes (10 GB) kopiert, 69,1497 s, 152 MB/s
10000+0 Datensätze ein
10000+0 Datensätze aus
10485760000 Bytes (10 GB) kopiert, 41,8779 s, 250 MB/s
root@debian:/test#

Das Ergebnis von bonni++ gibt es hier, iozone3 gibts hier.

This entry was posted in General. Bookmark the permalink.

3 Responses to ZFS RaidZ2 vs mdadm Raid6

  1. Genscher says:

    Also sehe ich das richtig, dass mdadm hier um Meilen in der Performance vorne liegt?

    • Karol says:

      Just got bit by this myself. My opiionn is that it’s not suitable for production systems to automatically do this. At least put a question to the user if they want this turned on.My main database runs on an Areca hardware card that autoscrubs a 16 disk RAID-10 but doesn’t get in the way. I have several replicant slaves that have just a pair of 1TB 7200RPM SATA drives because they are read only and don’t need massive performance on IO. They work just fine. Until the first sunday of the month. I don’t care about bit rot, the data is all reproduceable from the master anytime I need it. I can monitor the drives with smart and replace them as needed easily and cheaply.However, a batch job that takes 6 hours ran for 12 hours last night and every customer I had was bitching about how slow the system was. In general there’s a lot of smart stuff done with mdadm. This is NOT one of them. Scott Marlowe

  2. bastelfreak says:

    Genau, in meinen Tests war mdadm performanter als ZFS. Dies soll sich aber ausgeglichen haben seitdem ZFSonLinux als stable markiert ist. Bin leider noch nicht dazu gekommen die letzte stable Version zu testen da mir gerade Festplatten fehlen.

Leave a Reply to Karol Cancel reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.