More Raspberry RAID tests

2 minute read

Intro

In a previous post I detailed how I set up a simple RAID device on as Raspberry Pi and provided some performance metrics for various three-disk RAID 5 configurations. Below I report the results of similar tests using all 4 of the Pi’s USB ports. I’m sticking with RAID 5 for now, but I might try other levels in the future (especially RAID 10).

The testing methodology is exactly the same as before:

$ dd if=/dev/zero of=tmp bs=XXX count=YYYY conv=fdatasync,notrunc status=progress
$ echo 3 > /proc/sys/vm/drop_caches
$ dd if=tmp of=/dev/null bs=XXX count=YYYY status=progress
$ dd if=tmp of=/dev/null bs=XXX count=YYYY status=progress

Write speed

--chunk size4k64k512k1m4m
block size (bs)     
128k24 MB/s18 MB/s18 MB/s18 MB/s5.9 MB/s
512k13 MB/s8.0 MB/s10 MB/s7.3 MB/s3.6 MB/s
1M15 MB/s8.3 MB/s12 MB/s8.3 MB/s4.5 MB/s

Unbuffered read speed

--chunk size4k64k512k1m4m
block size (bs)     
128k35 MB/s45 MB/s45 MB/s45 MB/s43 MB/s
512k35 MB/s45 MB/s45 MB/s38 MB/s43 MB/s
1M35 MB/s38 MB/s38 MB/s41 MB/s43 MB/s

Buffered read speed

--chunk size4k64k512k1m4m
block size (bs)     
128k580 MB/s560 MB/s570 MB/s560 MB/s570 MB/s
512k530 MB/s550 MB/s550 MB/s550 MB/s550 MB/s
1M35 MB/s45 MB/s38 MB/s40 MB/s42 MB/s

Plots

Write speed as a function of mdadm chunk size. Solid lines are for a 4 disk, level 5 RAID device and dashed lines are for a 3 disk, level 5 device.
Unbuffered read speed as a function of mdadm chunk size. Colors and styles are the same as above.
Buffered read speed as a function of mdadm chunk size. Colors and styles are the same as above.

These results run counter to what we saw in the three disk array. In that case a larger chunk size gave better performance, but here a small, 4k chunk size (the smallest allowed by mdadm) gives clearly better write performace. That said, a 4k chunk resulted in the slowest unbuffered read speeds, which is interesting given that read speeds were mostly constant for all other chunk sizes. Still the increase in write speed (~33% in the worst case) is larger than the dip in read performace (~30%) which makes a 4k chunk the winner in my book.

As further proof of the superiority of a 4k chunk, monerod runs with essentially no problems on a 4 disk level 5 RAID with a 4k chunk. This cannot be said of the other chunk sizes.

Leave a Comment

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

Loading...