Thread View: news.software.nntp
15 messages
15 total messages
Started by Lars Syrstad
Mon, 29 Sep 1997 00:00
nnrpd going berserk (INN-1.5.1sec2, Linux pre-2.0.31-9)
Author: Lars Syrstad
Date: Mon, 29 Sep 1997 00:00
Date: Mon, 29 Sep 1997 00:00
66 lines
3631 bytes
3631 bytes
I've been running INN on a Linux server for over a year now, with no problems at all, until recently. The problem occurs when running INN 1.5.1 and did not go away when I upgraded to 1.5.1sec2, with no other patches applied. Machine is a P133 running Linux pre-2.0.31-9. It's got enough RAM to handle INN and a few other, less intensive services. Number of simultaneous readers is usually well below 20. What happens is that occasionally, the server's load will go totally wild. The record so far is 47. This seems to be caused by a tremendous number of connections being made to the nntp port (119), causing lots of nnrpd processes to be respawned. On some occasions the kernel believes it is under a SYN-flood attack and reports so in the logs and starts sending cookies. When it happens, netstat reports a number of connections from a machine on campus, though not the same machine each time. I've seen over a hundred connections from the same machine, all in state "CLOSE". When I run down to the labs to investigate, I find a confused student trying to read News, wondering why the server doesn't respond. On each occasion the client has been Netscape News 3.0 on a Windows NT machine. I am quite sure it only happens when the client is running on NT, but won't claim that it only happens with Netscape 3.0. In the news-server's logs I find messages like these: Sep 28 18:37:51 pravda nnrpd[32698]: ? cant getpeername Transport endpoint is not connected Sep 28 18:37:51 pravda nnrpd[32698]: ? exit articles 0 groups 0 Sep 28 18:37:51 pravda nnrpd[32698]: ? times user 0.010 system 1.250 elapsed 0.006 Sep 28 18:37:56 pravda nnrpd[32699]: ? cant getpeername Transport endpoint is not connected Sep 28 18:37:56 pravda nnrpd[32699]: ? exit articles 0 groups 0 Sep 28 18:37:56 pravda nnrpd[32699]: ? times user 0.020 system 1.320 elapsed 0.004 Sep 28 18:37:56 pravda nnrpd[32700]: ? cant getpeername Transport endpoint is not connected Sep 28 18:37:56 pravda nnrpd[32700]: ? exit articles 0 groups 0 Sep 28 18:37:56 pravda nnrpd[32700]: ? times user 0.010 system 1.280 elapsed 0.005 ... so it appears that the client drops the connection immediately. It looks quite malicious -- only that there is no indication at all that the people reading news from the machine at the time is doing anything naughty at all. Possibly of relevance is that prior to the first time the problem appeared, we * upgraded our network significantly, so the server is now sitting on 100Mbit ethernet on a switch-port all of its own. Network card is a 3COM 595 (Vortex). * arranged to get our incoming newsfeed from a faster machine than we used to. We have no problems keeping up with the feed, though. * upgraded the kernel from pre-2.0.31-3 to pre-2.0.31-9. * Significantly boosed INN's performance by deleting articles in the control.cancel group on an hourly basis (mv and rm -r from cron). Is this familiar to anyone? Suggestions? Help? - Lars. -- Not flogging a DOA MULE.
Re: nnrpd going berserk (INN-1.5.1sec2, Linux pre-2.0.31-9)
Author: Bill Stewart-Cole
Date: Mon, 29 Sep 1997 00:00
Date: Mon, 29 Sep 1997 00:00
50 lines
2886 bytes
2886 bytes
In article <vz90wfq266.fsf@kvakk.idb.hist.no>, Lars Syrstad <lars@idb.hist.no> wrote: > "Georg v.Zezschwitz" <gvz@popocate.hamburg.pop.de> writes: > > > In news.software.nntp Lars Syrstad <lars@idb.hist.no> wrote: > > : What happens is that occasionally, the server's load will go totally > > : wild. The record so far is 47. This seems to be caused by a > > : .... > > > > I noticed the same problem. Imagine what happens when just another > > alt.binaries.-junk is clicking to the next images while the recent > > one is still transfered: Each time a new connection is being built > > up. > > But, but, but. A client shouldn't _do_ that! Tell Nutscrape that. In fact, this is not limited to their so-called newsreader, but they are the most egregious. I confess that right now I'm using a client that will open up to 6 simultaneous connections. That's a user-defined value, with 6 as the limit. It's helpful for keeping the wait time down because I can read, post, reply, whatever while other groups are having their headers fetched and filtered. > Note that when nnrpd gets started, there is nothing at the other end > of the connection. If the client attempts to download articles with > several parallel connections, it doesn't make sense that it drops the > connection before anything is sent. (nnrpd doesn't even get to log > the IP-adress of the client before the connection is gone.) It might make sense if your server is badly overloaded already and the client is impatient. It may also be a side-effect of MS's renowned TCP/IP stack. [...] > But why should the client try to open more than one connection to the > server? It's for turning wait time (for headers to come down, for the latest 2GB girlie picture to transfer, whatever) into reading time. This can even be a money issue in cases where a user pays for connect time (doesn't sound like your situation...) -- Bill Stewart-Cole bill@scconsult.com I'm not spam-blocked because I like playing the hardass net-fascist. It's remarkable how fast you can get 2 feeds by asking in a .sig
Re: nnrpd going berserk (INN-1.5.1sec2, Linux pre-2.0.31-9)
Author: Georg v.Zezschwitz
Date: Mon, 29 Sep 1997 00:00
Date: Mon, 29 Sep 1997 00:00
53 lines
2560 bytes
2560 bytes
In news.software.nntp Lars Syrstad <lars@idb.hist.no> wrote:
: What happens is that occasionally, the server's load will go totally
: wild. The record so far is 47. This seems to be caused by a
: ....
I noticed the same problem. Imagine what happens when just another
alt.binaries.-junk is clicking to the next images while the recent
one is still transfered: Each time a new connection is being built
up. This means nearly nothing for the client, but a hell of work
for the server: INN is forked just to recognize that the IP-number
is a client one and that nnrpd should be called. Linux has to copy
the whole memory descriptor table for innd to fork and some other
work, too.
This might result in a really bad situation where the client is
trying faster to open new connections than the server can cope
with the started ones.
The situation typically lasts for some minutes.
There are two approaches to cope with the problem:
- More memory, faster machine (PPro 200 e.g.) making the fork-
call faster.
- Directly starting nnrpd for the readers. There are two ways
to do so:
a) you direct your feeding sites to port 120 and change the
port you run innd at (it's a setting in the include sub-
directory) to 120. In inetd.conf, you attach port 119
to nnrpd (remember: not as user root but user news).
A client connection will start nnrpd directly.
b) you tell your clients to use port 120 (e.g.) and attach
nnrpd to port 120 in inetd.conf.
c) You use "transparent proxying" in Linux (beta feature) to
redirect requests from certain IP-numbers to a certain port
on your server (119) to port 120 and start nnrpd in the
nnrpd.
Currently, we are using method c), but are trying to switch to
method a) (as I guess it will save some time for IP redirection).
Greetings,
Georg
Re: nnrpd going berserk (INN-1.5.1sec2, Linux pre-2.0.31-9)
Author: Lars Syrstad
Date: Mon, 29 Sep 1997 00:00
Date: Mon, 29 Sep 1997 00:00
58 lines
2756 bytes
2756 bytes
"Georg v.Zezschwitz" <gvz@popocate.hamburg.pop.de> writes: > In news.software.nntp Lars Syrstad <lars@idb.hist.no> wrote: > : What happens is that occasionally, the server's load will go totally > : wild. The record so far is 47. This seems to be caused by a > : .... > > I noticed the same problem. Imagine what happens when just another > alt.binaries.-junk is clicking to the next images while the recent > one is still transfered: Each time a new connection is being built > up. But, but, but. A client shouldn't _do_ that! Note that when nnrpd gets started, there is nothing at the other end of the connection. If the client attempts to download articles with several parallel connections, it doesn't make sense that it drops the connection before anything is sent. (nnrpd doesn't even get to log the IP-adress of the client before the connection is gone.) > This means nearly nothing for the client, but a hell of work > for the server: INN is forked just to recognize that the IP-number > is a client one and that nnrpd should be called. Linux has to copy > the whole memory descriptor table for innd to fork and some other > work, too. > > This might result in a really bad situation where the client is > trying faster to open new connections than the server can cope > with the started ones. But why should the client try to open more than one connection to the server? [...] > - Directly starting nnrpd for the readers. There are two ways > to do so: [...] > c) You use "transparent proxying" in Linux (beta feature) to > redirect requests from certain IP-numbers to a certain port > on your server (119) to port 120 and start nnrpd in the > nnrpd. I've been considering this. We'd have to choose your method c), as we do have a few minor incoming feeds that are unable to change the port they feed to, so just forwarding connections to another port for those few ip-adresses might to the trick. Ohmygod, off into the Firewall-HOWTO we go... - Lars. -- Not flogging a DOA MULE.
Re: nnrpd going berserk (INN-1.5.1sec2, Linux pre-2.0.31-9)
Author: Lars Syrstad
Date: Tue, 30 Sep 1997 00:00
Date: Tue, 30 Sep 1997 00:00
32 lines
1957 bytes
1957 bytes
"Georg v.Zezschwitz" <gvz@popocate.hamburg.pop.de> writes: > The problem is rather this situation: > > - The 2GB (well: 1 MB) article is transfered on one channel > > - The users sees the image building up and decides to look for a > "better" one. He clicks to the next article. > > - Netscape builds up a new connection because there is no way to > stop the running transfer of girlie A. Girlie B is now on channel 2. > > - Probably Netscape drops channel 1 (otherwise the bandwith for > girlie A which is still transmitted is lost). I've talked to two students who made this happen. One was reading a local group that distributes tons of huge mime-encoded word-documents and the like. The "girlie picture scenario" fits. The other, however, had just rescanned for new groups, entered a normal discussion group that to his surprise had got a lot of new articles, then just held down the Down key in the article list, causing the window to scroll, and, possibly, opening lots of connections to the server in the process. I'd love (no, I wouldn't) to see the source code of that client... - Lars. -- Not flogging a DOA MULE.
Re: nnrpd going berserk (INN-1.5.1sec2, Linux pre-2.0.31-9)
Author: Ian Stirling
Date: Tue, 30 Sep 1997 00:00
Date: Tue, 30 Sep 1997 00:00
33 lines
2854 bytes
2854 bytes
In news.software.nntp Lars Syrstad <lars@idb.hist.no> wrote: : "Georg v.Zezschwitz" <gvz@popocate.hamburg.pop.de> writes: : > In news.software.nntp Lars Syrstad <lars@idb.hist.no> wrote: : > : What happens is that occasionally, the server's load will go totally : > : wild. The record so far is 47. This seems to be caused by a : > : .... : > : > I noticed the same problem. Imagine what happens when just another : > alt.binaries.-junk is clicking to the next images while the recent : > one is still transfered: Each time a new connection is being built : > up. : But, but, but. A client shouldn't _do_ that! : Note that when nnrpd gets started, there is nothing at the other end : of the connection. If the client attempts to download articles with : several parallel connections, it doesn't make sense that it drops the : connection before anything is sent. (nnrpd doesn't even get to log : the IP-adress of the client before the connection is gone.) Imagine someone with netscape say reading alt.binaries.big, they click on a message, read the first page (of 10Mb), close the connection before 10K has downloaded, and click on the next. -- Ian Stirling. Designing a linux PDA, see http://www.mauve.demon.co.uk/ -----******* If replying by email, check notices in header *******------- My inner child can beat up your inner child. Alex Greenbank
Re: nnrpd going berserk (INN-1.5.1sec2, Linux pre-2.0.31-9)
Author: Rahul Dhesi
Date: Tue, 30 Sep 1997 00:00
Date: Tue, 30 Sep 1997 00:00
23 lines
1833 bytes
1833 bytes
In <60rm8q$ng4$1@jake.probe.net> russell@probe.net (Tim Russell) writes: > Every time a user clicks on something before something else is finished, >Nutscrape opens up another NNTP session, while the user is blissfully unaware >that he/she is bringing your newsserver to its knees. > To make matters worse, if you have a high retention time on busy news- >groups, and thus many articles currently in the group, the overview "database" >file can grow very large. If the new NNRPD is simply given an article number >to retrieve, that's fine, but if it's given an XOVER command (to get a list >of articles in a group) it satisfies this request by reading through the >entire overview file, line-by-line, until it reaches its starting point, >then spits out header lines. > With overview files easily 8 megabytes or larger in size, this behavior >gets bad rather quickly, making your newsserver extremely I/O bound. What was that I heard before about NFS being less efficient than NNTP? -- Rahul Dhesi <dhesi@spams.r.us.com>
Re: nnrpd going berserk (INN-1.5.1sec2, Linux pre-2.0.31-9)
Author: Tim Russell
Date: Tue, 30 Sep 1997 00:00
Date: Tue, 30 Sep 1997 00:00
41 lines
2667 bytes
2667 bytes
(note: followups to news.software.nntp, as this is nothing Linux-specific)
Lars Syrstad <lars@idb.hist.no> writes:
>But, but, but. A client shouldn't _do_ that!
Tell that to the idiots at Nutscrape, the bane of all newsservers.
Every time a user clicks on something before something else is finished,
Nutscrape opens up another NNTP session, while the user is blissfully unaware
that he/she is bringing your newsserver to its knees.
To make matters worse, if you have a high retention time on busy news-
groups, and thus many articles currently in the group, the overview "database"
file can grow very large. If the new NNRPD is simply given an article number
to retrieve, that's fine, but if it's given an XOVER command (to get a list
of articles in a group) it satisfies this request by reading through the
entire overview file, line-by-line, until it reaches its starting point,
then spits out header lines.
With overview files easily 8 megabytes or larger in size, this behavior
gets bad rather quickly, making your newsserver extremely I/O bound.
Discussions for making at least the overview situation better by using
some sort of an actual database. Previous versions of INN also had some
algorithms to not allow Netscape to hammer on the server, but I believe they
were removed, since they were resulting in error messages on the client
side.
The long and short of it is, complain loudly to Netscape. Their total
lack of concern for server resources is inexcusable. There's simply no
reason for a newsreader to EVER open more than one connection to the server.
--
Tim Russell System Admin, Probe Technology email: russell@probe.net
PGP RSA: C992 109C 6D7F 8D91 062E 817E 00D3 287A
"The worst censorship is self-censorship, because fear has no limits."
-- Grady Ward
Re: nnrpd going berserk (INN-1.5.1sec2, Linux pre-2.0.31-9)
Author: Bill Stewart-Cole
Date: Tue, 30 Sep 1997 00:00
Date: Tue, 30 Sep 1997 00:00
32 lines
2078 bytes
2078 bytes
In article <vzraa7nonu.fsf@kvakk.idb.hist.no>, Lars Syrstad <lars@idb.hist.no> wrote: > bill@scconsult.com (Bill Stewart-Cole) writes: > > > In article <vz90wfq266.fsf@kvakk.idb.hist.no>, Lars Syrstad > > <lars@idb.hist.no> wrote: > > [...] > > > Tell Nutscrape that. In fact, this is not limited to their so-called > > newsreader, but they are the most egregious. I confess that right now I'm > > using a client that will open up to 6 simultaneous connections. That's a > > user-defined value, with 6 as the limit. It's helpful for keeping the wait > > time down because I can read, post, reply, whatever while other groups are > > having their headers fetched and filtered. > > Would this be the setting in Options->Network Preferences->Connections > in Netscape 3.0? I'd always thought this applied only to HTTP. I believe that setting in Netscape does only apply to HTTP. I don't use Netscape for news. I can't imagine being that masochistic. The setting in my newsreader is analogous to that setting in Netscape. -- Bill Stewart-Cole bill@scconsult.com I'm not spam-blocked because I like playing the hardass net-fascist. It's remarkable how fast you can get 2 feeds by asking in a .sig
Re: nnrpd going berserk (INN-1.5.1sec2, Linux pre-2.0.31-9)
Author: Georg v.Zezschwitz
Date: Tue, 30 Sep 1997 00:00
Date: Tue, 30 Sep 1997 00:00
30 lines
1906 bytes
1906 bytes
In news.software.nntp Bill Stewart-Cole <bill@scconsult.com> wrote: : > "Georg v.Zezschwitz" <gvz@popocate.hamburg.pop.de> writes: : > > I noticed the same problem. Imagine what happens when just another : > > alt.binaries.-junk is clicking to the next images while the recent : > > one is still transfered: Each time a new connection is being built : > > up. : It's for turning wait time (for headers to come down, for the latest 2GB : girlie picture to transfer, whatever) into reading time. This can even be : a money issue in cases where a user pays for connect time (doesn't sound : like your situation...) The problem is rather this situation: - The 2GB (well: 1 MB) article is transfered on one channel - The users sees the image building up and decides to look for a "better" one. He clicks to the next article. - Netscape builds up a new connection because there is no way to stop the running transfer of girlie A. Girlie B is now on channel 2. - Probably Netscape drops channel 1 (otherwise the bandwith for girlie A which is still transmitted is lost). Georg
Re: nnrpd going berserk (INN-1.5.1sec2, Linux pre-2.0.31-9)
Author: Lars Syrstad
Date: Tue, 30 Sep 1997 00:00
Date: Tue, 30 Sep 1997 00:00
49 lines
2803 bytes
2803 bytes
bill@scconsult.com (Bill Stewart-Cole) writes: > In article <vz90wfq266.fsf@kvakk.idb.hist.no>, Lars Syrstad > <lars@idb.hist.no> wrote: [...] > Tell Nutscrape that. In fact, this is not limited to their so-called > newsreader, but they are the most egregious. I confess that right now I'm > using a client that will open up to 6 simultaneous connections. That's a > user-defined value, with 6 as the limit. It's helpful for keeping the wait > time down because I can read, post, reply, whatever while other groups are > having their headers fetched and filtered. Would this be the setting in Options->Network Preferences->Connections in Netscape 3.0? I'd always thought this applied only to HTTP. > > Note that when nnrpd gets started, there is nothing at the other end > > of the connection. If the client attempts to download articles with > > several parallel connections, it doesn't make sense that it drops the > > connection before anything is sent. (nnrpd doesn't even get to log > > the IP-adress of the client before the connection is gone.) > > It might make sense if your server is badly overloaded already and the > client is impatient. The server is usually running at loadavg in the neighborhood of 1.0, with lots of spare CPU time. However, nnrpd might take some time to start, usually 2-5 seconds until I get the first 200 message when telneting to the port (I honestly don't think that's too bad...), as the filesystem containing the active file is on a quite busy SCSI-adapter. (No money, low priority service :-() I guess running the in-feed on another port and spawning nnrpd from inetd will do the trick. Shared active patch might help as well, possibly? Trying out the 1.5.2 pre-release at the moment. > It may also be a side-effect of MS's renowned TCP/IP stack. This never happened last year, when people used Netscape 3 on Win 95. Now they use Netscape 3 and 4 on NT, and the problem arises, though possibly only with Netscape 3. - Lars. -- Not flogging a DOA MULE.
Re: nnrpd going berserk (INN-1.5.1sec2, Linux pre-2.0.31-9)
Author: Lars Syrstad
Date: Tue, 30 Sep 1997 00:00
Date: Tue, 30 Sep 1997 00:00
48 lines
2578 bytes
2578 bytes
olaf@bigred.inka.de (Olaf Titz) writes: > Lars Syrstad <lars@idb.hist.no> wrote: > > ... so it appears that the client drops the connection immediately. > > It looks quite malicious -- only that there is no indication at all > > that the people reading news from the machine at the time is doing > > anything naughty at all. > > I have that problem too, but it seems to me it's not malicious intent > but rather some severely broken client software. Yes, I agree that there is no malice involved. At least not in any human -- I'm not so sure about some of the software... ;-) [...] > This looks to me like someone has a "newsreader" from those M$ or N$ > companies which attempts to grab a lot of connections in advance for > later use. Fortunately it fills up its buffer for connections with > those invalid ones, or so it seems. (Any chance that this buffer has > exactly 16 slots? Compare that with the maximum load described above.) My load evens out and starts to decrease in the 30s, though the all time record is 47. Takes maybe five minutes to get down to normal operation as well. > FWIW, I use one of that pre-2.0.31 Linuxen which behaves much better > than 2.0.30 under high load. I can actually move the mouse while I get > NNTP-connection bombed... Oh, I'm really impressed with those kernels as well. Both top and tail -f on news.notice works reliably, and it even allows me to get an ps auxww or a netstat in edgewise as well, even under those extreme loads. Thankfully, I'm not running my X-server on that particular machine. But I do wonder if that might be the reason why I notice this so much more now than I did before. Consensus seems to be that this is due to the client (Netscape) doing something bad, which tells me that the problem has been around for a while, only that I haven't noticed it earlier. - Lars. -- Not flogging a DOA MULE.
Re: nnrpd going berserk (INN-1.5.1sec2, Linux pre-2.0.31-9)
Author: Ron Echeverri
Date: Tue, 30 Sep 1997 00:00
Date: Tue, 30 Sep 1997 00:00
14 lines
1111 bytes
1111 bytes
In article <60s0ap$pbu$1@samba.rahul.net>, Rahul Dhesi <c.c.eiftj@89.usenet.us.com> wrote: >What was that I heard before about NFS being less efficient than NNTP? You didn't hear it, you read it. rone -- Ron Echeverri <URL:http://www.ennui.org/~rone/> <rone@best.net> Systems/Usenet Administration "This is _my_ ISP, _i_ do the Best Internet Communications, Inc. ass-kicking around here!" -rpwhite
Re: nnrpd going berserk (INN-1.5.1sec2, Linux pre-2.0.31-9)
Author: Tsar Barry BOFHwsma
Date: Thu, 02 Oct 1997 00:00
Date: Thu, 02 Oct 1997 00:00
43 lines
2731 bytes
2731 bytes
[Not much to do with Linux; followups set]
On 30 Sep 1997, Lars Syrstad wrote:
> The server is usually running at loadavg in the neighborhood of 1.0,
> with lots of spare CPU time. However, nnrpd might take some time to
> start, usually 2-5 seconds until I get the first 200 message when
> telneting to the port (I honestly don't think that's too bad...)
Well, it probably is. Your several seconds delay results from innd
picking up the phone, figuring out it doesn't want to talk to you,
transferring you to nnrpd, which does a DNS lookup to decide whether it
does want to talk to you and then puts up the banner.
If the 200 greeting you see is different from what you see after you
type the command ``MODE READER'' then the second step isn't happening and
you're seeing the delay it takes innd to get around to you, where no DNS
lookup is performed.
Assuming you don't have DNS problems, you shouldn't be seeing a delay
at all with your second and third connections to the NNTP port. It should
be just as fast as getting the prompt from, say, port 19, or the telnet
port, or most other ports.
If you see a delay, whether a minute, ten seconds, or half a second,
then your news server has performance problems and needs tuning. There
shouldn't be a delay at all. Honest. Believe me. My server at the
moment puts up the banner almost instantly, which is how it should be.
This is a simple and painless test of whether your server is idling or
racing frantically to keep up.
How to tune it? That gets discussed quite a bit in news.software.nntp
with the primary measurements provided by Joe Greco's idle timer patch,
and the biggest bottlenecks likely being spool writes and history lookups.
Barry Bouwsma
will tweak news servers for food
Re: nnrpd going berserk (INN-1.5.1sec2, Linux pre-2.0.31-9)
Author: Erlend Midttun
Date: Fri, 03 Oct 1997 00:00
Date: Fri, 03 Oct 1997 00:00
28 lines
1849 bytes
1849 bytes
Lars Syrstad <lars@idb.hist.no> writes:
>What happens is that occasionally, the server's load will go totally
>wild. The record so far is 47. This seems to be caused by a
>tremendous number of connections being made to the nntp port (119),
>causing lots of nnrpd processes to be respawned. On some occasions
>the kernel believes it is under a SYN-flood attack and reports so in
>the logs and starts sending cookies.
Seen the same (also as you mention below) here with INN 1.6b3.
Running iostat told me that it was while reading the history file
(~250MB). The spool disks where _completely_ idle. Maybe not a
solution for you, but distributing the spool and history file with
md on serveral fast disks really did wonders here.
Mail me if you are interested in the gory details.
> - Lars.
Erlend..
--
Erlend Midttun erlendbm@funcom.com
Network administrator at Funcom Oslo AS. Speaking by myself, for myself.
IRC: Golle http://www.colargol.idb.hist.no/~erlendbm/
Java, the sendmail of WWW
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads