NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: raidframe stripe alignment faq
Disclaimer: I'm not expert in RAIDframe, I've just googled, read and
tried various things and this is what I've learned.
On Sun, Aug 18, 2013 at 09:59:49AM +0100, Patrick Welche wrote:
> Say I have 4 disks and write
Four disks is bad. [1] You want there to be 2^n+1 disks: 2^n for data
and one for parity. Other values will murder your performance.
> That means that I can write 64 x 512 x 4 bytes = 128k in one go? (Block
> size always 512 bytes or real physical disk block size assuming disk
> isn't pretending?)
Nope, "x 3", because one disk goes for parity.
> If I create a wedge of type raidframe on each of the four disks, the
> offset should be 64? 256? (either way not the default 34...)
I don't think the alignment of the underlying components you build
the RAID set out of matters any more than for any other partitioning.
What matters is how the filesystem aligns on the RAID.
> After creating the raid over the wedges, the raid will still be
> aligned after raid headers are written?
Just make sure you create the file system with block size that aligns
with "sectPerSU * 2^n" as you've chosen (newfs(8), -b switch). This way
full block writes align with the parity stripe. I don't know if
the fragment size could or should be manipulated for better performance.
But I think I've read somewhere that 64 KiB is the largest usable value
here, because that's largest one piece write that the kernel will do in
any case.
On Sun, Aug 18, 2013 at 07:33:17AM -0400, Greg Troxel wrote:
> I believe the RF header is 64 (512-byte) sectors. The key point is that
> 32K is a multiple of 4K, for the newer disks with 4K physical sectors.
> So I would create wedges at 64.
RAIDframe reserves RF_PROTECTED_SECTORS (64) from the start of each
component for the component label. The label seems to be 1 KiB in size
and located at the halfway point of that reserved area. See raid(4).
So if you need to erase the labels at some point, something like
this has been useful:
for component in /dev/comp1 /dev/comp2 /dev/comp3
do
dd if=/dev/zero of=${component} seek=32 count=2
done
[1] http://www.netbsd.org/~sborrill/RAIDspeed.pdf
--
Jarmo Jaakkola
Home |
Main Index |
Thread Index |
Old Index