Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: David Pottage <david@electric-spoon.com>
To: "krzf83@gmail.com" <krzf83@gmail.com>
Cc: Hugo Mills <hugo@carfax.org.uk>, linux-btrfs@vger.kernel.org
Subject: Re: is space really freed after deleting large subvolume?
Date: Thu, 13 Oct 2011 21:01:44 +0100	[thread overview]
Message-ID: <4E9743A8.1050806@electric-spoon.com> (raw)
In-Reply-To: <CAJ1PRS=hJmj-sFRmAqtWcvwawNmCzWvfa3paH5dc_mfTgnUn7g@mail.gmail.com>

On 13/10/11 19:06, krzf83@gmail.com wrote:
>> And what affect this rate of space reclaiming? When does it happen?
>> Also I guess that if it happens it must lower overall io performance
>> and rise loadavg ...?
>>
> and finaly is the performance overhead same as deleting same number of
> files in system like ext3? When you delete large number of files in
> ext3 (or any other system) you are looking at huge io traffic during
> deletion. You are saying that in btrfs if you delete subvolume (that
> had many files) you don't get free space instantenously so when and is
> prerformance overhead basicly overaly SAME but in time? higher? lower?
ext3 is slow to delete lots of files because the filesystem is block
based, so if you delete a large file (eg an ISO image), then ext3 has to
make a huge number of updates to the free space map to say that those
blocks are now free.

btrfs like ext4 has support for extents, which can be any size, so
typically if you delete a large file, then it occupies only one extent,
so only that one extent needs to be marked as free, so a lot less I/O.

If you delete a large number of files, then there is no avoiding the
fact that a lot of metadata needs to be updated. In this respect btrfs
is unlikely to be significantly faster than any other filing system.

-- 
David Pottage


  parent reply	other threads:[~2011-10-13 20:01 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-13 16:14 is space really freed after deleting large subvolume? krzf83@gmail.com 
2011-10-13 16:21 ` Hugo Mills
2011-10-13 16:57   ` krzf83@gmail.com 
2011-10-13 18:06     ` krzf83@gmail.com 
2011-10-13 19:22       ` krzf83@gmail.com 
2011-10-13 20:01       ` David Pottage [this message]
2011-10-13 21:03         ` krzf83@gmail.com 
2011-10-14 17:26           ` Maciej Marcin Piechotka
2011-10-13 16:29 ` Roman Mamedov
2011-10-14  5:17 ` krzf83@gmail.com 
2011-10-14  8:45   ` Hugo Mills
2011-10-14 17:12     ` Bruce Guenter

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=4E9743A8.1050806@electric-spoon.com \
    --to=david@electric-spoon.com \
    --cc=hugo@carfax.org.uk \
    --cc=krzf83@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    /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