🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #92777

Re: inn scalability improvements

#92777
From: InterLinked
Date: Wed, 13 May 2026 02:46
37 lines
3455 bytes
On 5/10/2026 8:59 PM, Kevin Bowling wrote:
> Data movement could optionally use sendfile and even KTLS sendfile on Linux and FreeBSD.

So, this gave me an interesting thought earlier this evening, as I 
actually do use sendfile() a lot (it's not very portable, so I have 
wrappers around sendfile, copy_file_range, splice, and other fun functions).

I was reading the requirement for :bytes earlier today and noted that it 
specifically does not include dot-stuffing characters, and I recalled 
then that in SMTP and NNTP, I strip out any dot-stuffed lines as I 
thought was convention. However, when *sending* the articles to a 
client, I have just been using ~sendfile, for efficiency. I realize now 
this is illegal, since I'm not adding the dot-stuffing back.

Taking a look at INN, I noticed it counts the number of dot-stuffed 
lines and subtracts it from the value it provides for :bytes, which is 
what the RFC says to do. But it looks like INN doesn't remove the 
dot-stuffing when receiving an article. This actually seems like the 
more elegant way to do things; if you never remove the dot-stuffing, you 
don't need to add it back, and then you can do efficient things like use 
sendfile rather than going line by line. So in my case, I think I don't 
need to care about receiving dot-stuffed lines since I can store them in 
the spool and just have it be transparent.

On the other hand, this wouldn't work for SMTP, since with 
BDAT/CHUNKING, you may not need to do dot-stuffing.

I guess what I'm trying to say is that for SMTP, because there are 
multiple ways to send/receive messages, it makes sense to store the 
messages in the "queue" normalized (without dot-stuffing), but since 
there's only one way in NNTP, it makes more sense to just store the 
stuffed lines in the spool directly. Is this about the gist of it?

(And implicitly, I'm assuming that in the future, it would be hard to 
support other extensions like SMTP has since I would assume most news 
server are storing the dots in the spool; of course, such extensions are 
probably of little value to NNTP considering most articles are small).
Technical Details
Message-ID: <10u0ola$2df35$1@dont-email.me>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!spool1.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
References: <10tofqn$edc$1@csiph.com> <10tpg5u$70e0$1@news.trigofacile.com> <10tr9m7$b63$1@csiph.com>

Show 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!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: inn scalability improvements
Date: Tue, 12 May 2026 22:46:01 -0400
Organization: A noiseless patient Spider
Lines: 37
Message-ID: <10u0ola$2df35$1@dont-email.me>
References: <10tofqn$edc$1@csiph.com> <10tpg5u$70e0$1@news.trigofacile.com>
 <10tr9m7$b63$1@csiph.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 13 May 2026 02:46:03 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="2538597"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/VxJY0OOEqbwSaR0rRx9NHMO91hZBA838="; posting-host="21efc2bad640fa2e0c54a3542b3513a3"
Cancel-Lock: sha1:BDuHWnqHWEx4ea1/xRzFML4dQfE= sha256:TzyvD6jd9NfhJ+xKgYdx8tYd/l/QfR/lqia/dV8NbCM=
	sha1:d8aucOmhrYzk7W7ut5AqkexhLn0=
X-Mailer: MailNews/52.9.9224a1
Content-Language: en-US
In-Reply-To: <10tr9m7$b63$1@csiph.com>