[systemd-devel] [PATCH 1/2] journal: add LZ4 as optional compressor
Michael Biebl
mbiebl at gmail.com
Tue Jul 8 04:31:01 PDT 2014
2014-07-08 12:22 GMT+02:00 Jon Severinsson <jon at severinsson.net>:
> Am 06.07.2014 21:47, schrieb Lennart Poettering:
>> BTW, have you checked whether reuseing the XZ context might make the XZ
>> more competitive?
>
> On Sun Jul 6 15:01:11 PDT 2014 Reindl Harald wrote:
>> please try a simple test compress 50 MB with XZ and GZ, LZO, LZ4
>> or BZIP2 - XZ is *magnitudes* slower in any case
>
> Actually it is not, or rather, it is only that if you want it to be that.
> I did a quick comparison using the systemd 214 tar (30 MiB):
> xz -0 was 28% slower than lz4c -hc, but the result was 19% smaller.
> xz -0 was even 44% faster than gzip -9, and the result was still 5% smaller.
>
>> XZ is the wrong compression for anything where user feedback in time matters
>
> No, xz -6 is the wrong compression *setting* for that use-case, but at a lower
> setting xz is quite suitable even for that.
>
>> even with no care about memory usage which also is part of the game finally
>
> xz -0 needs about 3 MiB for compression, hardly a prohibitive requirement.
>
For comparison, this is what I get when running it on my laptop for
210 (a tarball which I had lieing around):
xz
==
$ time xz -6 systemd_210.orig.tar
real 0m9.573s
user 0m9.520s
sys 0m0.044s
$ du -hs systemd_210.orig.tar.xz
2,6M systemd_210.orig.tar.xz
$ time xz -0 systemd_210.orig.tar
real 0m0.951s
user 0m0.948s
sys 0m0.004s
$ du -hs systemd_210.orig.tar.xz
3,8M systemd_210.orig.tar.xz
gzip
===
$ time gzip systemd_210.orig.tar
real 0m0.590s
user 0m0.580s
sys 0m0.012s
$ du -hs systemd_210.orig.tar.gz
4,1M systemd_210.orig.tar.gz
lz4
==
$ time lz4 systemd_210.orig.tar
Compressed filename will be : systemd_210.orig.tar.lz4
Compressed 28917760 bytes into 6667707 bytes ==> 23.06%
real 0m0.097s
user 0m0.080s
sys 0m0.012s
$ du -hs systemd_210.orig.tar.lz4
6,4M systemd_210.orig.tar.lz4
--
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
More information about the systemd-devel
mailing list