On Sat, Oct 08, 2005 at 05:32:10PM +0100, Chris Lightfoot wrote:
    [...]
> ... while the same experiment on a 2.6.13.3 UML kernel
> (booting with parameters ubd0s=filesystem mem=128M)
> running on the same hardware gives the following less
> impressive results:
> 
>     # time dd if=/dev/zero of=testfile bs=1M count=32
>     32+0 records in
>     32+0 records out
>     33554432 bytes transferred in 0.761825 seconds (44044809 bytes/sec)
> 
>     real    0m0.770s
>     user    0m0.000s
>     sys     0m0.240s
>     # time rm testfile
>     
>     real    1m20.808s
>     user    0m0.000s
>     sys     0m0.120s
> 
> (in this case the filesystem is from Debian `sarge', but
> there's no reason this should make a significant
> difference). Note that in both cases I've run the test
> several times in order until the timings stabilise a bit.

So, the reason this is so slow is that if you do the
unlink immediately after the dd command completes, the IO
for the unlink has to wait until all of the IO for the dd
has been completed. While in principle that should be
pretty quick (and the timings from the dd confused me into
thinking it was) in fact under stock UBD those writes take
*minutes* to complete; the elapsed time for the unlink is
all spent waiting for the queue to drain. If you wait for
that to happen then do the unlink it takes a fraction of a
second, as expected.

-- 
``Is `colons' the plural of `semi-colon' if you know
  you have an even number of them?'' (David Richerby)


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

Reply via email to