From nobody Sat Dec 23 08:51:47 2023 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Sxyb31zT9z54CsY for ; Sat, 23 Dec 2023 08:51:59 +0000 (UTC) (envelope-from SRS0=2GHx=IC=quip.cz=000.fbsd@elsa.codelab.cz) Received: from elsa.codelab.cz (elsa.codelab.cz [94.124.105.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Sxyb25SJTz4KLg for ; Sat, 23 Dec 2023 08:51:58 +0000 (UTC) (envelope-from SRS0=2GHx=IC=quip.cz=000.fbsd@elsa.codelab.cz) Authentication-Results: mx1.freebsd.org; none Received: from elsa.codelab.cz (localhost [127.0.0.1]) by elsa.codelab.cz (Postfix) with ESMTP id C0542D7887; Sat, 23 Dec 2023 09:51:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quip.cz; s=private; t=1703321509; bh=E5cgzB0MouO+lQusdpYucicErzQsk75n/j+VFS0C/rY=; h=Date:Subject:To:References:From:In-Reply-To; b=17eBae6RReNNvZuzgIs0DwuuxTGSxZYt9H0Aln8N0qN/qProvS5VsxZ29lX7lUPOc 1QNLVasVrrVDhRLAnDrkMJIIVg16IH+eDgblHXz0ByXEahMspWYbMlntr4FvV0KZdx z6fjb+JQOgTysPHCyneAMJOKkQ/je0obO8QjzJDw= Received: from [192.168.145.49] (ip-89-177-27-225.bb.vodafone.cz [89.177.27.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by elsa.codelab.cz (Postfix) with ESMTPSA id 45B48D7884; Sat, 23 Dec 2023 09:51:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quip.cz; s=private; t=1703321508; bh=E5cgzB0MouO+lQusdpYucicErzQsk75n/j+VFS0C/rY=; h=Date:Subject:To:References:From:In-Reply-To; b=nwnkOhiZzaAGxA2VVVLbn1P+uss3t8o/YlIbCn7u9u61OwwvLMuUyW8vtHtF722wy C5Mmr7uC3+1ciF2itH3AJor6XvqrQVRcoMGB/7YaNbWU/tjMcAm/sn2tuMg/COkdwa n7QFvLzPPnd71gXLT3krygYusNzqfzKw6K9tZcBI= Message-ID: <8a585a40-0e78-4dbd-9701-aa0926ccde19@quip.cz> Date: Sat, 23 Dec 2023 09:51:47 +0100 List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Proposal: Disable compression of newsyslog by default To: d@delphij.net, freebsd-current@freebsd.org References: Content-Language: en-US From: Miroslav Lachman <000.fbsd@quip.cz> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:42000, ipnet:94.124.104.0/21, country:CZ] X-Spamd-Bar: ---- X-Rspamd-Queue-Id: 4Sxyb25SJTz4KLg On 23/12/2023 08:18, Xin Li wrote: > Hi, > > Inspired by D42961, I propose that we move forward with disabling the > compression by default in newsyslog, as implemented in > https://reviews.freebsd.org/D43169 > > Historically, newsyslog has compressed rotated log files to save disk > space. This approach was valuable in the early days where storage space > was limited.  However, the landscape has changed significantly.  Modern > file systems, such as ZFS, now offer native compression capabilities. > Additionally, the widespread availability of larger hard drives has > diminished the necessity for additional compression.  Notably, the need > to decompress log files for pattern searches poses a significant > inconvenience, further questioning the utility of this legacy feature. > > In commit 906748d208d3, flags J, X, Y, Z can now indicate that a log > file is eligible for compression rather than directly enforcing it. It > allows for a more flexible approach, wherein the actual compression > method can be set to "none" or specified as one among bzip2, gzip, xz, > or zstd. > > Therefore I would propose that we change the default compression setting > to "none" in FreeBSD 15.0.  This change reflects our adaptation to the > evolving technological environment and user needs.  It also aligns with > the broader initiative to modernize our systems while maintaining > flexibility and efficiency. > > I look forward to your thoughts and feedback on this proposal. I don't think anything needs to be changed on newsyslog. Those who want to disable compression can do so in the "default" newsyslog.conf file. Why force this change in the newsyslog code? I also don't think that the log file should not be compressed even on a compressed filesystem. Compressed log files can be handled by tools like zcat, zless, zgrep, etc. without first decompressing the log file. Text log files can still grow to large sizes, and if you have a daily backup job over a long distance network, if you use a protocol without own compression, it is still better to have compressed log files than uncompressed on a compressed filesystem. To me, it's the same as compressing large database dumps and not relying on filesystem compression. YMMV, but I really don't see any benefit of changing the newsyslog code, just change defaults in newsyslog.conf. Kind regards Miroslav Lachman