Gnus development mailing list
 help / color / mirror / Atom feed
From: Russ Allbery <rra@stanford.edu>
Subject: Re: opening speed for nnml groups
Date: 03 Sep 1997 14:26:12 -0700	[thread overview]
Message-ID: <m3n2luf5sb.fsf@windlord.Stanford.EDU> (raw)
In-Reply-To: Lars Balker Rasmussen's message of 03 Sep 1997 17:01:26 +0200

Lars Balker Rasmussen <lbr@mjolner.dk> writes:
> Steve Folkes <smf@rivers.dra.hmg.gb> writes:

>> It may be in the Unix filesystem itself.  I had a problem with our
>> newsfeed a few years ago that put about 10,000 files in one directory;
>> it took over a week to remove them all (using "rm -rf").

> What Unix would that be?

> % mkdir test
> % perl -e 'foreach $a (1..10000) { open FOO, ">test/$a" }'
> % time rm -rf test
> 0.60u 11.18s 1:55.40 10.2%
> % uname -a
> SunOS heimdal 5.5.1 Generic_103640-08 sun4u sparc

A week is a bit long, but when I cut back on the expire time for
control.cancel on our news server from ten days to half a day, it took
fastrm (which is a good bit faster than rm -rf under most circumstances)
the majority of a day to remove the files in the directory, and that was
an UltraSPARC 2 on a RAID array.  The directory itself, not including its
contents, was over 1MB.

> But of course, the Unix filesystem gets slower as more files are in a
> directory, but it's not _that_ bad.

Unless I'm mistaken, Unix stores a directory as a linked list of files.
Each time you open or delete a file, it has to traverse the linked list to
find it, and each time you create a file, it has to traverse the linked
list to find a hole.  It should quickly become clear from that why large
directories cause a slowdown.

(There could also be internal Gnus or emacs performance issues that
overshadow that, such as the .overview handling -- on that score, I have
no idea.)

-- 
Russ Allbery (rra@stanford.edu)         <URL:http://www.eyrie.org/~eagle/>


  parent reply	other threads:[~1997-09-03 21:26 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-09-02 12:01 Steinar Bang
1997-09-03 13:05 ` Steve Folkes
1997-09-03 15:01   ` Lars Balker Rasmussen
1997-09-03 19:45     ` Mark Eichin
1997-09-03 21:26     ` Russ Allbery [this message]
1997-09-04 14:55     ` Sean Doran
1997-09-04 15:39       ` Lars Balker Rasmussen
1997-09-04 21:44         ` Colin Rafferty
1997-09-05 12:20           ` David S. Goldberg
1997-09-05 15:21             ` Edit MIME messages (was: Re: opening speed for nnml groups) Kai Grossjohann
1997-09-05 15:57               ` David S. Goldberg
1997-09-09  7:06                 ` Steinar Bang
1997-09-10  8:43             ` opening speed for nnml groups Lars Balker Rasmussen
1997-09-10 15:07               ` Colin Rafferty
1997-09-13 23:54               ` Lars Magne Ingebrigtsen
1997-09-03 20:33 ` Ken Raeburn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3n2luf5sb.fsf@windlord.Stanford.EDU \
    --to=rra@stanford.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).