From owner-freebsd-questions Sun Aug 12 6:16:12 2001 Delivered-To: freebsd-questions@freebsd.org Received: from guru.mired.org (okc-27-141-144.mmcable.com [24.27.141.144]) by hub.freebsd.org (Postfix) with SMTP id BAA3737B403 for ; Sun, 12 Aug 2001 06:16:08 -0700 (PDT) (envelope-from mwm@mired.org) Received: (qmail 64269 invoked by uid 100); 12 Aug 2001 13:16:07 -0000 From: Mike Meyer MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15222.33175.427963.229610@guru.mired.org> Date: Sun, 12 Aug 2001 08:16:07 -0500 To: "Kevin Oberman" , khui@cs.toronto.edu Cc: questions@freebsd.org Subject: Re: Experiencing very slow raw write speeds on /dev/ad1 In-Reply-To: <71444615@toto.iv> X-Mailer: VM 6.90 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Kevin Oberman types: > 1. For all but he root partition, turn on softupdate. This is done > with tunefs -n enable 'filesystem'. To do this, re-boot to single user > mode and use the tunefs command on each file system where you want > it. It is non-volatile, so it only should be done once for each file > system. You probably don't want to do this for root. It's normally not > going to help much and the delay in reclaiming deleted space can cause > problems there. The delay reclaiming deleted space is only a problem if your root is very tight on space. Personally, I make root file systems large enough to avoid the problem - a hundred meg is more than enough, even if you keep /var on it - and turn on softupdates. > 2. Mount the file systems as async. This is what Linux does. If there > is a failure, you might lose an entire file system or an entire disk > because of meta data inconsistency. Either a power failure or a crash > can be devastating, although it usually won't be. Don't bother turning on async for any file system that has softupdates enabled. Softupdates wouldn't add anything to async, and the write ordering done by soft udpates is incredibly dangerous on async disks. Which is the why async flag to mount is ignored if the file system has soft updates enabled. > I do recommend soft updates. They are safe and can substantially > improve performance. I'm still not sure why soft updates are not > default, but they may become default in the future, especially if > background fsck works. (Background fsck can only work with soft update > since a soft update system can safely run without an fsck.) Originally, licensing prevented soft updates from being the default. I think you can now enable softupdates from sysinstall when you build the file systems. Setting things up to provide defaults for each file system would be the next step. The other thing you can do to improve file system performance turn on noatime, which will save a write whenever a file is read. Checking out the tuning man page - possibly on the web server, as it's a post 4.3 thing - is also recommended. http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message