mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: david@lang.hm
To: Theodore Tso <tytso@mit.edu>
Cc: Timo Sirainen <tss@iki.fi>, Josef Bacik <josef@toxicpanda.com>,
	linux-kernel@vger.kernel.org
Subject: Re: ext3/ext4 directories don't shrink after deleting lots of files
Date: Sat, 16 May 2009 02:42:17 -0700 (PDT)	[thread overview]
Message-ID: <alpine.DEB.1.10.0905160241020.26653@asgard> (raw)
In-Reply-To: <20090515105815.GD6816@mit.edu>

On Fri, 15 May 2009, Theodore Tso wrote:

> On Thu, May 14, 2009 at 08:45:38PM -0400, Timo Sirainen wrote:
>>
>> I was rather thinking something that I could run while the system was
>> fully operational. Otherwise just moving the files to a temp directory +
>> rmdir() + rename() would have been fine too.
>>
>> I just tested that xfs, jfs and reiserfs all shrink the directories
>> immediately. Is it more difficult to implement for ext* or has no one
>> else found this to be a problem?
>
> It's probably fairest to say no one has thought it worth the effort.
> It would require some fancy games to swap out block locations in the
> extent trees (life would be easier with non-extent-using inodes), and
> in the case of htree, we would have to keep track of the index block
> so we could remove it from the htree index.  So it's all doable, if a
> bit tricky in terms of the technical details; it's just that the
> people who could do it have been busy enough with other things.
>
> It's hasn't been considered high priority because most of the time
> directories don't go from holding thousands of files down to a small
> handful.

I see it on a fairly regular basis on mail servers. in sendng a large 
queue builds up due to a remote system being down, but then after the 
remote system recovers, all access to that directory is slow, hurting 
everything else on the system.

David Lang

  parent reply	other threads:[~2009-05-16  9:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-14 22:02 Timo Sirainen
2009-05-15  0:32 ` Josef Bacik
2009-05-15  0:45   ` Timo Sirainen
2009-05-15 10:58     ` Theodore Tso
2009-05-15 17:29       ` Timo Sirainen
2009-05-15 18:25         ` Theodore Tso
2009-05-16  9:42       ` david [this message]
2009-05-17 21:33     ` Theodore Tso
2009-05-18  2:49       ` david
2009-05-18  3:21         ` Theodore Tso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.1.10.0905160241020.26653@asgard \
    --to=david@lang.hm \
    --cc=josef@toxicpanda.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tss@iki.fi \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®