[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: rm -rf is too slow on large files and directory structure(Around 30000)



Bilal mk:
> 
> I tried to remove 5GB directory. In that directory around 30000 files and
> directory. It will take more than 30 min to complete.
> There is no other cpu intensive process running. After sometime it goes to
> D state and unbale to kii that process.

Removing that many files is I/O bound. The CPU doesn't play any
significant role in it. The only way to speed things up is to either get
faster storage (an SSD with high IOPS value for random writing) or you
can try another filesystem. IIRC XFS is good at what you are doing. I
cannot recommend it, though, as I don't have any recent experience with
it. 

J.
-- 
I wish I was gay.
[Agree]   [Disagree]
                 <http://www.slowlydownward.com/NODATA/data_enter2.html>

Attachment: signature.asc
Description: Digital signature


Reply to: