🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #92879

Re: Spool compression

#92879
From: InterLinked
Date: Thu, 18 Jun 2026 21:55
63 lines
4738 bytes
On 6/18/2026 12:05 PM, Russ Allbery wrote:
> InterLinked <nntp@phreaknet.org> writes:
> 
>> I'm toying with the concept for tradspool, though I imagine with CNFS or
>> other multi-article files, compression would be even more effective.
> 
> As various people have implicitly noted but perhaps not said explicitly,
> one of the things that has changed since the original news servers were
> written is that compression is now a file system feature for some file
> systems.
> 
> I would not, in 2026, implement application-level compression of things
> you're storing as simple files disk unless you have enough knowledge to
> use some application-specific compression mechanism (so, for instance,
> image compression is still a different matter). If you're just using
> standard general-purpose compression mechanisms like zstd, your time is
> almost certainly better spent finding an underlying file system that
> handles the compression for you. The file system knows things like its
> block layout strategy and can make good choices about opportunistic
> compression that the news software is not in a position to make.
> 
> It might still be worthwhile in some cases to compress blobs stored in
> databases or other similar cases, but even there I'd want to benchmark
> against a file system that natively implements compression.

I would agree letting the file system do it is probably better if 
possible, but that might not always be an option - see below.

> ZFS is probably the most mature file system with this feature, but running
> it on Linux can be a little complicated due to boring licensing reasons.
> btrfs is another option for transparent compression if you don't feel like
> dealing with ZFS, but isn't as mature. (That said, I've been using btrfs
> on all my personal devices for years now without any trouble, although I
> have avoided running a disk entirely out of space, which many people say
> btrfs doesn't always handle well.)

The other constraint with file systems is if you can use them at all. My 
Internet facing news server is just one service running on a Digital 
Ocean droplet, and those only support ext4 and xfs for the primary disk.

In this case, the only way to increase the amount of articles I can 
store for "free" is to do user land compression of the articles - and 
I'm using tradspool for granular expiration (or infinite retention) 
depending on group, so that means per-file compression since CNFS would 
not even be an option.

zstd seems to work even better than compress; in some cases up to 50% 
compression for a single article even without a custom dictionary. I get 
even better results with a custom dictionary trained on the articles 
from a few disparate groups, sometimes up to 90%, but I worry about 
overfitting as inspecting the dictionary it seems to have large portions 
of entire messages (perhaps those which were quoted most), which I don't 
think would generalize well in the long run. Would need to experiment 
with that further and over time.

It seems likely that if I just compressed articles larger than 4 KB, I 
could get the vast majority of articles to fit in just 1 block, rather 
than possibly 2 or 3. Obviously there's no point in compressing articles 
less than 4 KB so those could be left alone.

I realize this is probably another "feature" that has limited appeal... 
but I'm sure there are a few others who may be using a VPS and want to 
get the most out of it.
Technical Details
Message-ID: <1111pge$2tpq7$1@dont-email.me>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
References: <110vnlu$2aplk$1@dont-email.me> <878q8b96ln.fsf@hope.eyrie.org>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: InterLinked <nntp@phreaknet.org>
Newsgroups: news.software.nntp
Subject: Re: Spool compression
Date: Thu, 18 Jun 2026 17:55:24 -0400
Organization: A noiseless patient Spider
Lines: 63
Message-ID: <1111pge$2tpq7$1@dont-email.me>
References: <110vnlu$2aplk$1@dont-email.me> <878q8b96ln.fsf@hope.eyrie.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 18 Jun 2026 21:55:26 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="3073863"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/TtGDcDA0Vu8+3Xx4ZNxdtrOhwCSYIjZ4="; posting-host="e4b96dbd866947ec239098f452532ec5"
Cancel-Lock: sha1:KCRcCfx4PbpLKuG8RaOdMIYi0g8= sha256:WWd3MMDoAu5UPsTH3Qrnwc+Se/QaXY+TBjBHeJgz+CM=
	sha1:XOMnMfcDWaEj7SsHvwbGitx7hgw=
Content-Language: en-US
X-Mailer: MailNews/52.9.9224a1
In-Reply-To: <878q8b96ln.fsf@hope.eyrie.org>