*BSD News Article 81038


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!news.mira.net.au!inquo!news.seinf.abb.se!erinews.ericsson.se!eua.ericsson.se!cnn.exu.ericsson.se!uunet!news-in2.uu.net!nntp.inet.fi!news.funet.fi!news.helsinki.fi!news
From: torvalds@linux.cs.Helsinki.FI (Linus Torvalds)
Newsgroups: comp.os.linux.development.system,comp.unix.bsd.freebsd.misc
Subject: Re: Linux vs FreeBSD disk io performance
Date: 18 Oct 1996 07:11:11 +0300
Organization: University of Helsinki
Lines: 32
Message-ID: <54700v$npq@linux.cs.Helsinki.FI>
References: <86g23ey1uc.fsf@romulus.ihosteng.priv.no>
NNTP-Posting-Host: linux.cs.helsinki.fi
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Xref: euryale.cc.adfa.oz.au comp.os.linux.development.system:33701 comp.unix.bsd.freebsd.misc:29512

In article <86g23ey1uc.fsf@romulus.ihosteng.priv.no>,
Ivar Hosteng  <ivarh@romulus.ihosteng.priv.no> wrote:
>I have been using Linux for 1 1/2 years now. I am using my system as a
>news server and a mailserver for a small network. When the news is
>beeing expired I can notice a clearly drop in disk performance. The df
>command takes about 2-6 seconds to complete and logging in also has
>sevral delays caused by the disk IO the expire process creates. My
>system is a 96MB 200Mhz PPro system with a 4MB SCSI II barracuda disk
>connected to a Adaptec2940 SCSI controller.

Umm.  "df" under Linux is GNU df, and does a "sync" before actually
reading the disk usage numbers.  Stupid, I know, and it should be fixed
in the latest df, but it does have some historical reasons (the
historical reasons being that df used to read the raw device to find out
how much free space it had, and a "sync" was needed to make sure the
kernel filesystem buffers were updated on the raw device.  These days
"df" does a system call that asks the kernel how much space there is, so
the sync is totally unnecessary). 

There may certainly be other issues too.  For example: because
filesystem meta-data updates are synchronous on FreeBSD, the news
expiration is not likely to be very fast.  Now, being slown on a
background task is obviously good for interactive feel, as it
essentially gives more time to the other things you're doing.  But on
the whole I don't think that being slow on meta-data updates is a good
thing even if it may have some nice side effects in some cases. 

Oh, there are differences between Linux and other systems, and you may
have hit on something that could be nicer. But posting this as flamebait
is kind of silly,

		Linus