From owner-freebsd-performance@FreeBSD.ORG Mon May 2 13:53:39 2005 Return-Path: Delivered-To: freebsd-performance@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2DBD616A4CE; Mon, 2 May 2005 13:53:39 +0000 (GMT) Received: from critter.freebsd.dk (0x535c0e2a.sgnxx1.adsl-dhcp.tele.dk [83.92.14.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 65DE243D58; Mon, 2 May 2005 13:53:38 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.13.3/8.13.3) with ESMTP id j42DrYHn017814; Mon, 2 May 2005 15:53:34 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: "Steven Hartland" From: "Poul-Henning Kamp" In-Reply-To: Your message of "Mon, 02 May 2005 14:25:04 BST." <002201c54f1a$5c05dfc0$b3db87d4@multiplay.co.uk> Date: Mon, 02 May 2005 15:53:34 +0200 Message-ID: <17813.1115042014@critter.freebsd.dk> Sender: phk@critter.freebsd.dk cc: Robert Watson cc: freebsd-performance@freebsd.org cc: Eric Anderson Subject: Re: Very low disk performance on 5.x X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2005 13:53:39 -0000 >Interesting stuff so: >1. How to we test if this is happening? Calculate by hand what the offset of the striped/raid part of the disk is (ie: take slice+partition stats into account). >2. How do we prevent it from happening? Make sure that the first sector of a partition/slice is always the first sector in a stripe on your raid/stripe/whatever. >3. Why would this be effecting reads and not writes as surely the same >blocking is being done for both? Write on RAID5 uses a cache which lies to you about when things are safely stored on the disk. Good RAID5 has battery backup for that cache. The MBR slice format is stupid because it more often than not gets this exactly wrong. Typically there are 63 "sectors per track" and that ruins any alignment in 99% of the cases. Sysinstall, fdisk and bsdlabel should know about all this and try to help the user get it right. Fixing them to do so may be more trouble than writing a better too bottom up. -- 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.