Re: reading an empty directory after reboot is very slow
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/
Vincent Lefèvre <firstname.lastname@example.org> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)