Bug#656060: logrotate: drop compress option

2020-08-12 Thread Richard Laager
retitle Move de facto "compress" default into logrotate.conf
submitter 656060 !

On Wed, 22 Aug 2018 15:24:18 +0200 Christian Göttsche
 wrote:
> I think extX is still the default for filesystems. So the compress
> option makes sense in the general case.

The request here is to:
1. Enable "compress" in logrotate.conf.
2. (Request that maintainers and/or NMU to) Drop "compress" in package's
   /etc/logrotate.d/* files.

Thus, compression would still be enabled by default. But this gives
users a _single_ place to toggle this globally, rather than needing to
toggle it in every package's /etc/logrotate.d/* configuration file.

The user might want to disable log compression for any number of
reasons; some examples being:
A) They have a filesystem doing copy-on-write snapshots.
B) They have tons of disk space and don't need the compression.
C) They want to make it easier to grep the files.

In the Root-on-ZFS HOWTOs that I maintain, I recommend people turn it
off for reason A.

At $DAYJOB, we use ext4 but turn off log compression for reason C (and
the implied B).

> p.s.: @Richard Laager: I quite did not get the point with the snapshots.

1. Write a log file to disk. Let's say that's 10 MB. It takes up 10 MB
   on disk.
2. Take a snapshot. With copy-on-write, this takes no new space.
3. Compress the log file. Let's say the compressed version takes 1 MB.

On a traditional filesystem, step 3 wrote 1 MB but freed 10 MB, for a
net savings of 9 MB.

On a copy-on-write filesystem with snapshots, step 3 wrote 1 MB and
freed 0 MB (as the original uncompressed file exists in one or more
snapshots), for a net _cost_ of 1 MB. This is the exact opposite of the
goal of enabling compression.

-- 
Richard



Bug#656060: logrotate: drop compress option

2018-08-22 Thread Christian Göttsche
Control: tags -1 wontfix
Control: retitle -1 logrotate: drop compress option

I think extX is still the default for filesystems. So the compress
option makes sense in the general case.

Best regards
   Christian Göttsche

p.s.: @Richard Laager: I quite did not get the point with the snapshots.