Article View: news.software.nntp
Article #92773inn scalability improvements
From: Kevin Bowling
Date: Sat, 09 May 2026 23:26
Date: Sat, 09 May 2026 23:26
72 lines
4463 bytes
4463 bytes
Hi, I've been looking at inn as I run it: tradspool/ovsqlite on FreeBSD+ZFS with unlimited retention and trying to fix some scaling issues. ovsqlite: Add direct reader mode for nnrpd with WAL https://github.com/InterNetNews/inn/pull/338 expireover: Add bloom filter for fast history existence checks https://github.com/InterNetNews/inn/pull/339 expire: skip per-article SMretrieve via cancel tombstone log https://github.com/InterNetNews/inn/pull/340 The first two have been running on csiph.com for a few days without issue. I haven't yet deployed the last one yet but will publish results in the PR when I do. The general theme of all three is to reduce random or sync I/O. In the case of expireover and expire, the general problem is somewhat similar but the root cause and fix are fairly different. expireover checks history for every article and this turns into a very slow and random serial I/O for every article in the history DB. The new option is to use a bloom filter with a configurable false positive rate, chosen for some acceptable RAM vs accuracy tradeoff by the admin and their spool size. The bloom filter is created with a much more efficient streaming read of the entire history file. In the case of a false positive (bloom claims article in history, but expire removed it), it gets cleaned up on the next expireover run (entropy introduced by hash churn make this probabilistic reality). On my system this is a 1100x improvement, 2 weeks down to 18 minutes. expire is a bit more involved. We don't want the same bloom tradeoff, exactness trades a bit of RAM (pending deletes) for totally eliminating unnecessary disk I/O for verification. If we keep a tombstone log of articles expireover deletes, and any cancels, and we trust the state of the spool, we can eliminate all speculative work and only deal with the actual history cleanup needed. On my system this will net a 2800x improvement, 2 days down to sub minute. With the expire tombstone, I can make 'nnrpdcheckart' an extremely efficient hash lookup, so OVER and friends don't need to check every single article's existence and only clean any pending tombstone entries. Both of these suppose integrity of the spool; if you 'rm' articles instead of using 'sm -r' you'll need to do a patrol expire to clean up your spool; expireover builds from history so it would see the new history state the next time it runs. The first time expire runs it wont have a tombstone so it will 'upgrade' to a known state cleaning any issues.. a gap is only if you decide to manually botch the spool after that. You'd avoid the worst of some of this with CNFS, but the unlimited retention case gets a little awkward, and tradspool should scale to a text feed with over a billion articles with these changes on modern hardware. The ovsqlite direct reader mode allows each nnrpd to open the sqlite DB directly, in read only mode. This eliminates costly IPC and exclusive locking to the ovsqlite-server which is now only concerned with innd. The WAL file also helps with writes as they turn into streaming I/O and the main DB does not create the same level of synchronous write load. This is conceptually similar to how BDB used to work. I have these gated on the FreeBSD news/inn-current port behind an EXPERIMENTAL flag (expire tombstones will come once I'm satisfied). I'd be curious to hear any feedback or reviews from other inn admins that can test the patch set. Regards, Kevin
Technical Details
Message-ID:
<10tofqn$edc$1@csiph.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!spool1.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!weretis.net!feeder9.news.weretis.net!csiph.com!.POSTED.172.83.103.228!not-for-mailShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!spool1.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!weretis.net!feeder9.news.weretis.net!csiph.com!.POSTED.172.83.103.228!not-for-mail From: Kevin Bowling <kevin.bowling@kev009.com> Newsgroups: news.software.nntp Subject: inn scalability improvements Date: Sat, 9 May 2026 16:26:11 -0700 Organization: csiph.com Internet News Service Message-ID: <10tofqn$edc$1@csiph.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sat, 9 May 2026 23:26:15 -0000 (UTC) Injection-Info: csiph.com; posting-host="172.83.103.228"; logging-data="14764"; mail-complaints-to="admin@kev009.com" User-Agent: Mozilla Thunderbird Content-Language: en-US