Bug 523923 - removing many files takes a long time
Summary: removing many files takes a long time
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: coreutils
Version: 5.3
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Ondrej Vasik
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-09-17 08:24 UTC by Adrien Kunysz
Modified: 2021-07-27 14:47 UTC (History)
5 users (show)

Fixed In Version: coreutils-5.97-28.el5
Doc Type: Bug Fix
Doc Text:
Previously, deletion of a large number of files via the rm utility was taking too much time. With this update, the code has been optimized and the deletion is now faster.
Clone Of:
Environment:
Last Closed: 2011-07-21 10:36:28 UTC
Target Upstream Version:


Attachments (Terms of Use)
backport of the upstream patch (12.19 KB, patch)
2009-09-17 08:24 UTC, Adrien Kunysz
no flags Details | Diff
df: do not fail if open(2) on the device fails in df (1.29 KB, patch)
2009-09-17 08:28 UTC, Adrien Kunysz
no flags Details | Diff
Resource leak fix for fts.c (30 bytes, patch)
2011-04-14 12:38 UTC, Michal Luscon
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1074 0 normal SHIPPED_LIVE coreutils bug fix and enhancement update 2011-07-21 10:33:32 UTC

Description Adrien Kunysz 2009-09-17 08:24:30 UTC
Created attachment 361452 [details]
backport of the upstream patch

This is a request to backport upstream commit 24412edeaf556a in RHEL to make rm much faster on directories containing a large number of files: http://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=24412edeaf556a

From diff NEWS:
+ chgrp, chmod, chown, chcon, du, rm: now all display linear performance,
+ even when operating on million-entry directories on ext3 and ext4 file
+ systems. Before, they would exhibit O(N^2) performance, due to linear
+ per-entry seek time cost when operating on entries in readdir order.
+ Rm was improved directly, while the others inherit the improvement
+ from the newer version of fts in gnulib.

Comment 1 Adrien Kunysz 2009-09-17 08:28:34 UTC
Created attachment 361454 [details]
df: do not fail if open(2) on the device fails in df

This also requires some change to df as per attached patch. Both patches have been backported by Olivier Fourdan, thanks to him.

Comment 3 Ondrej Vasik 2009-09-17 08:46:29 UTC
Thanks for backport Olivier. Just want to mention that upstream recently did another improvement for rm - rewrite to fts - but this is probably too complex for RHEL-5. 
df patch is already in another bugzilla (#520630)...

Comment 4 RHEL Program Management 2009-11-06 18:43:59 UTC
This request was evaluated by Red Hat Product Management for
inclusion, but this component is not scheduled to be updated in
the current Red Hat Enterprise Linux release. If you would like
this request to be reviewed for the next minor release, ask your
support representative to set the next rhel-x.y flag to "?".

Comment 7 RHEL Program Management 2010-08-09 18:18:33 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 9 RHEL Program Management 2011-01-11 20:15:26 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 10 RHEL Program Management 2011-01-11 22:21:53 UTC
This request was erroneously denied for the current release of
Red Hat Enterprise Linux.  The error has been fixed and this
request has been re-proposed for the current release.

Comment 20 Tomas Capek 2011-07-13 12:16:00 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Previously, deletion of a large number of files via the rm utility was taking too much time. With this update, the code has been optimized and the deletion is now faster.

Comment 21 errata-xmlrpc 2011-07-21 10:36:28 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-1074.html

Comment 22 errata-xmlrpc 2011-07-21 12:11:31 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-1074.html


Note You need to log in before you can comment on or make changes to this bug.