Re: ext2fs enhacement/fix [re: shrinking directories]

David Luyer (luyer@ucs.uwa.edu.au)
Fri, 17 Jul 1998 09:36:13 +0800


Ted Deppner wrote:
> I'd like to pose the question, Is this really necessary?
[...]
> On a server, I can't imagine _wanting_ to recover space (under any scheme)
> when most servers have a cyclic nature, and even if space were saved for a
> period of time, there was a time (hours or days ago) when the directory NEEDED
> to be that large.
>
> And on busy servers, where you might have 20-30 mb tied up this way (a news
> machine just after expires), within 12 to 24 hours they'll be full again.
>
> In any case, I always have 100's of extra MBs of drive space laying around.
> Even if I could recover 50mb for 12 hours or a week, it I wouldn't care, it's
> such a minor thing.

It's not the disk space - it's the RAM and CPU. Create a directory with
512,000 files with 8-character names in them sometime. Delete all
except a dozen files in it. 'ls'. wait. wait. wait. See the problem.
This is a problem on mail and news servers (both in spool directories).
Things like seasonal or topical newsgroups, spammed mailing lists, etc,
which might never bloat to the same size again but for some short time get
to that size.

Other things like 'open()' also get slowed down from memory.

If we were shrinking when the directory size *halved*, a news server with
decent expires time and frequent enough expires runs would only be shrinking
seasonal/topical groups - the group size doesn't usually halve in one expire
run.

David.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html