[systemd-devel] [systemd-commits] 14 commits - configure.ac Makefile.am Makefile-man.am man/coredump.conf.xml src/core src/journal src/shared

Lennart Poettering lennart at poettering.net
Fri Jun 27 10:44:58 PDT 2014


On Fri, 27.06.14 16:17, Zbigniew Jędrzejewski-Szmek (zbyszek at in.waw.pl) wrote:

> 
> On Fri, Jun 27, 2014 at 03:22:50PM +0200, Lennart Poettering wrote:
> > On Wed, 25.06.14 22:49, Zbigniew Jędrzejewski-Szmek (zbyszek at kemper.freedesktop.org) wrote:
> > 
> > > +      <varlistentry>
> > > +        <term><varname>Compression=</varname></term>
> > > +
> > > +        <listitem><para>Controls the type of compression for external
> > > +        storage. One of <literal>xz</literal> or
> > > +        <literal>none</literal>.</para>
> > > +        </listitem>
> > > +      </varlistentry>
> > > +
> > > +      <varlistentry>
> > > +        <term><varname>CompressionLevel=</varname></term>
> > > +
> > > +        <listitem><para>Controls the level of compression for external
> > > +        storage. An integer between 0 and 9. See
> > > +        <citerefentry><refentrytitle>xz</refentrytitle><manvolnum>1</manvolnum></citerefentry>
> > > +        for more details.</para></listitem>
> > > +      </varlistentry>
> > 
> > Hmm. Do we really want CompressionLevel= as an integer here? It sounds
> > awfully low-level and implementation-detailish to me. I#d rather keep
> > this as close and simple as the compression settings in journald.conf:
> > i.e. a single boolean Compress=, and that's it. The fact that XZ is
> > mostly an implementation detail I think, and compression levels should
> > just be chosen right.
> Hm, I did some testing, and I'm not convinced that XZ is the right
> compressor for the job.
> 
> First I generated a 1GB coredump of Python with random patterns. It

"Random" patterns? Completely random? Any compressor would fare bad there...

> takes 20 minutes (!)  to compress with XZ 9, and 11.5 min with XZ 6,
> ~1 min with gzip 6, the same with gzip 9. The gain from XZ compression
> is an increase in compression: gzip saves 7%, XZ saves 12%.
> 
> Second I generated a second 1GB coredump, highly compressible.
> XZ 9 → 99.8%, 120 s; XZ 6 → 99.8%, 120 s;
> gzip 6 → 99.6%, 11 s; gzip 9 → 99.6%, 13 s;
> 
> So the tradeoffs seem all wrong.

Hmm, so far we tried to settle on xz for everything. The journal file
format is open enough so that we could switch to something different, if
there's a strong case for it.

> > Zbigniew, would you be terribly disappointed if I simplify this and
> > bring this more in line with journald.conf?
> Yeah, go ahead.

OK, done. I have now simplified this, there's now only a single
"Compress=" boolean configuration, similar to journald.conf. 

I also fixed some bug where the uncompressed coredump would always stay
around in the temporary file. And I added size-based vacuuming. This all
together makese this feel quite robust and complete now.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list