From: David Sterba <dsterba@suse.cz>
To: Daniel Vacek <neelx@suse.com>
Cc: Chris Mason <clm@fb.com>, Josef Bacik <josef@toxicpanda.com>,
David Sterba <dsterba@suse.com>, Nick Terrell <terrelln@fb.com>,
linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4] btrfs: zstd: enable negative compression levels mount option
Date: Wed, 5 Feb 2025 19:17:05 +0100 [thread overview]
Message-ID: <20250205181705.GL5777@twin.jikos.cz> (raw)
In-Reply-To: <20250130175821.1792279-1-neelx@suse.com>
On Thu, Jan 30, 2025 at 06:58:19PM +0100, Daniel Vacek wrote:
> This patch allows using the fast modes (negative compression levels) of zstd
> as a mount option.
>
> As per the results, the compression ratio is lower:
>
> for level in {-15..-1} 1 2 3; \
> do printf "level %3d\n" $level; \
> mount -o compress=zstd:$level /dev/sdb /mnt/test/; \
> grep sdb /proc/mounts; \
> cp -r /usr/bin /mnt/test/; sync; compsize /mnt/test/bin; \
> cp -r /usr/share/doc /mnt/test/; sync; compsize /mnt/test/doc; \
> cp enwik9 /mnt/test/; sync; compsize /mnt/test/enwik9; \
> cp linux-6.13.tar /mnt/test/; sync; compsize /mnt/test/linux-6.13.tar; \
> rm -r /mnt/test/{bin,doc,enwik9,linux-6.13.tar}; \
> umount /mnt/test/; \
> done |& tee results | \
> awk '/^level/{print}/^TOTAL/{print$3"\t"$2" |"}' | paste - - - - -
>
> 266M bin | 45M doc | 953M wiki | 1.4G source
> =============================+===============+===============+===============+
> level -15 180M 67% | 30M 68% | 694M 72% | 598M 40% |
> level -14 180M 67% | 30M 67% | 683M 71% | 581M 39% |
> level -13 177M 66% | 29M 66% | 671M 70% | 566M 38% |
> level -12 174M 65% | 29M 65% | 658M 69% | 548M 37% |
> level -11 174M 65% | 28M 64% | 645M 67% | 530M 35% |
> level -10 171M 64% | 28M 62% | 631M 66% | 512M 34% |
> level -9 165M 62% | 27M 61% | 615M 64% | 493M 33% |
> level -8 161M 60% | 27M 59% | 598M 62% | 475M 32% |
> level -7 155M 58% | 26M 58% | 582M 61% | 457M 30% |
> level -6 151M 56% | 25M 56% | 565M 59% | 437M 29% |
> level -5 145M 54% | 24M 55% | 545M 57% | 417M 28% |
> level -4 139M 52% | 23M 52% | 520M 54% | 391M 26% |
> level -3 135M 50% | 22M 50% | 495M 51% | 369M 24% |
> level -2 127M 47% | 22M 48% | 470M 49% | 349M 23% |
> level -1 120M 45% | 21M 47% | 452M 47% | 332M 22% |
> level 1 110M 41% | 17M 39% | 362M 38% | 290M 19% |
> level 2 106M 40% | 17M 38% | 349M 36% | 288M 19% |
> level 3 104M 39% | 16M 37% | 340M 35% | 276M 18% |
>
> Signed-off-by: Daniel Vacek <neelx@suse.com>
> ---
> Changes in v4:
> * Fix a bug with workspace lru_list.
> * Keep the levels down to -15 as agreed.
Thanks, I'll add the patch to for-next soon. The information about times
is only a changelog update so this can be done later once we have it.
next prev parent reply other threads:[~2025-02-05 18:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-30 17:58 Daniel Vacek
2025-02-05 18:17 ` David Sterba [this message]
2025-02-07 19:48 ` 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=20250205181705.GL5777@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=clm@fb.com \
--cc=dsterba@suse.com \
--cc=josef@toxicpanda.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=neelx@suse.com \
--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
all inboxes | Powered by JetHome®