tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: 5.1 RAID5 write performance



Edgar Fuß <ef <at> math.uni-bonn.de> writes:

> 
> I've the impression that 5.1's fs write performance on RAID5s is 
> exceptionally 
> poor.
> 
I've been working on a raid 5 raidframe setup recently and I've got good write
performance (80- 100MB/sec) and excellent read performance (>500MB/sec ? - 
don't know what's going on here yet). I just use dd for the test, so I was just
testing sequential access. I use 3 recent Hitachi 2.5" 500GB 7200 rpm sata
disks.

Poor raid performance is usually due to partition misalignment or differences
between fs block size and raid data stripe size or a combination of both.

1. Does the partition start on a multiple of the number of data sectors per
stripe unit?  E.g. if you set in your raid conf file as follows: START layout 64
1 1 5 and assuming a 3 disk setup, that makes your setup to have: 64 sectors x
(3 stripe slices - 1 parity slice) = 128 data sectors per stripe In this case,
your partitions should start on a multiple of 128 sectors and the size should be
a multiple of 128 sectors as well. If your filesystem block size is also 128
sectors, then the filesystem block will straddle two raid data blocks and any
filesystem block io operation would require two io operation on the raid device,
AFAIK.

2. AFAIK, setting the fs block size to be equal to the raid data block size
produces the optimal throughput. In the example above, you'd do newfs -b 64k
/dev/<raid_partition>. E.g. if you're fs block size is 4k and your raid block
size is 64k, writing a file that occupies 16 sequential fs blocks (64k) would
cause the raid device having to write and calculate parity 16 times to the same
raid data stripe.

One trick I found when just trying to figure out the best paramaters for your
setup is to not do raidctl -i until you're done experimenting, to avoid waiting
for parity writing. Of course you want to do it once you've settled on a
configuration that you like.

I hope this help.

Toby





Home | Main Index | Thread Index | Old Index