> Ext2 directories never shrink. This is mainly because of
> race conditions and coding difficulty.
> If a directory size really bothers you, you must have been
> doing something _very_ strange anyway :)
I have an program that sometimes manipulates directories containing
thousands of files, sometimes 40000. The directory size sometimes reached
1.6 Mb...
OK, you could say there's a design flaw in the program. But now, even if
I empty the directory and leave just 2 or 3 files in it the access time is
very slow. I did some timings with 'strace -c ls' and now the call to
getdents() is a hundred times slower than for a fresh directory!
So globally my apps run slower even though I emptied all the directories,
and if I want to attain top speed again I have to rmdir/mkdir the
directories again. Is this a permanent limitation is ext2? Is there a way
to fix it?
-- Farzad FARID Administrateur Reseau Publicis Technology
- 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