LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   raid5 with ext4: values for parameters when formatting the raid (https://www.linuxquestions.org/questions/linux-software-2/raid5-with-ext4-values-for-parameters-when-formatting-the-raid-849990/)

crts 12-13-2010 03:26 PM

raid5 with ext4: values for parameters when formatting the raid
 
Hi,

recently I started experimenting with raid5. I raided 3 partitions into a raid5 (software) array. Chunk size is 128kB.
After that I formatted /dev/md0 with ext4. I chose the following parameters for that:
Code:

blocksize: 4096
stride:    32
stripe-width: 64 (2 * stride)

To test the write speed I issued the following command:
Code:

dd if=/dev/zero of=/mnt/raid5/zero-file bs=100M count=10
I get a writing speed of 40 MB/sec. When I issue the command on an unraided target I get write speed up to 65 MB/sec.
After reading this wikipedia article about raid5 I did not expect that the speed might drop under 'normal' rate. I know that there can be penalties if databases are involved or for a lot of random writes, especially if the write size is smaller then the chunk size. But I don't think that the command I issued qualifies for this scenario.
Before I continue experimenting with raid5 I would like some confirmation that I got the basic setup ok.

Q: Did I choose the parameters for formatting right? If my understanding is correct then the following equations should be fulfilled when formatting a raid5:
stride * blocksize = chunk-size
stripe-width = (n-1) * stride # n being the total number of active disks that comprise the array

PS:
All partitions of the raid5 reside on separate, identical disks. The unraided partition that I used as reference resides on one of the disks that contains a partition which is part of the array. So it is not a 'different manufacturer' issue.

crts 12-19-2010 08:21 AM

So, after some further reading it appears that the options for mke2kfs are ok. Apparently the reduced write-speed is normal with a raid5 array. So it is not my (weird) experimental setup. The reason for this is that before anything is written to disc there is some overhead to compute the parity.


All times are GMT -5. The time now is 06:00 PM.