unlink performance

Stephen Samuel darkonc at gmail.com
Thu Aug 16 14:10:22 UTC 2007


I think that the mv / mkdir is going to be your best move...
If you can't move the whole directory, try:


mkdir /tmp2
mv /tmp/{*,.??*} /tmp2
(restart the application)
rm -rf /tmp2/* /tmp2/.??*

(it depends, of course, on the two directories being on the same partition).

That approach especially works if the bulk of your files are in
sub-directories  You'll only be doing work on the inodes directly in the
main directory, and then you can take your time deleting the subdirectories
from /tmp2 while your app runs.


I'm looking for clues about speeding up unlink performance.  I have an ext3
> file system (well, across several machines) that have a temp directory.  The
> application needs to clean up the temp directory before the next run of the
> application begins and the engineers want to clean out this temp directory
>  "quickly".
>

-- 
Stephen Samuel http://www.bcgreen.com
778-861-7641
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/ext3-users/attachments/20070816/90de8c62/attachment.htm>


More information about the Ext3-users mailing list