linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Austin S. Hemmelgarn" <ahferroin7@gmail.com>
To: Adam Borowski <kilobyte@angband.pl>,
	linux-btrfs@vger.kernel.org, Nick Terrell <terrelln@fb.com>,
	David Sterba <dsterba@suse.cz>
Subject: Re: [RFC 0/3]: settable compression level for zstd
Date: Fri, 15 Sep 2017 13:14:09 -0400	[thread overview]
Message-ID: <883c9cbe-4b72-f355-1a1c-df5dbbde7597@gmail.com> (raw)
In-Reply-To: <20170915153457.dt5zjcbrryn3qj3t@angband.pl>

On 2017-09-15 11:34, Adam Borowski wrote:
> Hi!
> Here's a patch set that allows changing the compression level for zstd,
> currently at mount time only.  I've played with it for a month, so despite
> being a quick hack, it's reasonably well tested.  Tested on 4.13 +
> btrfs-for-4.14 only, though -- I've booted 11th-day-of-merge-window only an
> hour ago on one machine, no explosions yet.
> 
> As a quick hack, it doesn't conserve memory as it should: all workspace
> allocations assume level 15 and waste space otherwise.
> 
> Because of an (easily changeable) quirk of compression level encoding, the
> max is set at 15, but I guess higher levels are pointless for 128KB blocks.
> Nick and co can tell us more -- for me zstd is mostly a black box so it's
> you who knows anything about tuning it.
I've got limited knowledge of the zstandard algorithm, but based on my 
(probably incomplete and possibly inaccurate) analysis of the code in 
the kernel, I think this assessment is correct.  At a minimum, higher 
levels are likely to provide no benefit considering how slow things get 
(even the speed of level 15 means it's probably not going to be used much).
> 
> There are three patches:
> * [David Sterba] btrfs: allow to set compression level for zlib
>    Unmodified version of the patch from Jul 24, I'm re-sending it for
>    convenience.
> * btrfs: allow setting zlib compression level via :9
>    Some bikeshedding: it looks like Chris Mason also favours zlib:9 over
>    zlib9 as the former is more readable.  If you disagree... well, it's up
>    to you to decide anyway.  This patch accepts both syntaxes.
On this in particular, I think there _might_ be a potential issue with 
option parsing, I'd advocate something less likely to be a metacharacter 
(like '-') instead of ':', but I do agree that it's a bit more concise 
when the algorithm and level are separate.
> * btrfs: allow setting zstd level


  parent reply	other threads:[~2017-09-15 17:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-15 15:34 [RFC 0/3]: settable compression level for zstd Adam Borowski
2017-09-15 15:36 ` [RFC PATCH 1/3] btrfs: allow to set compression level for zlib Adam Borowski
2017-09-15 15:36   ` [RFC PATCH 2/3] btrfs: allow setting zlib compression level via :9 Adam Borowski
2017-09-15 15:36   ` [RFC PATCH 3/3] btrfs: allow setting zstd level Adam Borowski
2017-09-15 17:14 ` Austin S. Hemmelgarn [this message]
2017-09-25 16:22 ` [RFC 0/3]: settable compression level for zstd David Sterba
2017-10-19 14:05 ` David Sterba

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=883c9cbe-4b72-f355-1a1c-df5dbbde7597@gmail.com \
    --to=ahferroin7@gmail.com \
    --cc=dsterba@suse.cz \
    --cc=kilobyte@angband.pl \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=terrelln@fb.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;
as well as URLs for NNTP newsgroup(s).