All of lore.kernel.org
 help / color / mirror / Atom feed
From: Haomai Wang <haomai-p1s0O0zx/60@public.gmane.org>
To: Sage Weil <sage-BnTBU8nroG7k1uMJSBkQmQ@public.gmane.org>,
	Stefan Priebe - Profihost AG
	<s.priebe-2Lf/h1ldwEHR5kwTpVNS9A@public.gmane.org>
Cc: ceph-devel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	ceph-users-idqoXFIVOFJgJs9I8MT0rw@public.gmane.org
Subject: Re: ceph zstd not for bluestor due to performance reasons
Date: Thu, 26 Oct 2017 06:44:25 +0000	[thread overview]
Message-ID: <CACJqLyYsJ8WeWOdu4M2K7bnCbQ=fh8jQ=MP=msa64jo5=fic0w@mail.gmail.com> (raw)
In-Reply-To: <5cf6f721-05ea-4e38-a6b9-04cff5d6aad3-2Lf/h1ldwEHR5kwTpVNS9A@public.gmane.org>


[-- Attachment #1.1: Type: text/plain, Size: 3287 bytes --]

Stefan Priebe - Profihost AG <s.priebe-2Lf/h1ldwEHR5kwTpVNS9A@public.gmane.org>于2017年10月26日 周四17:06写道:

> Hi Sage,
>
> Am 25.10.2017 um 21:54 schrieb Sage Weil:
> > On Wed, 25 Oct 2017, Stefan Priebe - Profihost AG wrote:
> >> Hello,
> >>
> >> in the lumious release notes is stated that zstd is not supported by
> >> bluestor due to performance reason. I'm wondering why btrfs instead
> >> states that zstd is as fast as lz4 but compresses as good as zlib.
> >>
> >> Why is zlib than supported by bluestor? And why does btrfs / facebook
> >> behave different?
> >>
> >> "BlueStore supports inline compression using zlib, snappy, or LZ4. (Ceph
> >> also supports zstd for RGW compression but zstd is not recommended for
> >> BlueStore for performance reasons.)"
> >
> > zstd will work but in our testing the performance wasn't great for
> > bluestore in particular.  The problem was that for each compression run
> > there is a relatively high start-up cost initializing the zstd
> > context/state (IIRC a memset of a huge memory buffer) that dominated the
> > execution time... primarily because bluestore is generally compressing
> > pretty small chunks of data at a time, not big buffers or streams.
> >
> > Take a look at unittest_compression timings on compressing 16KB buffers
> > (smaller than bluestore needs usually, but illustrated of the problem):
> >
> > [ RUN      ] Compressor/CompressorTest.compress_16384/0
> > [plugin zlib (zlib/isal)]
> > [       OK ] Compressor/CompressorTest.compress_16384/0 (294 ms)
> > [ RUN      ] Compressor/CompressorTest.compress_16384/1
> > [plugin zlib (zlib/noisal)]
> > [       OK ] Compressor/CompressorTest.compress_16384/1 (1755 ms)
> > [ RUN      ] Compressor/CompressorTest.compress_16384/2
> > [plugin snappy (sna
> <https://maps.google.com/?q=y+(sna&entry=gmail&source=g>ppy)]
> > [       OK ] Compressor/CompressorTest.compress_16384/2 (169 ms)
> > [ RUN      ] Compressor/CompressorTest.compress_16384/3
> > [plugin zstd (zstd)]
> > [       OK ] Compressor/CompressorTest.compress_16384/3 (4528 ms)
> >
> > It's an order of magnitude slower than zlib or snappy, which probably
> > isn't acceptable--even if it is a bit smaller.
> >
> > We just updated to a newer zstd the other day but I haven't been paying
> > attention to the zstd code changes.  When I was working on this the
> plugin
> > was initially also misusing the zstd API, but it was also pointed out
> > that the size of the memset is dependent on the compression level.
> > Maybe a different (default) choice there woudl help.
> >
> > https://github.com/facebook/zstd/issues/408#issuecomment-252163241
>
> thanks for the fast reply. Btrfs uses a default compression level of 3
> but i think this is the default anyway.
>
> Does the zstd plugin of ceph already uses the mentioned
> ZSTD_resetCStream instead of creating and initializing a new one every
> time?
>
> So if performance matters ceph would recommand snappy?
>


in our test, lz4 is better than snappy

>
> Greets,
> Stefan
> _______________________________________________
> ceph-users mailing list
> ceph-users-idqoXFIVOFJgJs9I8MT0rw@public.gmane.org
> http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
>

[-- Attachment #1.2: Type: text/html, Size: 4385 bytes --]

[-- Attachment #2: Type: text/plain, Size: 178 bytes --]

_______________________________________________
ceph-users mailing list
ceph-users-idqoXFIVOFJgJs9I8MT0rw@public.gmane.org
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

  parent reply	other threads:[~2017-10-26  6:44 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <BD0427BB-F720-4746-82F9-E082D2396F56@profihost.ag>
2017-10-25 19:54 ` [ceph-users] ceph zstd not for bluestor due to performance reasons Sage Weil
     [not found]   ` <alpine.DEB.2.11.1710251940520.22592-ie3vfNGmdjePKud3HExfWg@public.gmane.org>
2017-10-26  6:06     ` Stefan Priebe - Profihost AG
     [not found]       ` <5cf6f721-05ea-4e38-a6b9-04cff5d6aad3-2Lf/h1ldwEHR5kwTpVNS9A@public.gmane.org>
2017-10-26  6:44         ` Haomai Wang [this message]
2017-10-26 11:59           ` [ceph-users] " Sage Weil
2017-10-26 11:58         ` Sage Weil
     [not found]           ` <alpine.DEB.2.11.1710261158070.22592-ie3vfNGmdjePKud3HExfWg@public.gmane.org>
2017-11-04 19:41             ` Stefan Priebe - Profihost AG
2017-11-04 20:10               ` [ceph-users] " Sage Weil
2017-11-04 20:23                 ` Stefan Priebe - Profihost AG
2017-11-04 21:21                   ` Stefan Priebe - Profihost AG
     [not found]                 ` <alpine.DEB.2.11.1711042010330.23234-qHenpvqtifaMSRpgCs4c+g@public.gmane.org>
2017-11-05  6:51                   ` Stefan Priebe - Profihost AG
2017-11-05  7:03                   ` Stefan Priebe - Profihost AG
2017-11-05  8:07                 ` [ceph-users] " Stefan Priebe - Profihost AG
2017-11-05  8:18                 ` Stefan Priebe - Profihost AG
2017-11-12 16:55     ` Sage Weil
     [not found]       ` <alpine.DEB.2.11.1711121651120.2819-qHenpvqtifaMSRpgCs4c+g@public.gmane.org>
2017-11-12 19:10         ` Stefan Priebe - Profihost AG

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='CACJqLyYsJ8WeWOdu4M2K7bnCbQ=fh8jQ=MP=msa64jo5=fic0w@mail.gmail.com' \
    --to=haomai-p1s0o0zx/60@public.gmane.org \
    --cc=ceph-devel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=ceph-users-idqoXFIVOFJgJs9I8MT0rw@public.gmane.org \
    --cc=s.priebe-2Lf/h1ldwEHR5kwTpVNS9A@public.gmane.org \
    --cc=sage-BnTBU8nroG7k1uMJSBkQmQ@public.gmane.org \
    /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.