Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Nov 2001 22:28:06 -0700
From:      "Chad R. Larson" <chad@DCFinc.com>
To:        Greg Lehey <grog@FreeBSD.ORG>
Cc:        Harry Putnam <reader@newsguy.com>, freebsd-mobile@FreeBSD.ORG
Subject:   Re: Extreme filesystem sloth
Message-ID:  <20011128222806.A16545@freeway.dcfinc.com>
In-Reply-To: <20011128180257.G61580@monorchid.lemis.com>; from grog@FreeBSD.ORG on Wed, Nov 28, 2001 at 06:02:57PM %2B1030
References:  <XFMail.20011128165908.doconnor@gsoft.com.au> <m1667vpeu1.fsf@reader.newsguy.com> <20011128180257.G61580@monorchid.lemis.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Nov 28, 2001 at 06:02:57PM +1030, Greg Lehey wrote:
> On Tuesday, 27 November 2001 at 22:52:22 -0800, Harry Putnam wrote:
>> "Daniel O'Connor" <doconnor@gsoft.com.au> writes:
>>> On 28-Nov-2001 Harry Putnam wrote:
>>>> 4.3-STABLE on a Toshiba 4005 (Pentium II 233mhz) Let me preface
>>>> these remarks with a comment to set the tone.  This is not an
>>>> attempt at starting a religous war a la linux vs FreeBSD.  I
>>>> suspect what I see is the result of poor or misguided configs on my
>>>> part but have no clue what things to look at.
>>>
>>> Turn softupdates on.
>>> (man tunefs)
>>>
>>> Possibly also turn write caching on if it is off.
>>> (man ata)
>>
>> OK, thanks Daniel.  Look like good clues.  I'm eager to try them out.
>> Do you think these things will improve things quite noticably?
> 
> If both of these are off and you turn them on, then yes, the
> peformance will improve by an order of magnitude.

There are religeous wars to be fought here.  The default Linux
filesystem runs asynchronously, meaning that changes to the
structure of the filesystem are returned to the calling program
as having been completed (but having been scheduled).  If your
system crashes in the window between the change being requested and
the change actually making it to disk, you lose.

FreeBSD takes a more conservative approach, in that the default is
to not return from a call that changes the disk metadata until the
change has been committed to the disk.

So, if you are running out-of-the-box Linux vs FreeBSD systems, the
Linux will win, especially in activities that alter the filesystem.

You can make FreeBSD act like Linux by using the "async" flag in the
mount command.

But FreeBSD has a mode that's in-between the two, called
"softupdates", in which the changes to the filesystem on disk is
assured to be consistant and recoverable even though the disk and
the cached memory image are different.

Best of both worlds, basically.

So, if you are going to try to benchmark a Linux system against a
FreeBSD system, make sure you use the "async" flag on the filesystem
mount on the FreeBSD system.

If your data is =really= important to you (like, difficult to
recreate), then use softupdates on FreeBSD, and ignore Linux
filesystems.

	-crl
--
Chad R. Larson (CRL15)   602-953-1392   Brother, can you paradigm?
chad@dcfinc.com         chad@larsons.org          larson1@home.com
DCF, Inc. - 14623 North 49th Place, Scottsdale, Arizona 85254-2207

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-mobile" in the body of the message




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