Article View: news.software.nntp
Article #6435Re: UUNET lagging (again)?
From: T. William Wells
Date: Tue, 09 Apr 1996 00:00
Date: Tue, 09 Apr 1996 00:00
126 lines
6495 bytes
6495 bytes
In article <4k434i$1ie@hunter.premier.net>,
Clayton O'Neill <coneill@news.premier.net> wrote:
: T. William Wells (bill@twwells.com) wrote:
: : In article <4jvpv2$bq1@hunter.premier.net>,
: : The problem is quite real; I've sat there with kernel traces and
: : timing data and I have various statistics programs operating on
: : the history file and on per-site data. Furthermore, in talking
: : with UUNET, it appears that a fair number of people are in my
: : situation.
:
: How does UUNet manage with 2-4 incoming boxes?
Probably with *really* fast disks. :-)
: : Elementary and already long ago done. Furthermore, the behavior
: : I'm describing is on a lightly loaded server -- essentially no
: : swapping.
:
: How much memory do you have for buffers?
It's one of those OS's that balances VM againsg buffers, so this
isn't the right question. It *looks* like it's giving about 4M to
plain disk buffers, out of 64M. This is consistent with the disk
activity, which is a small fraction of my maximum disk bandwidth.
There _is_ one new factor to take into account....I discovered
that someone is trying to crack my systems. One of their attacks
involved infinite nntp syn packets to my server, which definitely
slowed down its network access. Having adjusted my router to
block them, my server has been doing much better at receiving
data....it's still having trouble *filing* it, though.... (For
those wondering; it appears to be an IP spoof attack; the dips
didn't bother to check that my internal network addresses are
blocked at my router....)
: I'm also unclear on how your solution has solved the problem. I don't doubt
: that it has, I just don't see why. You appear to have just separated the
: receiving steps and processing steps.
That's exactly right.
: You're still having to undergo the
: load from taking the articles in the innd process, just from localhost, not
: your news peers.
Suppose that I have two I/O streams running into a single server.
The first is a lock-step protocol; the second is any other type
of protocol. Suppose further that each of these has zero network
and client times so that there is always data available to
process. Under those conditions, processing goes like this:
1 receive data from lock-step protocol
2 process data from lock-step protocol
3 send reply for the lock-step protocol
4 receive data from other protocol
5 process data from other protocol
6 send reply for the other protocol
1' receive data from lock-step protocol
The cycle time for the lock-step protocol is strictly dependent
on the time in steps 4-6, as the server must do all the processing
for the other protocol before it can get back to the lock-step
protocol.
In the real world, of course, there will be non-zero network time
in the lock-step protocol and so long as steps 4-6 take less time
than this, the other protocol won't affect the lock-step protocol
at all. But if it takes longer, that extra time will directly
affect the cycle time for the lock-step protocol.
(Also in the real world, not all streams have data available at
one time, so the delay doesn't happen on all cycles or for the
same amount of time.... It's still there, though.)
There are two interacting effects that make streaming a problem
here. First is that, as the size of the newsfeed grows, the time
needed to process directories (for article creation) goes up. When
I last did the numbers, it required around 64K of I/O to write the
average article, only 12Kish of which was article time. This can
only get worse, as the time spent searching directories is
(theoretically, though not actually) O(n**2) in the newsfeed size.
Thus, even without streaming, the time spent for each protocol is
going up with time, and faster than linearly with the size of the
newsfeed. This is a problem that'll have to be addressed fairly
soon but it isn't yet critical.
The other effect is that, since streaming works by queuing a lot
of lookups, the impact on the lock-step protocol is immense. Let's
take a simplified example. Suppose that the streaming protocol
sends 10 packets at a time and that each packet takes 10ms to
process. Suppose that the network round-trip time is 50ms.
If one weren't using streaming at all, the 10ms processing time
would be overlapped with the 50ms network time -- you wouldn't see
it. Your lock-step protocol would be strictly limited by its own
network and processing times.
However, if you were using streaming, 9 of 10 cycles would be
exactly as before, because you're still stuck with the network
delays. But that tenth cycle would be taking 50ms of network delay
-- and 100ms of processing time. Thus that tenth cycle would be
50ms longer. Averaged out, that would add 5ms to each processing
cycle of the lock-step protocol. Note that we're doing exactly the
same work but that the lock-step protocol is now slower than it
used to be.
The only thing wrong with this analysis is that it's much too
generous to the streaming protocol; since a lock-step protocol
just barely keeps up with a full feed anyway, the additional
delays are catastrophic, especially if you have multiple stream
feeds.
This isn't the only effect, BTW. Any time someone has to connect,
they have to wait until the roundrobin loop gets around to them.
Since it's entirely possible to have around a hundred articles to
be processed each time around, this can take a _long_ time. And
this, too, I've seen.
Anyway.... what my solution has done is to move the lock-step
protocol to a separate server, so the delay from the others
doesn't get in the way of its processing loop. This, in fact,
_increases_ my disk activity, which is something of a problem,
but at least the data gets _in_.
Technical Details
Message-ID:
<DpM5Fn.2sp@twwells.com>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-mailReferences:
<4jrict$93d@gti.gti.net> <4jvpv2$bq1@hunter.premier.net> <DpEIuB.E91@twwells.com> <4k434i$1ie@hunter.premier.net>Show Full Headers
Complete Article Headers
Message-ID: <DpM5Fn.2sp@twwells.com> Subject: Re: UUNET lagging (again)? Date: Tue, 09 Apr 1996 00:00:00 +0000 From: bill@twwells.com (T. William Wells) References: <4jrict$93d@gti.gti.net> <4jvpv2$bq1@hunter.premier.net> <DpEIuB.E91@twwells.com> <4k434i$1ie@hunter.premier.net> 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: 146607629 Distribution: inet Organization: None, Mt. Laurel, NJ Newsgroups: news.software.nntp