All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wang Shilong <wangshilong1991@gmail.com>
To: Tomasz Chmielewski <tch@virtall.com>
Cc: Austin S Hemmelgarn <ahferroin7@gmail.com>,
	linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: compression disk space saving - what are your results?
Date: Wed, 2 Dec 2015 22:03:25 +0800	[thread overview]
Message-ID: <CAP9B-Qm8gQdCZzQuMeZWCY=ni-xEBOueZpFPrYHMpcwdjtVC5Q@mail.gmail.com> (raw)
In-Reply-To: <18fb40ae4411f31353e06bf99ee12c8a@admin.virtall.com>

On Wed, Dec 2, 2015 at 9:53 PM, Tomasz Chmielewski <tch@virtall.com> wrote:
> On 2015-12-02 22:03, Austin S Hemmelgarn wrote:
>
>>>  From these numbers (124 GB used where data size is 153 GB), it appears
>>> that we save around 20% with zlib compression enabled.
>>> Is 20% reasonable saving for zlib? Typically text compresses much better
>>> with that algorithm, although I understand that we have several
>>> limitations when applying that on a filesystem level.
>>
>>
>> This is actually an excellent question.  A couple of things to note
>> before I share what I've seen:
>> 1. Text compresses better with any compression algorithm.  It is by
>> nature highly patterned and moderately redundant data, which is what
>> benefits the most from compression.
>
>
> It looks that compress=zlib does not compress very well. Following Duncan's
> suggestion, I've changed it to compress-force=zlib, and re-copied the data
> to make sure the file are compressed.
>
> Compression ratio is much much better now (on a slightly changed data set):
>
> # df -h
> /dev/xvdb       200G   24G  176G  12% /var/log/remote
>
>
> # du -sh /var/log/remote/
> 138G    /var/log/remote/
>
>
> So, 138 GB files use just 24 GB on disk - nice!
>
> However, I would still expect that compress=zlib has almost the same effect
> as compress-force=zlib, for 100% text files/logs.

btw, what is your kernel version? there was a bug that detected inode
compression
ration wrong.

http://git.kernel.org/cgit/linux/kernel/git/mason/linux-btrfs.git/commit/?id=68bb462d42a963169bf7acbe106aae08c17129a5
http://git.kernel.org/cgit/linux/kernel/git/mason/linux-btrfs.git/commit/?id=4bcbb33255131adbe481c0467df26d654ce3bc78

Regards,
Shilong

>
>
> Tomasz Chmielewski
> http://wpkg.org
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2015-12-02 14:03 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-02  9:46 compression disk space saving - what are your results? Tomasz Chmielewski
2015-12-02 10:36 ` Duncan
2015-12-02 14:03   ` Imran Geriskovan
2015-12-02 14:39     ` Austin S Hemmelgarn
2015-12-03  6:29       ` Duncan
2015-12-03 12:09         ` Imran Geriskovan
2015-12-04 12:33           ` Austin S Hemmelgarn
2015-12-04 12:37         ` Austin S Hemmelgarn
2015-12-02 13:03 ` Austin S Hemmelgarn
2015-12-02 13:53   ` Tomasz Chmielewski
2015-12-02 14:03     ` Wang Shilong [this message]
2015-12-02 14:06       ` Tomasz Chmielewski
2015-12-02 14:49     ` Austin S Hemmelgarn
2015-12-22  3:55       ` Kai Krakow
2015-12-22 17:25         ` james northrup
2015-12-05 13:37 ` Marc Joliet
2015-12-05 14:11   ` Marc Joliet
2015-12-06  4:21     ` Duncan
2015-12-06 11:26       ` Marc Joliet
2015-12-05 19:38 ` guido_kuenne

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='CAP9B-Qm8gQdCZzQuMeZWCY=ni-xEBOueZpFPrYHMpcwdjtVC5Q@mail.gmail.com' \
    --to=wangshilong1991@gmail.com \
    --cc=ahferroin7@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=tch@virtall.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.