Hey, i have created a raid5 on a NAS with 4 drives(not ssd's), and NetBSD (10.1 stable) is installed on a SSD disk.
The writing of files seems very slow, i have had the same setup with FreeBSD earlier, used a zraid. Unfortunately i did not do a speed test before starting to use netbsd... and i dont have exact numbers, but i do see it being slower... Im farely sure it is some kind of silly user error! But how to find What is the tricky part. Suggestions are welcomed!
I notice big difference if i copy files over the network to the SSD rather than the raid, so it is not the network
It transfers about 1 TB per 24 hours, which is slow. While writing files over the network, i did a write test:
$ dd if=/dev/zero bs=1024k count=1000 of=/mnt/island/test.txt
1000+0 records in
1000+0 records out
1048576000 bytes transferred in 141.066 secs (7433229 bytes/sec)
I have tried enabling cache on the drives aswell as the raid, without any notable difference...
This is basicly how i did:
Installed netbsd on the ssd, default install.
Cleared the drives. repeat 4x:
$ doas dd if=/dev/zero of=/dev/wd0 bs=1024k count=1
Checked size and created fs on the drives. The drives are identical, but wanted to be sure.
$ dmesg | grep wd0
$ doas newfs -O2 -s 7452g -F /dev/rwd0
Destroy, create and add gpt x4
$ doas gpt destroy wd0
$ doas gpt create -Af wd0
$ doas gpt add -t raid -l raid5@wd0 -b $(( 2048 )) -s 15628050000 wd0
Create the raid
$ doas raidctl raid5 create 5 /dev/dk3 /dev/dk4 /dev/dk6 /dev/dk5 (mine was out of order)
$ doas raidctl -I 133773311 raid5
$ doas raidctl -iv raid5
Create a gpt for the raid and a partition
$ doas gpt create -Af raid5
$ doas gpt add -a 1024 -t ffs -l island raid5
Create a fs for the raid, then mount it
$ doas newfs -O2 NAME=island
$ doas mount /dev/dk7 /mnt
And this is my /etc/raid5.conf file
START array
# numRow numCol numSpare
1 4 0
START discs
/dev/dk3
/dev/dk4
/dev/dk6
/dev/dk5
START layout
# sectPerSU SUsPerParityUnit SUsPerReconUnit RAID_level_5
128 1 1 5
START queue
fifo 100
Thanks in advance!