[systemd-devel] CompressThreshold= Option

Alex Gartrell agartrell at fb.com
Sat Feb 24 16:17:55 UTC 2018


Hello,

I was looking to add a compression threshold flag to journald to see if we can eek out some additional compression for free-ish (generally speaking, the verbosity of journald logs prevents us from using them super broadly, so far). It's a pretty straightforward change and I have a patch ready, but I just wanted to clarify one design thing to save the PR discussion.

Right now, Compress= is a global setting, in contrast to max file size, etc. which are in JournalMetrics and are Runtime or System specific. I think it could be reasonable to make CompressThreshold= output-specific in addition to Compress=.

I'm wondering which of these choices is the least upsetting:
1. Make CompressThreshold= global in the same way that Compress= and Seal= are. Add another parameter to the journal_file_open functions (compression_threshold)
2. Make CompressThreshold= file-specific and just put it into JournalMetrics.
3. Make Compress=, Seal= part of the JournalMetrics struct and add CompressThreshold= there. Each of these would get Runtime/System prefixes. We'd also need to support the non-prefixed thing to stay backward compatible (so you could specify Compress=no, RuntimeCompress=yes and get only runtime compression).
4. Do 1, but move some of these flags into yet-another options struct. (This makes sense if I've misunderstood the intent of JournalMetrics).

Thanks!

--
Alex Gartrell <agartrell at fb.com>




More information about the systemd-devel mailing list