Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: David Sterba <dave@jikos.cz>
To: linux-btrfs@vger.kernel.org
Subject: Re: compression ratio
Date: Mon, 20 Jun 2011 15:46:19 +0200	[thread overview]
Message-ID: <20110620134619.GG12709@twin.jikos.cz> (raw)
In-Reply-To: <4DFF2F29.4040108@corp.mail.ru>

Hi,

On Mon, Jun 20, 2011 at 03:29:45PM +0400, Proskurin Kirill wrote:
> What we have:
> SL6 - kernel 2.6.32-131.2.1.el6.x86_64
> mdadm RAID5 with 8 HDD - 27T partition.

btw .32 is very old

> Mount options is "noatime,noacl,compress-force"
> I use scribe daemon to copy log files from 200 hosts to that
> partition for stress testing.
> 
> But I found what compression ratio is really small.

It is and it will be due to nature of compression method used and the
constraints given:

* compression has to be fast, only real-time methods can be considered
  which have natural speed/ratio tradeoff
* you're using zlib (lzo was added recently), which is not that fast and
  does not have a great compression ratio
* there is maximum length of compressed data per round, it's hardcoded
  to 128KB by now
* zlib works in streaming mode, which compresses whole 128KB with
  dictionary reused
* lzo (as implemented in btrfs) however does not reuse dictionary and
  compresses each page separately; resulting size is even bigger than it
  would be when full 128KB were compressed

> Partition is full of regular log files - plain text. Most of them a
> big ones(10-20Gb) and they grow in realtime.

Realtime growth should not be a problem.

The situation can be slightly improved if we use a method capable of
streamed compression (ie. dictionary reuse). This is naturally supported
by eg. quicklz and snappy.
There are a few other realtime methods (fastlz, lzrw, lzjb) which may be
extended to support streaming compression, but with careful evaluation
of the result.


david

  reply	other threads:[~2011-06-20 13:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-20 11:29 compression ratio Proskurin Kirill
2011-06-20 13:46 ` David Sterba [this message]
2011-06-20 14:34 ` Helmut Hullen
2011-06-20 15:17   ` Proskurin Kirill
2011-06-20 15:22     ` Hugo Mills
2011-06-20 15:51       ` Mitch Harder

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=20110620134619.GG12709@twin.jikos.cz \
    --to=dave@jikos.cz \
    --cc=linux-btrfs@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox