Re: reading an empty directory after reboot is very slow
On Tuesday 14 April 2015 02:58:20 Petter Adsen wrote:
> On Mon, 13 Apr 2015 15:41:03 +0200
> Vincent Lefevre <firstname.lastname@example.org> wrote:
> > On 2015-04-13 14:45:25 +0200, Loïc Grenié wrote:
> > > 2015-04-13 14:39 GMT+02:00 Vincent Lefevre <email@example.com>:
> > > > The problem is that this operation is (always?) very slow:
> > > > something like 100 seconds (1 minute and 40 seconds). It has
> > > > been reproducible for several months. The logs show nothing
> > > > during this operation.
> > > >
> > > > Any idea?
> > >
> > > Maybe the directory is very large (even though its empty). Try
> > >
> > > ls -ld tmp.
> > >
> > > and see if the file "tmp" is large.
> > Thanks! I didn't know that (I thought that the file system would
> > automatically "optimize" directories when files are removed, so
> > I've never looked closely at their size). Indeed:
> > ypig:~/eftests> ls -ld tmp
> > drwxr-xr-x 2 vlefevre vlefevre 29655040 2015-04-13 15:25:55 tmp/
> Can someone please enlighten me as to why the entry for this directory
> is so large, even though it is empty? Since it's apparently obvious to
> everyone else, I would very much like to know :)
I'll second that request myself Petter.
Cheers, Gene Heskett
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>