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

first mkdir takes a long time (on ext3)


I observe that it often takes very long time (20s) to mkdir on an ext3 drive, 
especially the first directory.
What could the reason be?

$ time mkdir hello

real    0m22.325s
user    0m0.000s
sys     0m0.132s

If system time is less than a second, what is eating the other 22 seconds?

This is an idle squeeze installation:
$ uname -a
Linux Squeeze 2.6.32-5-686 #1 SMP Tue Mar 8 21:36:00 UTC 2011 i686 GNU/Linux

After that directory I made some more, and it was responsive as expected:

$ time (touch one ; mkdir two; touch three)

real    0m0.135s
user    0m0.000s
sys     0m0.052s

$ time mkdir five

real    0m0.621s
user    0m0.000s
sys     0m0.052s
$ cd ..
$ time mkdir one ; time mkdir two

real    0m0.050s
user    0m0.004s
sys     0m0.048s

real    0m0.040s
user    0m0.000s
sys     0m0.040s

This is on a 1.8 T ext3 mounted rw,noatime using LVM, and I have seen that with my old data drive,
500 GB ext3 without LVM as well. 

Any ideas?


Reply to: