From: "Holger Hoffstätte" <holger@applied-asynchrony.com>
To: Hans van Kranenburg <hans@knorrie.org>,
linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: Q: what exactly does SSD mode still do?
Date: Fri, 27 Mar 2020 11:29:52 +0100 [thread overview]
Message-ID: <116cfdc1-410a-5e09-2fb2-5da2c0fa428a@applied-asynchrony.com> (raw)
In-Reply-To: <6f49d2cc-c0e4-6d1d-f10d-834089698528@knorrie.org>
On 3/26/20 11:21 PM, Hans van Kranenburg wrote:
> Hi!
>
> On 3/26/20 7:16 PM, Holger Hoffstätte wrote:
>>
>> could someone explain what SSD mode *actually* still does? Not ssd_spread,
>> that's clear and unrelated. A recent commit removed the thread-offloaded
>> bio submission (avoiding context switches etc.)
>
> Can you share the commit id?
[1] followed by [2].
>> - which I thought was the
>> reason for SSD mode? - and looking through the code I couldn't find any
>> bits that helped clarify the difference.
>
> After the change in 2017 to change the extent allocator in ssd mode for
> data to behave like nossd already did before, there are two differences
> between ssd and nossd left:
>
> 1) This if statement in tree-log.c:
>
> cd354ad613a39 (Chris Mason 2011-10-20 15:45:37 -0400 3042)
> /* when we're on an ssd, just kick the log commit out */
> 0b246afa62b0c (Jeff Mahoney 2016-06-22 18:54:23 -0400 3043)
> if (!btrfs_test_opt(fs_info, SSD) &&
Ah yes, multi-writer batching - a common DB optimization technique.
I wonder how much of a difference that actually still makes, but
it sounds like a good idea.
> 2) Metadata "cluster allocator" write behavior:
>
> *empty_cluster = SZ_64K # nossd
> *empty_cluster = SZ_2M # ssd
>
> This happens in extent-tree.c.
2M used to be a common erase block size on SSDs. Or maybe it's just
a nice round number.. ¯\(ツ)/¯
cheers,
Holger
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=08635bae0b4ceb08fe4c156a11c83baec397d36d
[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ba8a9d07954397f0645cf62bcc1ef536e8e7ba24
next prev parent reply other threads:[~2020-03-27 10:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-26 18:16 Q: what exactly does SSD mode still do? Holger Hoffstätte
2020-03-26 22:21 ` Hans van Kranenburg
2020-03-27 10:29 ` Holger Hoffstätte [this message]
2020-03-28 19:35 ` Zygo Blaxell
2020-03-28 21:31 ` Hans van Kranenburg
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=116cfdc1-410a-5e09-2fb2-5da2c0fa428a@applied-asynchrony.com \
--to=holger@applied-asynchrony.com \
--cc=hans@knorrie.org \
--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;
as well as URLs for NNTP newsgroup(s).