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

Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl
Mon Jul 7 12:40:00 PDT 2014


On Mon, Jul 07, 2014 at 09:35:06PM +0300, Uoti Urpala wrote:
> 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".
The comparison should be done for whatever setting is used in journald
and/or coredump. Since they both use the default preset now, that is what
I'm comparing. It *is* likely that it should be changed, but that should
happen in a separate patch anyway.

Zbyszek



More information about the systemd-devel mailing list