[ale] why would it take longer to delete a file than to create it?

Greg Freemyer greg.freemyer at gmail.com
Tue May 4 20:22:24 EDT 2010


Try it as:

date; dd if=/dev/zero  of=zero.txt bs=1024 count=1000000 conv=fsync;
date; rm zero.txt; date

note the extra conv=fsync arg

Greg

On Tue, May 4, 2010 at 6:29 PM, John G. Heim <jheim at math.wisc.edu> wrote:
> I have this very slow database server. Today I noticed something strange
> about it. I can create a large file via dd faster than I can delete it.
> Look at the screen cap below... It took just 12 seconds to create the file
> with a million 1K records but it took 36 seconds to delete it. Why would
> that be? I'm running debian lenny with a 2.6.30 kernel. There are 2 500 Gb
> disks in the machine configured as RAID-1.  The file system on the disk is
> ext3.
>
> # date; dd if=/dev/zero  of=zero.txt bs=1024 count=1000000; date; rm
> zero.txt; date
> Tue May  4 16:59:21 CDT 2010
> 1000000+0 records in
> 1000000+0 records out
> 1024000000 bytes (1.0 GB) copied, 11.7291 s, 87.3 MB/s
> Tue May  4 16:59:33 CDT 2010
> Tue May  4 17:00:09 CDT 2010
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo
>



More information about the Ale mailing list