From: Goffredo Baroncelli <kreijack@inwind.it>
To: Zygo Blaxell <ce3g8jdj@umail.furryterror.org>
Cc: linux-btrfs@vger.kernel.org, Michael <mclaud@roznica.com.ua>,
Hugo Mills <hugo@carfax.org.uk>,
Martin Svec <martin.svec@zoner.cz>,
Wang Yugui <wangyugui@e16-tech.com>,
Paul Jones <paul@pauljones.id.au>,
Adam Borowski <kilobyte@angband.pl>
Subject: Re: [RFC][PATCH V4] btrfs: preferred_metadata: preferred device for metadata
Date: Sun, 10 Jan 2021 20:55:36 +0100 [thread overview]
Message-ID: <7a9baa1b-8426-751a-cd73-47ad246a946f@inwind.it> (raw)
In-Reply-To: <20210109212332.GB31381@hungrycats.org>
On 1/9/21 10:23 PM, Zygo Blaxell wrote:
> On a loaded test server, I observed 90th percentile fsync times
> drop from 7 seconds without preferred_metadata to 0.7 seconds with
> preferred_metadata when all the metadata is on the SSDs. If some metadata
> ever lands on a spinner, we go back to almost 7 seconds latency again
> (it sometimes only gets up to 5 or 6 seconds, but it's still very bad).
> We lost our performance gain, so our test resulted in failure.
Wow, this is a very interesting information: an use case where there is a
10x increase of speed !
Could you share more detail about this server. With more data that supporting
this patch, we can convince David to include it.
[...]
>
> We could handle all these use cases with two bits:
>
> bit 0: 0 = prefer data, 1 = prefer metadata
> bit 1: 0 = allow other types, 1 = exclude other types
>
> which gives 4 encoded values:
>
> 0 = prefer data, allow metadata (default)
> 1 = prefer metadata, allow data (same as v4 patch)
> 2 = prefer data, disallow metadata
> 3 = prefer metadata, disallow data
What you are suggesting allows the maximum flexibility. However I still
fear that we are mixing two discussions that are unrelated except that
the solution *may* be the same:
1) the first discussion is related to the increasing of performance
because we put the metadata in the faster disks and the data in
the slower one.
2) the second discussion is how avoid that the chunk data consumes space of
the metadata.
Regarding 2), I think that a more generic approach is something like:
- don't allocate *data* chunk if the chunk free space is less than <X>
Where <X> is the maximum size of a metadata chunk (IIRC 1GB ?), eventually
multiplied by 2x or 3x.
Instead the metadata allocation policy is still constrained only to have
enough space. As further step (to allow a metadata balance command to success), we
could constraint the metadata allocation policy to allocate up to the half of the
available space ( or 1 GB, whichever is smaller)
Regarding 1) I prefer to leave the patch as simple as possible to increase
the likelihood of an inclusion. Eventually we can put further constraint after.
Anyway I am rebasing the patch to the latest kernel. Let me to check how complex
could be implement you algorithm (the two bits one).
BR
G.Baroncelli
--
gpg @keyserver.linux.it: Goffredo Baroncelli <kreijackATinwind.it>
Key fingerprint BBF5 1610 0B64 DAC6 5F7D 17B2 0EDA 9B37 8B82 E0B5
next prev parent reply other threads:[~2021-01-10 19:56 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-28 18:34 [RFC][PATCH V4] btrfs: preferred_metadata: preferred device for metadata Goffredo Baroncelli
2020-05-28 18:34 ` [PATCH 1/4] Add an ioctl to set/retrive the device properties Goffredo Baroncelli
2020-05-28 22:03 ` Hans van Kranenburg
2020-05-28 18:34 ` [PATCH 2/4] Add flags for dedicated metadata disks Goffredo Baroncelli
2020-05-28 18:34 ` [PATCH 3/4] Export dev_item.type in sysfs /sys/fs/btrfs/<uuid>/devinfo/<devid>/type Goffredo Baroncelli
2020-05-28 18:34 ` [PATCH 4/4] btrfs: add preferred_metadata mode Goffredo Baroncelli
2020-05-28 22:02 ` Hans van Kranenburg
2020-05-29 16:26 ` Goffredo Baroncelli
2020-05-28 21:59 ` [RFC][PATCH V4] btrfs: preferred_metadata: preferred device for metadata Hans van Kranenburg
2020-05-29 16:37 ` Goffredo Baroncelli
2020-05-30 11:44 ` Zygo Blaxell
2020-05-30 11:51 ` Goffredo Baroncelli
2021-01-08 1:05 ` Zygo Blaxell
2021-01-08 17:30 ` Goffredo Baroncelli
2021-01-08 17:43 ` BTRFS and *CACHE setup [was Re: [RFC][PATCH V4] btrfs: preferred_metadata: preferred device for metadata] Goffredo Baroncelli
2021-01-09 21:23 ` [RFC][PATCH V4] btrfs: preferred_metadata: preferred device for metadata Zygo Blaxell
2021-01-10 19:55 ` Goffredo Baroncelli [this message]
2021-01-16 0:25 ` Zygo Blaxell
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=7a9baa1b-8426-751a-cd73-47ad246a946f@inwind.it \
--to=kreijack@inwind.it \
--cc=ce3g8jdj@umail.furryterror.org \
--cc=hugo@carfax.org.uk \
--cc=kilobyte@angband.pl \
--cc=linux-btrfs@vger.kernel.org \
--cc=martin.svec@zoner.cz \
--cc=mclaud@roznica.com.ua \
--cc=paul@pauljones.id.au \
--cc=wangyugui@e16-tech.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