Re: first mkdir takes a long time (on ext3)
Hello Karl, hello everybody,
thank you Karl for this script.
Am So Mai 22 2011 schrieb Karl Vogel:
> >> On 19/05/11 17:01, Hartmut Niemann wrote:
> H> It often takes very long time (20s) to mkdir on an ext3 drive
>
>
> Try this version of mkdir earlier in your PATH until you find out what
> the delay is.
>
> you% mkdir /tmp/mkdir
> you% chmod 1777 /tmp/mkdir
>
> you% cat /usr/local/bin/mkdir
> #!/bin/sh
> tfile=$(date '+%Y%m%d%H%M%S')
> exec /usr/bin/strace -r -o /tmp/mkdir/$tfile /bin/mkdir ${1+"$@"}
> exit 1
>
>
I did not succed to reproduce my problem on my older computer, but
I caught one on my new computer
$ uname -a
Linux Squeeze 2.6.32-5-686 #1 SMP Tue Mar 8 21:36:00 UTC 2011 i686 GNU/Linux
[... lots of lines deleted ]
0.000037 mmap2(NULL, 1527680, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb74df000
0.000021 close(3) = 0
0.000039 mkdir("one", 0777) = 0
83.683130 close(1) = 0
0.000029 close(2) = 0
It looks like mkdir itself takes so long. Everything else was well below 1 ms.
This looks interesting...
Hartmut
Reply to: