[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: reading an empty directory after reboot is very slow



On Mon, 13 Apr 2015 15:41:03 +0200
Vincent Lefevre <vincent@vinc17.net> wrote:

> On 2015-04-13 14:45:25 +0200, Loïc Grenié wrote:
> > 2015-04-13 14:39 GMT+02:00 Vincent Lefevre <vincent@vinc17.net>:
> > > 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 :)

Petter

-- 
"I'm ionized"
"Are you sure?"
"I'm positive."

Attachment: pgpe8Ykvc0htU.pgp
Description: OpenPGP digital signature


Reply to: