What is gstripe ?

Fluffles etc at fluffles.net
Sat Jan 20 00:59:34 UTC 2007


bashr wrote:
> Fluffles wrote:
>> concurrency. It's very important to select a high stripe size though; if
>> you lower the stripesize to say 16KB the parallellisation effect will be
>> almost gone:
>>
>
> How do you decide what stripe size to use?  Are there handy
> rules-of-thumb?  I must have used the default stripe size when setting
> up gstripe here, 4096.  There are two gstripes here, which are then
> gmirrored.  Are there similar effects of gmirror sector size?

4KB is an extremely low stripesize and will mostly likely degrade
performance, howeveri suspect the effect would be less on RAID1-volumes
since the RAID-subsystem does not have to switch devices when stripe
blocks overlap. So RAID1 might be an exception, though also for RAID1 i
think a stripesize of 128KB is best suited.

Overall i sugest using a stripesize of 128KB of bigger. This way you can
be sure that a single I/O request (maximum of 128KB on FreeBSD; MAXPHYS)
will 'fit' into one stripeblock and thus can be handled by one disk in
the RAID array. If you use 64KB stripesize and you read 65KB or 100KB,
two physical disks must be used to handle the request; this will degrade
performance.

Misalignment, often caused by using default partitioning, can also
degrade performance. To counteract this, use manual disklabeling with
the same offset (or multiple) as the stripesize, use Dangerously
Dedicated mode, or simply select a stripesize of 256KB or even bigger.

A lower stripesize can in reality only be useful for combining software
parity RAID. In all my benchmarks, a large stripesize was always faster
than a small stripesize. So the bottom line is probably: use 128KB or
larger.

The sector size is the minimum transfersize; you should leave it at 512
bytes; except for special hardware or to speed up sector-based
encryption such as GELI.

- Veronica


More information about the freebsd-geom mailing list