deleting file takes longer than creating it

Andrew Reid AndrewReid at
Wed May 5 09:05:53 CDT 2010

Stroller wrote:
  Ou of curiosity, is there a reason you didn't do
>   `time dd if=/dev/zero of=zero.txt bs=1024 count=1000000 && time rm  
> zero.txt` ?
>> This machine is serving as a print server, debian package mirror,  
>> and a
>> mmysql database server. I am not sure what kind of info you might  
>> need to
>> help me. But for starters, I'm running debian lenny with a 2.6.30  
>> kernel.
>> The file system is ext3.
> I'm not saying this is wholly the reason, but ext3 is notoriously slow  
> at deletions.

Simple reason, insufficient caffiene; I copy and pasted the command line 
   I used to test the commnad and then partially editted it to use the 
OP's file name.

For clarity the correct test is:

dd if=/dev/zero of=zero.txt bs=1024 count=1000000; sync; echo 3 >
/proc/sys/vm/drop_caches ; sleep 15 ; time rm zero.txt;

On an xfs filessystem this gives:

1048576+0 records in
1048576+0 records out
1073741824 bytes (1.1 GB) copied, 11.3907 s, 94.3 MB/s

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

11 seconds create, 23 ms delete. YMMV

More information about the Linux-PowerEdge mailing list