View Issue Details

IDProjectCategoryView StatusLast Update
0017696CentOS-7coreutilspublic2020-08-28 09:30
Reporterward56 Assigned To 
Status newResolutionopen 
Product Version7.2.1511 
Summary0017696: Deleting a lot of small files is stressful for the CPU
DescriptionDeleting a lot of small files is stressful for the CPU
There are millions of small files in a directory, perform RM-RF deletion of the directory, consume a large amount of CPU resources, and affect other process services.
Steps To ReproduceSolutions:
[root@data-processor-04 allData]# time rsync --delete-before -d /tmp/data/ /u01/apps2/ward56/allData/2020-08-26/
Real 4 m23. 362 s
The user 0 m2. The 455 s
Sys 1 m22. 491 s
Additional InformationAdvice:
Optimize rm logical algorithm for deleting large number of small files




2020-08-28 09:05

reporter   ~0037602

Are there any other quick ways to delete lots of small files? At the same time does not use too much CPU.


2020-08-28 09:26

manager   ~0037603

Last edited: 2020-08-28 09:29

first of all: please update your system to the current release. CentOS 7.2 is out of support for many many many years and thousands of improvements have been implemented meanwhile.
quick way: place those files in a separate partition and reformat the partition
as of your advice: CentOS is a rebuild of the sources used to create RHEL. We do not modify anything except to remove branding and logos. If after upgrading to the latest release you still face problems, You will need to submit your request to Redhat via and if/when RH accepts it and incorporates it into RHEL and releases a patched version, then CentOS will pick it up and rebuild it.

Issue History

Date Modified Username Field Change
2020-08-28 08:55 ward56 New Issue
2020-08-28 08:55 ward56 Tag Attached: rm
2020-08-28 09:05 ward56 Note Added: 0037602
2020-08-28 09:26 ManuelWolfshant Note Added: 0037603
2020-08-28 09:29 ManuelWolfshant Note Edited: 0037603
2020-08-28 09:30 ManuelWolfshant OS Version coreutils-8.22-1 =>