Page MenuHomeFreeBSD

newsyslog(8): Disable compression by default.
ClosedPublic

Authored by delphij on Dec 23 2023, 7:00 AM.
Tags
None
Referenced Files
F132256038: D43169.id131803.diff
Wed, Oct 15, 6:04 AM
Unknown Object (File)
Tue, Oct 14, 8:42 AM
Unknown Object (File)
Tue, Oct 14, 8:16 AM
Unknown Object (File)
Fri, Oct 10, 3:27 AM
Unknown Object (File)
Sat, Oct 4, 8:56 PM
Unknown Object (File)
Fri, Oct 3, 1:47 PM
Unknown Object (File)
Thu, Oct 2, 1:04 PM
Unknown Object (File)
Thu, Sep 25, 9:55 AM

Details

Summary

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.

To reinstate the historical behavior, modify the newsyslog entry in /etc/crontab
to include "-c legacy".

MFC: never

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

delphij created this revision.
This revision is now accepted and ready to land.Dec 23 2023, 1:11 PM

I like this solution better than my proposed changes to newsyslog.conf

MFC: never

Oh sad, do I need to wait to a future 15-STABLE branch to get this awesome improvement? :-(
Do you think its a real blocker to MFC to STABLE 14 and be included in 14.1-RELEASE?

MFC: never

Oh sad, do I need to wait to a future 15-STABLE branch to get this awesome improvement? :-(
Do you think its a real blocker to MFC to STABLE 14 and be included in 14.1-RELEASE?

the commit says 1 week:

https://cgit.freebsd.org/src/commit/?id=906748d208d356a59538dc009a8ad5db040968d9

In D43169#983940, @dvl wrote:

MFC: never

Oh sad, do I need to wait to a future 15-STABLE branch to get this awesome improvement? :-(
Do you think its a real blocker to MFC to STABLE 14 and be included in 14.1-RELEASE?

the commit says 1 week:

https://cgit.freebsd.org/src/commit/?d=906748d208d356a59538dc009a8ad5db040968d9

Ah thats good :) then I can change the default my self to none ;).

This revision now requires review to proceed.Dec 25 2023, 7:59 AM

Limit diff scope to HEAD^..HEAD

This comment was removed by dvl.

I think it's kind of odd to do both the code change and the config file change. I would be inclined to drop the code change and just commit the change to newsyslog.conf? Or maybe have the installer write out a /etc/newsyslog.conf.d/nocompress file when installing to ZFS? The file would just contain <compress> none with a comment?

This revision was not accepted when it landed; it landed in state Needs Review.May 4 2025, 7:50 AM
This revision was automatically updated to reflect the committed changes.