All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Pernegger <pernegger@gmail.com>
To: linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: freezes during snapshot creation/deletion -- to be expected? (Was: Re: btrfs based backup?)
Date: Sun, 24 Nov 2019 20:09:18 +0100	[thread overview]
Message-ID: <CAKbQEqGoJcP9isUVW479wJMeXa=nNPdU_buNVRFK07LOn8D6Vg@mail.gmail.com> (raw)
In-Reply-To: <75349379-56b2-7381-4201-dbf53e7a111b@gmx.com>

Am So., 24. Nov. 2019 um 01:38 Uhr schrieb Qu Wenruo <quwenruo.btrfs@gmx.com>:
> In short, unless you really need to know how many bytes each snapshots
> really takes, then disable qgroup.
>
> And BTW, for "many" subvolumes/snapshots, I guess we mean 20.
> 200 is already prone to cause problem, not only qgroups, but also send.
>
> So it's also recommended to reduce the number of snapshots.

I've disabled qgroups for now, we'll see how that goes. These are
personal desktops, they would have been nice to have, that's all.
Sadly that means that they probably won't work on any storage setup
complex enough for them to be really useful, either, yet.
If btrfs scales so badly with the number of subvolumes that having >20
at a time should be avoided, doesn't that kill a lot of interesting
use-cases? My "time machine" desktop setup, certainly, but anything
with a couple of users or VMs would chew through that 20 pretty
quickly, even before snapshots. Which leaves the LVM use-case
(snapshot, backup the snapshot, delete the snapshot).

> The slowdown happens in commit transaction, and with commit transaction,
> a lot of operation is blocked until current transaction is committed.
>
> That's why it blocks everything.
>
> We had tried our best to reduce the impact, but deletion is still a big
> problem, as it can cause tons of extents to change their owner, thus
> cause the problem.

Sure, but why does it *have to* block? Couldn't the intent to delete
the subvolume be committed, the metadata changes / actual deletion
happen at leisure? Yes, if qgroups are on, then the qgroup info will
be behind, but so what? At least I think that lax/lazy qgroups would
be a nice option to have.
Also, I still don't get why disabling qgroups, reenabling them and
doing a full rescan is lightning fast (and non-blocking), while just
leaving them on results in the observed behaviour.

Cheers,
C.

  reply	other threads:[~2019-11-24 19:09 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-12 18:34 btrfs based backup? Ulli Horlacher
2019-11-12 18:58 ` joshua
2019-11-12 19:09 ` Oliver Freyermuth
2019-11-12 19:14 ` Remi Gauvin
2019-11-12 20:05 ` Oliver Freyermuth
2019-11-20 16:36   ` freezes during snapshot creation/deletion -- to be expected? (Was: Re: btrfs based backup?) Christian Pernegger
2019-11-20 17:59     ` Oliver Freyermuth
2019-11-20 18:32     ` Chris Murphy
2019-11-21  1:51     ` Qu Wenruo
2019-11-21 16:44       ` Christian Pernegger
2019-11-21 19:37         ` Oliver Freyermuth
2019-11-21 20:30           ` Christian Pernegger
2019-11-21 21:34             ` Christian Pernegger
2019-11-21 22:39               ` Marc Joliet
2019-11-22  1:36                 ` Chris Murphy
2019-11-22 23:21                   ` Marc Joliet
2020-03-08 15:11                     ` Marc Joliet
2019-11-21 23:57             ` Oliver Freyermuth
2019-11-22 12:30               ` Christian Pernegger
2019-11-22 12:34                 ` Qu Wenruo
2019-11-22 14:43                   ` Christian Pernegger
2019-11-24  0:38                     ` Qu Wenruo
2019-11-24 19:09                       ` Christian Pernegger [this message]
2019-11-25  1:22                         ` Qu Wenruo
2019-11-21 22:22     ` Zygo Blaxell
2019-11-22  4:59       ` Zygo Blaxell
2019-11-22 14:36       ` Christian Pernegger
2019-11-23  3:49         ` Zygo Blaxell
2019-11-12 20:48 ` btrfs based backup? Michael
2019-11-13 15:04 ` Austin S. Hemmelgarn
2019-11-18 12:56 ` Ulli Horlacher

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='CAKbQEqGoJcP9isUVW479wJMeXa=nNPdU_buNVRFK07LOn8D6Vg@mail.gmail.com' \
    --to=pernegger@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.