*BSD News Article 63163


Return to BSD News archive

Newsgroups: comp.unix.bsd.freebsd.misc
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.mira.net.au!inquo!news.uoregon.edu!newsfeed.internetmci.com!in2.uu.net!twwells!bill
From: bill@twwells.com (T. William Wells)
Subject: Re: Poor performance with INN and FreeBSD.
Distribution: inet
Organization: None, Mt. Laurel, NJ
Message-ID: <DnFM1F.4FG@twwells.com>
References: <311F8C62.4BC4@pluto.njcc.com> <4gij7n$pmm@uriah.heep.sax.de> <4go23v$8hp@fozzie.sun3.iaf.nl> <4gqvs8$7u@uriah.heep.sax.de>
Date: Tue, 27 Feb 1996 11:17:38 GMT
Lines: 32

In article <4gqvs8$7u@uriah.heep.sax.de>, J Wunsch <j@uriah.heep.sax.de> wrote:
: Geert Bosch <geert@fozzie.sun3.iaf.nl> wrote:
: >J Wunsch (j@uriah.heep.sax.de) wrote:
: >: BSD uses a filesystem with linear directories, but the directory
: >: contains just an pointer to the i-node information (unlike e.g. OS/2,
: >: where the directory contains the equivalent of an i-node itself).
:
: >But if you have to look for a certain filename you'd still have to
: >do a lineair search which is what is causing the large overhead when
: >accessing news articles in a large directory.
:
: ``large'' overhead is certainly an overstatement, unless you're going
: to put your news server on a 386sx/16.

I measured the amount of time spent in a regular NNTP feed spent
in namei. It's 69% of the time needed to process an article.

This is in consequence of the fact that to create a file, one
must read the entire directory -- on my newsfeed that means an
average of 44K per article just to read the directory. Then
another 8K, perhaps, to actually create the file. All for
articles that only average 12K.  Totalled up, that means that
directory operations cost over five times the actual article
write time!

In other words, the directory overhead *is* the prime overhead in
doing NNTP -- so I think "large" is a perfectly reasonable word.
Or "huge". Or even "vaster than empires and more slow". :-)

For whatever it's worth, this is solely a consequence of using
linear directories. Which is to say, it's a problem for all the
standard Unix file systems.