From: Gao Xiang <hsiangkao@linux.alibaba.com>
To: dsterba@suse.cz
Cc: Eric Biggers <ebiggers@kernel.org>,
Herbert Xu <herbert@gondor.apana.org.au>,
"Cabiddu, Giovanni" <giovanni.cabiddu@intel.com>,
Josef Bacik <josef@toxicpanda.com>, "clm@fb.com" <clm@fb.com>,
"dsterba@suse.com" <dsterba@suse.com>,
"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>,
"linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>,
qat-linux <qat-linux@intel.com>, "embg@meta.com" <embg@meta.com>,
"Collet, Yann" <cyan@meta.com>,
"Will, Brian" <brian.will@intel.com>,
"Li, Weigang" <weigang.li@intel.com>
Subject: Re: [RFC PATCH 6/6] btrfs: zlib: add support for zlib-deflate through acomp
Date: Tue, 27 May 2025 20:08:30 +0800 [thread overview]
Message-ID: <b3abd55d-8713-4807-b736-00eb99dad610@linux.alibaba.com> (raw)
In-Reply-To: <20250527111731.GC4037@suse.cz>
Hi David,
On 2025/5/27 19:17, David Sterba wrote:
> On Tue, May 27, 2025 at 10:32:00AM +0800, Gao Xiang wrote:
>>
>>
>> On 2025/5/8 12:19, Eric Biggers wrote:
>>
>> ...
>>
>>>
>>> BTW, I also have to wonder why this patchset is proposing accelerating zlib
>>> instead of Zstandard. Zstandard is a much more modern algorithm.
>>
>> I think simply because QAT doesn't support the Zstandard native offload.
>> At least, for Intel Xeon Sapphire Rapids processors (it seems to have
>> built-in QAT 4xxx), only LZ4 and deflate-family are natively supported.
>>
>> I've confirmed that SPR QAT deflate hardware decompresion already surpasses
>> LZ4 software decompression on our cloud server setup, which is useful since
>> it greatly improves decompression performance (even compared to software LZ4)
>> and saves CPU overhead completely.
>
> Does this measure the overall time of decompression (including the setup
> steps, like the scatter/gather or similar, allocating requests, waiting
> etc)?. Comparing that to the library calls plus the input page iteration.
> I haven't found any public benchmarks with the QAT enabled compression.
> I'm interested how it's benchmarked because we'v had people pointing out
> that LZ4 itself is very fast, but when the overhead is taken into
> account it's reducing the overall performance. Thanks.
Yes, EROFS already supports QAT end-to-end since the ongoing Linux 6.16:
Processor: Intel(R) Xeon(R) Platinum 8475B (192 cores)
Memory: 512 GiB
Dataset: enwik9
Test command: fio --filename=enwik9 -rw=read -readonly -bs=4k -ioengine=psync -name=job1
1) $ mkfs.erofs -zdeflate -C1048576 enwik9.dfl enwik9
$ echo qat_deflate > /sys/fs/erofs/accel
READ: bw=662MiB/s (694MB/s), 662MiB/s-662MiB/s (694MB/s-694MB/s), io=954MiB (1000MB), run=1440-1440msec
$ echo > /sys/fs/erofs/accel
READ: bw=381MiB/s (400MB/s), 381MiB/s-381MiB/s (400MB/s-400MB/s), io=954MiB (1000MB), run=2500-2500msec
2) $ mkfs.erofs -zlz4hc -C1048576 enwik9.lz4 enwik9
READ: bw=541MiB/s (568MB/s), 541MiB/s-541MiB/s (568MB/s-568MB/s), io=954MiB (1000MB), run=1762-1762msec
However, my current test case that the cloud disk is slow (I use the cheapest
cloud disk setup because it will be used for rootfs and container images), so
the overall e2e is I/O bound instead of CPU bound, so in that case since
deflate can compress better (so can save more disk I/Os), it can surpass the
LZ4 one (because even LZ4 is faster but cost more I/Os due to large image).
If the storage/CPU combination is CPU bound, I think it could have different
results anyway.
Thanks,
Gao Xiang
next prev parent reply other threads:[~2025-05-27 12:08 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-26 10:54 [RFC PATCH 0/6] btrfs: offload zlib-deflate to accelerators Giovanni Cabiddu
2024-04-26 10:54 ` [RFC PATCH 1/6] Revert "crypto: testmgr - Remove zlib-deflate" Giovanni Cabiddu
2024-04-26 10:54 ` [RFC PATCH 2/6] Revert "crypto: deflate " Giovanni Cabiddu
2024-04-26 10:54 ` [RFC PATCH 3/6] Revert "crypto: qat " Giovanni Cabiddu
2024-04-26 10:54 ` [RFC PATCH 4/6] Revert "crypto: qat - remove unused macros in qat_comp_alg.c" Giovanni Cabiddu
2024-04-26 10:54 ` [RFC PATCH 5/6] crypto: qat - change compressor settings for QAT GEN4 Giovanni Cabiddu
2024-04-26 10:54 ` [RFC PATCH 6/6] btrfs: zlib: add support for zlib-deflate through acomp Giovanni Cabiddu
2024-04-29 13:56 ` Josef Bacik
2024-04-29 15:21 ` Cabiddu, Giovanni
2024-04-29 15:44 ` David Sterba
2024-05-03 10:04 ` Herbert Xu
2024-04-29 15:41 ` David Sterba
2025-05-06 15:38 ` Cabiddu, Giovanni
2025-05-07 2:23 ` Herbert Xu
2025-05-07 12:17 ` David Sterba
2025-05-08 4:19 ` Eric Biggers
2025-05-12 17:52 ` David Sterba
2025-05-27 2:32 ` Gao Xiang
2025-05-27 2:45 ` Gao Xiang
2025-05-27 11:17 ` David Sterba
2025-05-27 12:08 ` Gao Xiang [this message]
2025-05-07 12:43 ` David Sterba
2025-05-07 13:12 ` Cabiddu, Giovanni
2024-04-29 15:57 ` 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=b3abd55d-8713-4807-b736-00eb99dad610@linux.alibaba.com \
--to=hsiangkao@linux.alibaba.com \
--cc=brian.will@intel.com \
--cc=clm@fb.com \
--cc=cyan@meta.com \
--cc=dsterba@suse.com \
--cc=dsterba@suse.cz \
--cc=ebiggers@kernel.org \
--cc=embg@meta.com \
--cc=giovanni.cabiddu@intel.com \
--cc=herbert@gondor.apana.org.au \
--cc=josef@toxicpanda.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=qat-linux@intel.com \
--cc=weigang.li@intel.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