All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josef Bacik <josef@toxicpanda.com>
To: Boris Burkov <boris@bur.io>
Cc: linux-btrfs@vger.kernel.org, kernel-team@fb.com
Subject: Re: [PATCH 1/8] btrfs-progs: document squotas
Date: Thu, 13 Jul 2023 14:02:20 -0400	[thread overview]
Message-ID: <20230713180220.GS207541@perftesting> (raw)
In-Reply-To: <8f44931fc285453f18956cc6601568816d7dcf69.1688599734.git.boris@bur.io>

On Wed, Jul 05, 2023 at 04:36:20PM -0700, Boris Burkov wrote:
> Document the new options in btrfs quota and mkfs.btrfs. Also, add a
> section to the long form qgroups document about squotas.
> 
> Signed-off-by: Boris Burkov <boris@bur.io>
> ---
>  Documentation/btrfs-quota.rst    |  7 +++-
>  Documentation/ch-quota-intro.rst | 59 ++++++++++++++++++++++++++++++++
>  Documentation/mkfs.btrfs.rst     |  6 ++++
>  3 files changed, 71 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/btrfs-quota.rst b/Documentation/btrfs-quota.rst
> index 830e9059a..d5e08330e 100644
> --- a/Documentation/btrfs-quota.rst
> +++ b/Documentation/btrfs-quota.rst
> @@ -47,9 +47,14 @@ SUBCOMMAND
>  disable <path>
>          Disable subvolume quota support for a filesystem.
>  
> -enable <path>
> +enable [options] <path>
>          Enable subvolume quota support for a filesystem.
>  
> +        ``Options``
> +
> +	-s|--simple
> +		use simple quotas (squotas) instead of qgroups
> +
>  rescan [options] <path>
>          Trash all qgroup numbers and scan the metadata again with the current config.
>  
> diff --git a/Documentation/ch-quota-intro.rst b/Documentation/ch-quota-intro.rst
> index 351772d10..a69e35c8a 100644
> --- a/Documentation/ch-quota-intro.rst
> +++ b/Documentation/ch-quota-intro.rst
> @@ -194,3 +194,62 @@ but some snapshots for backup purposes are being created by the system.  The
>  user's snapshots should be accounted to the user, not the system.  The solution
>  is similar to the one from section 'Accounting snapshots to the user', but do
>  not assign system snapshots to user's qgroup.
> +
> +Simple Quotas (squotas)
> +^^^^^^^^^^^^^^^^^^^^^^^
> +
> +As detailed in this document, qgroups can handle many complex extent sharing
> +and unsharing scenarios while maintaining an accurate count of exclusive and
> +shared usage. However, this flexibility comes at a cost: many of the
> +computations are global, in the sense that we must count up the number of trees
> +referring to an extent after its references change. This can slow down
> +transaction commits and lead to unacceptable latencies, especially in cases
> +where snapshots scale up.
> +
> +To work around this limitation of qgroups, btrfs also supports a second set of
> +quota semantics: simple quotas or squotas. Squotas fully share the qgroups API
> +and hierarchical model, but do not track shared vs. exclusive usage. Instead,
> +they account all extents to the subvolume that first allocated it. With a bit
> +of new bookkeeping, this allows all accounting decisions to be local to the
> +allocation or freeing operation that deals with the extents themselves, and
> +fully avoids the complex and costly back-reference resolutions.
> +
> +``Example``
> +
> +To illustrate the difference between squotas and qgroups, consider the following
> +basic example assuming a nodesize of 16KiB.
> +
> +1. create subvolume 256
> +1. rack up 1GiB of data and metadata usage in 256

Mis-numbered.  Thanks,

Josef


  reply	other threads:[~2023-07-13 18:02 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-05 23:36 [PATCH 0/8] btrfs-progs: simple quotas Boris Burkov
2023-07-05 23:36 ` [PATCH 1/8] btrfs-progs: document squotas Boris Burkov
2023-07-13 18:02   ` Josef Bacik [this message]
2023-07-05 23:36 ` [PATCH 2/8] btrfs-progs: simple quotas kernel definitions Boris Burkov
2023-07-13 20:19   ` Josef Bacik
2023-07-05 23:36 ` [PATCH 3/8] btrfs-progs: simple quotas dump commands Boris Burkov
2023-07-13 20:20   ` Josef Bacik
2023-07-05 23:36 ` [PATCH 4/8] btrfs-progs: simple quotas fsck Boris Burkov
2023-07-13 20:22   ` Josef Bacik
2023-07-05 23:36 ` [PATCH 5/8] btrfs-progs: simple quotas mkfs Boris Burkov
2023-07-13 20:23   ` Josef Bacik
2023-07-05 23:36 ` [PATCH 6/8] btrfs-progs: simple quotas btrfstune Boris Burkov
2023-07-13 20:25   ` Josef Bacik
2023-07-05 23:36 ` [PATCH 7/8] btrfs-progs: simple quotas enable cmd Boris Burkov
2023-07-13 20:26   ` Josef Bacik
2023-07-05 23:36 ` [PATCH 8/8] btrfs-progs: tree-checker: handle owner ref items Boris Burkov
2023-07-13 20:28   ` Josef Bacik

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=20230713180220.GS207541@perftesting \
    --to=josef@toxicpanda.com \
    --cc=boris@bur.io \
    --cc=kernel-team@fb.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.