Article View: news.software.nntp
Article #92776Re: inn scalability improvements
From: Kevin Bowling
Date: Wed, 13 May 2026 03:30
Date: Wed, 13 May 2026 03:30
46 lines
3625 bytes
3625 bytes
On 5/12/26 19:46, InterLinked wrote: > 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). Can you post some example transactions showing your thoughts? One thing that comes to mind is probably to synthesize the header(s) and sendfile at an offset of the body. The synthesized part could be stack allocated. Likewise any trailer if 'wireformat' is off.
Technical Details
Message-ID:
<10u0r8a$2oc$1@csiph.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!spool1.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!tncsrv06.tnetconsulting.net!csiph.com!.POSTED.172.83.103.228!not-for-mailReferences:
<10tofqn$edc$1@csiph.com> <10tpg5u$70e0$1@news.trigofacile.com> <10tr9m7$b63$1@csiph.com> <10u0ola$2df35$1@dont-email.me>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!tncsrv06.tnetconsulting.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: Tue, 12 May 2026 20:30:14 -0700 Organization: csiph.com Internet News Service Message-ID: <10u0r8a$2oc$1@csiph.com> References: <10tofqn$edc$1@csiph.com> <10tpg5u$70e0$1@news.trigofacile.com> <10tr9m7$b63$1@csiph.com> <10u0ola$2df35$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Wed, 13 May 2026 03:30:18 -0000 (UTC) Injection-Info: csiph.com; posting-host="172.83.103.228"; logging-data="2828"; mail-complaints-to="admin@kev009.com" User-Agent: Mozilla Thunderbird Content-Language: en-US In-Reply-To: <10u0ola$2df35$1@dont-email.me>