🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #38223

Re: Submitting to Freenix

#38223
From: Russ Allbery
Date: Wed, 23 Jun 1999 00:00
53 lines
3323 bytes
Fairly old thread on why splitting outgoing feeds into a large article
feed and a small article feed produces such a dramatic increase in
performance.  Sorry to resurrect really old threads; Gnus's caching has a
tendency to encourage me to do that more than I probably should.

Bill Gunshannon <bill@cs.uofs.edu> writes:

> I can't explain why, but it seems that the latency increases depending
> on the size of the message.  And no linearly either.  A quick look
> showed that I have 12-17 times as many small messages as large messages
> and yet I can push all of them through to most hosts in seconds where it
> takes considerably longer to push the larger messages.

Reading the innd source code produces some very interesting tidbits.  I'm
willing to bet that this has something to do with it (innd/chan.c):

    /* Read in whatever is there, up to some reasonable limit. */
    /*
     * XXX We really want to limit the amount of time it takes to
     * process the incoming data for this channel.  But there's
     * no easy way of doing that, so we restrict the data size instead.
     * If the data is part of a single large article, then reading
     * and processing many kilobytes at a time costs very little.
     * If the data is a long list of CHECK commands from a streaming
     * feed, then every line of data will require a history lookup, and
     * we probably don't want to do more than about 10 of those per
     * channel on each cycle of the main select() loop (otherwise we
     * might take too long before giving other channels a turn).  10
     * lines of CHECK commands suggests a limit of about 1 kilobyte of
     * data, or less.  BUFSIZ is often about 1 kilobyte, and is
     * attractive for other reasons, so let's use that as our size limit.
     */

I don't think large articles get the correct proportional share of INN's
time because the underlying channel code isn't aware of whether you're
receiving articles or receiving commands and therefore only reads a little
to avoid getting too many commands at a time.

Making the channel more intelligent about what it's reading could
potentially result in some major speedups in this area, but would be
fairly grody to code.  The Right Solution is to make innd threaded and
allocate a new thread for each incoming connection, so that thread can
just read whatever comes and not worry about having to give fair share of
its time to other connections.

Operating systems are really good at scheduling things.  Whenever
possible, it's best to let the operating system do it and not try to do it
yourself.

-- 
Russ Allbery (rra@stanford.edu)         <URL:http://www.eyrie.org/~eagle/>

Technical Details
Message-ID: <ylemj3axr0.fsf@windlord.stanford.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
References: <7g24e7$ckh$1@info.cs.uofs.edu> <brad-2704991503430001@brad.techos.skynet.be> <7g4soa$p7e$1@info.cs.uofs.edu>

Show Full Headers
Complete Article Headers
Message-ID: <ylemj3axr0.fsf@windlord.stanford.edu>
Subject: Re: Submitting to Freenix
Date: Wed, 23 Jun 1999 00:00:00 +0000
From: Russ Allbery <rra@stanford.edu>
References: <7g24e7$ckh$1@info.cs.uofs.edu> <brad-2704991503430001@brad.techos.skynet.be> <7g4soa$p7e$1@info.cs.uofs.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
X-Deja-AN: 492923572
Organization: The Eyrie
Newsgroups: news.software.nntp