unlink performance

Ryan Dooley rd at powerset.com
Wed Aug 15 17:12:31 UTC 2007


Actually I was curious if it would make any difference at all.

The only two "benchmarks" (really they are not) that I have are two different attempts:

  find /path/to/temp -type f -exec rm {} \;

This in about 18.39 seconds.

  rm -rf /path/to/temp

That finished in 16.43 seconds so you're assumption that the find didn't actually help anything is true.

What I don't have handy is how big those temp directories were or how many files were included (and what size those files were).

Now probably wondering why I can't wait 18-20 seconds but this was just a small test case.  The data set will be much larger in normal cases.

Cheers,
Ryan

-----Original Message-----
From: Nigel Metheringham [mailto:nigel.metheringham at dev.intechnology.co.uk]
Sent: Wednesday, August 15, 2007 1:13 AM
To: Ryan Dooley
Cc: ext3-users at redhat.com
Subject: Re: unlink performance


On 14 Aug 2007, at 19:08, Ryan Dooley wrote:
> Pre-loading the file system cache (a la "find /path/to/temp -type f
> -print >/dev/null") followed by an "rm -rf /path/to/temp" seems to
> be pretty speedy to me.

Do you mean that:-
        find /path/to/temp -type f -print >/dev/null
        rm -rf /path/to/temp
is faster than just
        rm -rf /path/to/temp

or do you mean that you have arranged to do the find before the point
where you want to delete?  If the former, that surprises me somewhat.

        Nigel.
--
[ Nigel Metheringham           Nigel.Metheringham at InTechnology.co.uk ]
[ - Comments in this message are my own and not ITO opinion/policy - ]






More information about the Ext3-users mailing list