From owner-freebsd-geom@FreeBSD.ORG Sat Jan 13 10:40:00 2007 Return-Path: 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 375B816A407 for ; Sat, 13 Jan 2007 10:40:00 +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 3F22213C448 for ; Sat, 13 Jan 2007 10:39:56 +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 ) id 1H5gIh-000ONL-3b for freebsd-geom@freebsd.org; Sat, 13 Jan 2007 11:39:51 +0100 Message-ID: <45A8B722.7020302@fluffles.net> Date: Sat, 13 Jan 2007 11:40:34 +0100 From: Fluffles User-Agent: Thunderbird 1.5.0.8 (X11/20061114) MIME-Version: 1.0 To: freebsd-geom@freebsd.org References: <20070113004728.GQ2616@obiwan.tataz.chchile.org> <45A85F40.7050703@centtech.com> In-Reply-To: <45A85F40.7050703@centtech.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jan 2007 10:40:00 -0000 Eric Anderson wrote: > On 01/12/07 18:47, Jeremie Le Hen wrote: >> Hi list, >> >> Please forgive me, I know this is a dumb question. I've checked the >> manpage, Wikipedia [1], Webopedia [2] and a few other documents, >> but I'm still not sure to fully understand the striping concept. >> >> gmirror(8) provides RAID-1 and is very easy to understand. >> gconcat(8) is easy to grasp as well. >> >> However, I'm experiencing some difficulties to understand gstripe(8). >> I would say it's a kind of smart disk concatenation which stores >> block X on disk (X % N), where N is the number of disk in the RAID-0. >> This permits faster read/write. >> >> Am I right ? >> >> [1] http://en.wikipedia.org/wiki/Data_striping >> [2] http://www.webopedia.com/TERM/R/RAID.html >> >> Thank you. >> Best regards, > > > Yea, that's pretty close! A stripe (RAID 0 - called that because it > really isn't redundant in any way) is just like you described. Write > one block to the first disk, then the next block to the next disk, > etc. It distributes your read/write activity to increase performance. > Sequential read/write performance may not be affected, but random IO > should get a nice boost. Both sequential and random I/O performance will be boosted. In fact, the sequential increase could be lineair; meaning that with twice the number of drives; twice the sequential transfer rate is achieved; if bus speed allows and the raid implementation is clean and efficient. The increase in random I/O is not always pronounced; only with a high concurrency a large performance increase in Random I/O is visible. Some benchmarks to illustrate this: Single drive (ad8) concurrency Performance in I/O's per sec. average 1 106 106 107 106 4 106 106 106 106 16 116 116 116 116 32 127 125 126 126 128 151 151 150 150 256 156 156 157 156 gstripe 4xad - 128KB stripe - FM off concurrency Performance in I/O's per sec. average 1 173 173 173 173 4 270 270 270 270 16 338 338 338 338 32 370 370 370 370 128 444 434 434 437 256 465 465 465 465 This comparison is a bit unfair since it's one disk versus 4, but the effect is clear; the largest performance increase happens with multiple 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: gstripe 4xad - 16KB stripe - FM off concurrency results (3 times) average 1 129 129 129 129 4 151 150 151 150 16 173 173 172 172 32 188 188 190 188 128 222 222 222 222 256 232 229 229 230 The increase in Sequential Transfer Rate (STR) is clearly visible here: -------Sequential Output-------- ---Sequential Input-- --Random-- -Per Char- --Block--- -Rewrite-- -Per Char- --Block--- --Seeks--- Machine MB K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU /sec %CPU 4096 104288 90.4 237690 74.4 71008 22.0 87837 91.9 250858 44.6 114.8 0.7 Here it shows 237MB/s write and 250MB/s read speed; which is almost lineair increase (4 x max STR). This, also, is with 4 drives. Compare with single drive: -------Sequential Output-------- ---Sequential Input-- --Random-- -Per Char- --Block--- -Rewrite-- -Per Char- --Block--- --Seeks--- Machine MB K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU /sec %CPU 4096 59391 50.7 59105 16.9 23664 7.0 62471 65.2 63045 10.0 103.7 0.6 Notice the big difference in rewrite-performance; that's a thing RAID0 is strong in. - Veronica