linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chris Mason <chris.mason@oracle.com>
To: Lubos Kolouch <lubos.kolouch@gmail.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: slow deletion of files
Date: Mon, 12 Jul 2010 21:12:46 -0400	[thread overview]
Message-ID: <20100713011246.GM563@think> (raw)
In-Reply-To: <i1cm80$901$1@dough.gmane.org>

On Sun, Jul 11, 2010 at 02:59:12PM +0000, Lubos Kolouch wrote:
> Hello,
> 
> during my testing of btrfs I found out, 
> that deletion of directory with many files (many millions) takes veeeery 
> long (it is running two weeks now and did not finish).
> 
> But when instead of directory I create subvolume, it is deleted instantly.
> 
> Is it normal behaviour? (gentoo 2.6.34-r1, btrfs-progs-9999).
> Why the directory cannot be deleted instantly as well?

The subvolume deletion is able to walk much less metadata, and it is
able to walk it in a more efficient order than a file by file deletion.
Time to delete individual files depends mostly on metadata fragmentation
and is mostly limited by reading in the file extent pointers and crcs.

The bulk of this work can be pushed into the background, it is
definitely on my todo list.

-chris

      parent reply	other threads:[~2010-07-13  1:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-11 14:59 slow deletion of files Lubos Kolouch
2010-07-11 20:20 ` Konstantinos Skarlatos
2010-07-12 20:30   ` Clemens Eisserer
2010-07-12 20:32     ` Clemens Eisserer
2010-07-12 21:33     ` Tracy Reed
2010-07-13  9:29     ` Sander
2010-07-13  1:12 ` Chris Mason [this message]

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=20100713011246.GM563@think \
    --to=chris.mason@oracle.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=lubos.kolouch@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).