Discussion:
CompressThreshold= Option
(too old to reply)
Alex Gartrell
2018-02-24 16:17:55 UTC
Permalink
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 <***@fb.com>
Lennart Poettering
2018-02-26 15:19:05 UTC
Permalink
Post by Alex Gartrell
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=.
1. Make CompressThreshold= global in the same way that Compress= and
Seal= are. Add another parameter to the journal_file_open functions
(compression_threshold)
Yeah, sounds good to me.

BTW, I'd probably name it CompressThresholdBytes= or so, to indicate
the unit is bytes.

Lennart
--
Lennart Poettering, Red Hat
Loading...