From owner-freebsd-current@FreeBSD.ORG Fri Dec 25 11:39:26 2009 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2054D106566B; Fri, 25 Dec 2009 11:39:26 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id D8DA08FC16; Fri, 25 Dec 2009 11:39:25 +0000 (UTC) Received: from critter.freebsd.dk (critter.freebsd.dk [192.168.61.3]) by phk.freebsd.dk (Postfix) with ESMTP id 9983C7E9A3; Fri, 25 Dec 2009 11:39:24 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.3/8.14.3) with ESMTP id nBPBe2S0027358; Fri, 25 Dec 2009 11:40:02 GMT (envelope-from phk@critter.freebsd.dk) To: Alexander Motin From: "Poul-Henning Kamp" In-Reply-To: Your message of "Fri, 25 Dec 2009 12:58:07 +0200." <4B349ABF.2070800@FreeBSD.org> Date: Fri, 25 Dec 2009 11:40:02 +0000 Message-ID: <27357.1261741202@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: FreeBSD-Current , freebsd-arch@FreeBSD.org Subject: Re: File system blocks alignment X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Dec 2009 11:39:26 -0000 In message <4B349ABF.2070800@FreeBSD.org>, Alexander Motin writes: >The difference is quite significant. Unaligned RAID0 access causes two >disks involved in it's handling, while aligned one leaves one of disks >free for another request, doubling performance. You will find RAID5 writes to be an even better test: Optimal filesystem block-size is a RAID5 stripe width, and if you do not get the offset right you instantly loose at least 50% of your write bandwidth. My practical experience says oftem more like 75% is lost. >As we have now mechanism for reporting stripe size and offset for any >partition to user-level, it should be easy to make disk partitioning and >file system creation tools to use it automatically. For MBR's there are compat requirement worries, slices must be track aligned for strict compat with (old ?) funky bioses. BSDlabel have no such fine details, so that is probably the best place to align to stripe offsets. Be aware that stripe-widths may be ridiculously large: you should not use them as blocksizes, just make sure that blocksizes divide cleanly into them. >Stripe size/offset reporting now supported by ada and mmcsd disk drivers >and most of GEOM modules. It would be nice to fetch that info from >hardware RAIDs also, where possible. Indeed. Good work, keep at it! Poul-Henning -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.