🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #92857

Re: inn scalability improvements

#92857
From: Kevin Bowling
Date: Wed, 03 Jun 2026 07:13
56 lines
3632 bytes
On 5/21/26 22:19, Kevin Bowling wrote:
> On 5/21/26 20:24, Jesse Rehmer wrote:
>> On May 21, 2026 at 9:29:57 PM CDT, "Kevin Bowling" 
>> <kevin.bowling@kev009.com>
>> wrote:
>>
>>> How big is your history dbz?  I suspect the answer to all this is what
>>> Russ was hinting at, and maybe use sqlite for history so it can do in
>>> place maintenance.
>>
>> I must have missed Russ's comment about using sqlite for the history 
>> file, but
>> my personal opinion is the history operations are the largest 
>> bottleneck when

After looking around in the code, you are very correct.

dbz's putcore() is doing msync(MS_ASYNC) over the entire .index/.hash 
mmap on every sync, regardless of how many entries actually changed 
(dbz.c L1338-1342).  So cost scales with table size, not with write count.

That would be completely eliminated with atomic commit of a WAL or CoW 
DB.  So there's a good chance SQLite would scale better than hisv6, 
enough that I think it's worth a prototype.

It will be interesting to see how a B-tree works for the hisgrep lookup 
path.  In principle it should be fine, especially if the history size 
spills past the working set onto disk.

>> running a larger scale INN instance. With CNFS and ovsqlite expiration
>> operations are not so terrible. Room for improvement sure, but the 
>> main thing
>> I've noticed when feeding hundreds of millions of articles between 
>> servers is
>> the history writes are the biggest overall bottleneck I encounter on a 
>> regular
>> basis. I have messed with the various knobs related to this and never 
>> got the
>> throughput I wanted, or what Diablo is capable of.
> 
> It was in an unrelated thread with InterLinked about maybe using 
> databases instead of home grown formats.
> 
>> Of course, I'm not doing regular expire operations, but if I recall 
>> correctly,
>> when I was doing them it could take days to complete. That did create 
>> issues
>> for users.
> 
> It should be manageable with my current patch stack to run expire with 
> your current count but writing out a new history at this scale every 
> night is a bit wasteful.
> 
> I will take a look at history/dbz and see if there are any easy wins and 
> do some napkin math to see if sqlite would be viable for the use case.
Technical Details
Message-ID: <10vok6b$jba$1@csiph.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!weretis.net!feeder9.news.weretis.net!csiph.com!.POSTED.172.83.103.228!not-for-mail
References: <10tofqn$edc$1@csiph.com> <10uod8q$1jhn$1@csiph.com> <10uoe80$n9p$1@nnrp.usenet.blueworldhosting.com> <10uof36$1ljb$1@csiph.com> <10uoia8$vdt$1@nnrp.usenet.blueworldhosting.com> <10uop1r$2237$1@csiph.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!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: Re: inn scalability improvements
Date: Wed, 3 Jun 2026 00:13:14 -0700
Organization: csiph.com Internet News Service
Message-ID: <10vok6b$jba$1@csiph.com>
References: <10tofqn$edc$1@csiph.com> <10uod8q$1jhn$1@csiph.com>
 <10uoe80$n9p$1@nnrp.usenet.blueworldhosting.com> <10uof36$1ljb$1@csiph.com>
 <10uoia8$vdt$1@nnrp.usenet.blueworldhosting.com> <10uop1r$2237$1@csiph.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 3 Jun 2026 07:13:15 -0000 (UTC)
Injection-Info: csiph.com; posting-host="172.83.103.228";
	logging-data="19818"; mail-complaints-to="admin@kev009.com"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:2dJnqV8MB79Xu+dvIKquKe02VTc= sha256:bROaAV8sd/QQHEKROCtI1gSsEUvmx1UkJ2k6EIuf/cE=
	sha1:DAeMJLpoFdhhIKq4VP1AvpcZlRw= sha256:wqCs4oW2sdZGp76E5DtP8uWjvcFhZUTWKMIxrgkMy5A=
Content-Language: en-US
In-Reply-To: <10uop1r$2237$1@csiph.com>