Deleting large no of files on linux eats up CPU

Posted by Sanjay on Super User See other posts from Super User or by Sanjay
Published on 2010-03-27T08:26:44Z Indexed on 2010/03/27 8:33 UTC
Read the original article Hit count: 278

Filed under:
|
|

I generate more than 50GB of cache files on my RHEL server (and typical file size is 200kb so no of files is huge). When I try to delete these files it takes 8-10 hours.

However, the bigger issue is that the system load goes to critical for these 8-10 hours. Is there anyway where I can keep the system load under control during the deletion.

I tried using

nice -n19 rm -rf *

but that doesn't help in system load.

© Super User or respective owner

Related posts about linux

Related posts about file-management