diff options
| author | Xin LI <delphij@FreeBSD.org> | 2023-12-23 06:46:33 +0000 |
|---|---|---|
| committer | Xin LI <delphij@FreeBSD.org> | 2023-12-23 06:46:33 +0000 |
| commit | 906748d208d356a59538dc009a8ad5db040968d9 (patch) | |
| tree | d49bf7437a7f00d6f1556c2533e1c1cb3f09d701 /usr.sbin/newsyslog/newsyslog.conf.5 | |
| parent | 8c86b981240324c1daaa387d4d3f8e3e53db3d2e (diff) | |
newsyslog(8): Add option to globally override compression method.
Historically, newsyslog compressed rotated log files to save disk space.
This was useful in the early days. However, with modern file systems like
ZFS offering native compression, and with the availability of larger hard
drives, the benefits of additional compression have become less significant.
This is particularly true considering the inconvenience of decompressing
log files when searching for specific patterns.
Additionally, the original implementation of compression methods was not
future-proof. As a result, we have redefined the J, X, Y, Z flags to
signify "treat the file as compressible" rather than "compress the file
with that specific method."
A new command-line option, -c, has been introduced to allow overriding
these settings in a more future-proof way. The available choices are:
* none - do not compress, regardless of flag.
* legacy - historical behavior: J=bzip2, X=xz, Y=zstd, Z=gzip.
* bzip2, xz, zstd, gzip - apply the specified compression method.
Currently, the default is set to 'legacy' to preserve historical behavior.
However, our intention is to change this default to 'none' in FreeBSD 15.0.
Additionally, this update changes the default settings for zstd to use
multithreading and long-range options, better aligning with its intended
use.
Inspired by D42961 .
Reviewed by: debdrup (earlier version, mdoc(7))
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D43165
Diffstat (limited to 'usr.sbin/newsyslog/newsyslog.conf.5')
| -rw-r--r-- | usr.sbin/newsyslog/newsyslog.conf.5 | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/usr.sbin/newsyslog/newsyslog.conf.5 b/usr.sbin/newsyslog/newsyslog.conf.5 index 3ca833f90196..a53af5b38319 100644 --- a/usr.sbin/newsyslog/newsyslog.conf.5 +++ b/usr.sbin/newsyslog/newsyslog.conf.5 @@ -18,7 +18,7 @@ .\" the suitability of this software for any purpose. It is .\" provided "as is" without express or implied warranty. .\" -.Dd February 26, 2021 +.Dd December 22, 2023 .Dt NEWSYSLOG.CONF 5 .Os .Sh NAME @@ -308,8 +308,11 @@ for details on syntax and matching rules. .It Cm J indicates that .Xr newsyslog 8 -should attempt to save disk space by compressing the rotated -log file using +should consider the rotated log file as compressible. +In legacy mode, +this also tells +.Xr newsyslog 8 +to use .Xr bzip2 1 . .It Cm N indicates that there is no process which needs to be signaled @@ -337,20 +340,29 @@ be a negative value to distinguish it from a process ID. .It Cm X indicates that .Xr newsyslog 8 -should attempt to save disk space by compressing the rotated -log file using +should consider the rotated log file as compressible. +In legacy mode, +this also tells +.Xr newsyslog 8 +to use .Xr xz 1 . .It Cm Y indicates that .Xr newsyslog 8 -should attempt to save disk space by compressing the rotated -log file using +should consider the rotated log file as compressible. +In legacy mode, +this also tells +.Xr newsyslog 8 +to use .Xr zstd 1 . .It Cm Z indicates that .Xr newsyslog 8 -should attempt to save disk space by compressing the rotated -log file using +should consider the rotated log file as compressible. +In legacy mode, +this also tells +.Xr newsyslog 8 +to use .Xr gzip 1 . .It Fl a minus sign will not cause any special processing, but it |
