Messages in this thread | | | Date | Thu, 16 Jul 1998 20:09:54 +1200 | From | Chris Wedgwood <> | Subject | Re: ext2fs enhacement/fix [re: shrinking directories] |
| |
On Thu, Jul 16, 1998 at 03:58:11PM +0800, David Luyer wrote:
> How about e2fsck doing it? The only thing is that some news servers might > not reboot for around a year, and a news server is one case where -
Maybe.
Except - ever tried to e2fsck on a volume over say 50GB?
Its a bit hideous to say the least, and where possible, i.e. for web proxies, etc. I usually just dump the volume and mke2fs over the top and start fresh.
For news, not really an option unless you have several machines for redundancy and can reload the data that way.
> * directories may bloat massively for a short time then never be large > again but cause massive performance loss
I'm unconvienced this is a realy problem for most people. Sure, I have code which can do this, but its not something I normally encounter.
> * the slowdown is very significant. I have a perl script which goes > around and makes a new directory, moves articles and removes the old one > if the ratio of estimated directory size by file names and actual > directory size is bad and the total directory size is big - I run this > when the news server gets too slow and, magic, it's fast again [and yes, > I've killed *.jobs* and tiered control.cancel into 256 subdirs already]. > (this is somewhat improved by the inum hack reducing the number of > open()'s however)
Hmm.. ok. maybe it does happen and I tell lies. I was going to ask if its still slow under 2.1.x because of the dcache, but for a new server (where the dcache is only of limited use) then I guess it will be.
> * you wouldn't want to hook every single unlink()
Have unlink check to see if the current size >= 2* required size and shrink on that?
> Maybe open() should take note of directories which it thinks are quite bad > by some simple heuristic (read - many wasted blocks) and set a timer to do > something about it (so latency isn't introduced into open() by doing it).
I don't see how to tie in a process/kernel thread to do the clean-up with the fs code. I think the fs needs to do it itself.
-cw
- 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
| |