All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andre Glover <andre.glover@linux.intel.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: tom.zanussi@linux.intel.com, davem@davemloft.net,
	dave.jiang@intel.com,  fenghua.yu@intel.com,
	wajdi.k.feghali@intel.com, james.guilford@intel.com,
	 vinodh.gopal@intel.com, tony.luck@intel.com,
	linux-crypto@vger.kernel.org,  dmaengine@vger.kernel.org
Subject: Re: [PATCH 0/4] crypto: Add new compression modes for zlib and IAA
Date: Wed, 01 May 2024 15:07:15 -0700	[thread overview]
Message-ID: <8c687681e566ce6c11d3e71e728d12ac2ef08b07.camel@linux.intel.com> (raw)
In-Reply-To: <Zg+jMc/shIgX11lP@gondor.apana.org.au>

Hi Herbert,

On Fri, 2024-04-05 at 15:07 +0800, Herbert Xu wrote:
> On Thu, Mar 28, 2024 at 10:44:41AM -0700, Andre Glover wrote:
> > 
> > Below is a table showing the latency improvements with zlib,
> > between
> > zlib dynamic and zlib canned modes, and the compression ratio for 
> > each mode while using a set of 4300 4KB pages sampled from SPEC 
> > CPU17 workloads:
> > _________________________________________________________
> > > Zlib Level |  Canned Latency Gain  |    Comp Ratio    |
> > > ------------|-----------------------|------------------|
> > >            | compress | decompress | dynamic | canned |
> > > ____________|__________|____________|_________|________|
> > >     1      |    49%   |    29%     |  3.16   |  2.92  |
> > > ------------|----------|------------|---------|--------|
> > >     6        |    27%   |    28%     |  3.35   |  3.09  |
> > > ------------|----------|------------|---------|--------|
> > >     9      |    12%   |    29%     |  3.36   |  3.11  |
> > > ____________|__________|____________|_________|________|
> 
> So which kernel user (zswap I presume) is clamouring for this
> feature? We don't add new algorithms that have no in-kernel
> users.  So we need to be sure that the kernel user actually
> want this.
> 
> Thanks,

Hi Herbert,
We have recently submitted an RFC to zswap and zram maintainers and
users for by_n compression with Intel IAA [1] feedback. This work is in
support of efforts to swap in/out large and multi-sized folios. With
by_n compression, we have created a scheme that allows parallel IAA
compression and decompression operations on a single folio resulting in
performance gains. Currently the by_n scheme uses the canned mode
compression algorithm to perform the compression and decompression
operations. Using canned mode compression results in reduced
compression latency because the deflate header doesnt need to be
created dynamically, while also producing better ratio than Deflate
Fixed mode. We would appreciate your feedback on this scheme.

Here is data from the RFC showing a performance comparison for 64KB
folio swap in/out 
with zram on Sapphire Rapids, whose core frequency is fixed at 2500MHz:
+------------+-------------+---------+-------------+----------+-------+
|            | Compression | Decomp  | Compression | zram     | zram  |
| Algorithm  | latency     | latency | ratio       | write    | read  |
+------------+-------------+---------+-------------+----------+-------+
|            |       Median (ns)     |             |      Median (ns) |
+------------+-------------+---------+-------------+----------+-------+
|            |             |         |             |          |       |
| IAA by_1   | 34,493      | 20,038  | 2.93        | 40,130   | 24,478|
| IAA by_2   | 18,830      | 11,888  | 2.93        | 24,149   | 15,536|
| IAA by_4   | 11,364      |  8,146  | 2.90        | 16,735   | 11,469|
| IAA by_8   |  8,344      |  6,342  | 2.77        | 13,527   |  9,177|
| IAA by_16  |  8,837      |  6,549  | 2.33        | 15,309   |  9,547|
| IAA by_32  | 11,153      |  9,641  | 2.19        | 16,457   | 14,086|
| IAA by_64  | 18,272      | 16,696  | 1.96        | 24,294   | 20,048|
|            |             |         |             |          |       |
| lz4        | 139,190     | 33,687  | 2.40        | 144,940  | 37,312|
|            |             |         |             |          |       |
| lzo-rle    | 138,235     | 61,055  | 2.52        | 143,666  | 64,321|
|            |             |         |             |          |       |
| zstd       | 251,820     | 90,878  | 3.40        | 256,384  | 94,328|
+------------+-------------+---------+-------------+----------+-------+

[1]https://lore.kernel.org/all/cover.1714581792.git.andre.glover@linux.
intel.com/


      reply	other threads:[~2024-05-01 22:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-28 17:44 [PATCH 0/4] crypto: Add new compression modes for zlib and IAA Andre Glover
2024-03-28 17:44 ` [PATCH 1/4] crypto: Add 'canned' compression mode for zlib Andre Glover
2024-03-28 17:44 ` [PATCH 2/4] crypto: iaa - Add deflate-canned compression algorithm Andre Glover
2024-04-05 20:12   ` Tom Zanussi
2024-03-28 17:44 ` [PATCH 3/4] crypto: iaa - Add deflate-iaa-dynamic " Andre Glover
2024-03-28 17:44 ` [PATCH 4/4] crypto: iaa - Add Software Compression stats to IAA Compression Accelerator stats Andre Glover
2024-03-29  2:46 ` [PATCH 0/4] crypto: Add new compression modes for zlib and IAA Eric Biggers
2024-04-01 20:46   ` Andre Glover
2024-04-05  7:07 ` Herbert Xu
2024-05-01 22:07   ` Andre Glover [this message]

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=8c687681e566ce6c11d3e71e728d12ac2ef08b07.camel@linux.intel.com \
    --to=andre.glover@linux.intel.com \
    --cc=dave.jiang@intel.com \
    --cc=davem@davemloft.net \
    --cc=dmaengine@vger.kernel.org \
    --cc=fenghua.yu@intel.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=james.guilford@intel.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=tom.zanussi@linux.intel.com \
    --cc=tony.luck@intel.com \
    --cc=vinodh.gopal@intel.com \
    --cc=wajdi.k.feghali@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.