public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Minchan Kim <minchan@kernel.org>
To: Adam Borowski <kilobyte@angband.pl>
Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org,
	Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Subject: Re: [PATCH 2/2] zram: remove zlib from the list of recommended algorithms
Date: Thu, 14 Sep 2017 17:02:49 +0900	[thread overview]
Message-ID: <20170914080249.GB5533@bbox> (raw)
In-Reply-To: <20170913103853.ko3iywrihcgtoiuf@angband.pl>

On Wed, Sep 13, 2017 at 12:38:56PM +0200, Adam Borowski wrote:
> On Wed, Sep 13, 2017 at 04:12:46PM +0900, Minchan Kim wrote:
> > On Tue, Sep 12, 2017 at 02:00:05PM +0900, Sergey Senozhatsky wrote:
> > > ZSTD tends to outperform deflate/inflate, thus we remove
> > > zlib from the list of recommended algorithms and recommend
> > > zstd instead.
> >  
> > I did test with my sample data and compared zstd with deflate.
> > zstd's compress ratio is lower a little bit but compression
> > speed is much faster 3 times more and decompress speed is too
> > 2 times more. With different data, it is different but overall,
> > zstd would be better for speed at the cost of a little lower compress
> > ratio(about 5%) so I believe it's worth to replace deflate.
> 
> Both zlib and zstd have the compression level adjustable, zstd in a far
> greater range (from lzo-like at lowest levels to mid-range lzma at the
> highest).  Thus, any such comparison needs to mention the used level.
> Ie, if you selected a setting where speed is same, compression ratio
> will be a lot better.

Unfortunately, it seems crypto doesn't support configurable level yet
so when I read the source properly, zstd default level is 3 while
deflate is 6.

> 
> For compressing RAM it's reasonable to keep to fastest levels, and a
> non-adjustable level reduces complexity, but if your use case wants high but
> slow compression, now is a good time to mention this.

What I expect zstd is same comp ratio with zlib but much faster speed.
And lastly, predefined dictionary for 4K comp/decomp. :)

Thanks.

  reply	other threads:[~2017-09-14  8:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-12  5:00 [PATCH 1/2] zram: add zstd to the supported algorithms list Sergey Senozhatsky
2017-09-12  5:00 ` [PATCH 2/2] zram: remove zlib from the list of recommended algorithms Sergey Senozhatsky
2017-09-12  6:49   ` Minchan Kim
2017-09-12  7:00     ` Sergey Senozhatsky
2017-09-13  7:12   ` Minchan Kim
2017-09-13  7:16     ` Sergey Senozhatsky
2017-09-13 10:38     ` Adam Borowski
2017-09-14  8:02       ` Minchan Kim [this message]
2017-09-13  6:58 ` [PATCH 1/2] zram: add zstd to the supported algorithms list Minchan Kim

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=20170914080249.GB5533@bbox \
    --to=minchan@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=kilobyte@angband.pl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sergey.senozhatsky.work@gmail.com \
    --cc=sergey.senozhatsky@gmail.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