[systemd-devel] [PATCH 2/2] compress: add benchmark-style test

Uoti Urpala uoti.urpala at pp1.inet.fi
Mon Jul 7 11:35:06 PDT 2014


On Sat, 2014-07-05 at 20:56 +0200, Zbigniew Jędrzejewski-Szmek wrote:
> This is useful to test the behaviour of the compressor for various buffer
> sizes.
> 
> Time is limited to a minute per compression, since otherwise, when LZ4
> takes more than a second which is necessary to reduce the noise, XZ
> takes more than 10 minutes.
> 
> % build/test-compress-benchmark (without time limit)
> XZ: compressed & decompressed 2535300963 bytes in 794.57s (3.04MiB/s), mean compresion 99.95%, skipped 3570 bytes
> LZ4: compressed & decompressed 2535303543 bytes in 1.56s (1550.07MiB/s), mean compresion 99.60%, skipped 990 bytes

Like your earlier comparison, this compares the wrong thing. If
compression speed matters more than best compression ratio, you
shouldn't use the default settings for xz. If you want to compare with
LZ4, this benchmark should at least compare the equivalent of "xz -0".




More information about the systemd-devel mailing list