Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Aug 2001 08:16:07 -0500
From:      Mike Meyer <mwm@mired.org>
To:        "Kevin Oberman" <oberman@es.net>, khui@cs.toronto.edu
Cc:        questions@freebsd.org
Subject:   Re: Experiencing very slow raw write speeds on /dev/ad1 
Message-ID:  <15222.33175.427963.229610@guru.mired.org>
In-Reply-To: <71444615@toto.iv>

next in thread | previous in thread | raw e-mail | index | archive | help
Kevin Oberman <oberman@es.net> 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.

	<mike
--
Mike Meyer <mwm@mired.org>			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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15222.33175.427963.229610>