From owner-freebsd-geom@FreeBSD.ORG  Sat Jan 20 00:59:34 2007
Return-Path: <owner-freebsd-geom@FreeBSD.ORG>
X-Original-To: freebsd-geom@freebsd.org
Delivered-To: freebsd-geom@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 83CC516A400
	for <freebsd-geom@freebsd.org>; Sat, 20 Jan 2007 00:59:34 +0000 (UTC)
	(envelope-from etc@fluffles.net)
Received: from auriate.fluffles.net (cust.95.160.adsl.cistron.nl
	[195.64.95.160])
	by mx1.freebsd.org (Postfix) with ESMTP id 3890613C459
	for <freebsd-geom@freebsd.org>; Sat, 20 Jan 2007 00:59:34 +0000 (UTC)
	(envelope-from etc@fluffles.net)
Received: from destiny ([10.0.0.21])
	by auriate.fluffles.net with esmtpa (Exim 4.63 (FreeBSD))
	(envelope-from <etc@fluffles.net>)
	id 1H84Zr-000Mih-Np; Sat, 20 Jan 2007 01:59:27 +0100
Message-ID: <45B169AB.3070103@fluffles.net>
Date: Sat, 20 Jan 2007 02:00:27 +0100
From: Fluffles <etc@fluffles.net>
User-Agent: Thunderbird 1.5.0.8 (X11/20061114)
MIME-Version: 1.0
To: bashr@comcast.net
References: <20070113004728.GQ2616@obiwan.tataz.chchile.org>	<45A85F40.7050703@centtech.com>	<45A8B722.7020302@fluffles.net>
	<45B0EAA7.7020609@comcast.net>
In-Reply-To: <45B0EAA7.7020609@comcast.net>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Cc: freebsd-geom@freebsd.org
Subject: Re: What is gstripe ?
X-BeenThere: freebsd-geom@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: GEOM-specific discussions and implementations
	<freebsd-geom.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-geom>,
	<mailto:freebsd-geom-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-geom>
List-Post: <mailto:freebsd-geom@freebsd.org>
List-Help: <mailto:freebsd-geom-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-geom>,
	<mailto:freebsd-geom-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sat, 20 Jan 2007 00:59:34 -0000

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