Thread View: news.software.nntp
3 messages
3 total messages
Started by Ralph Waters
Fri, 09 Jul 1993 17:26
slow processing of backlogged news
Author: Ralph Waters
Date: Fri, 09 Jul 1993 17:26
Date: Fri, 09 Jul 1993 17:26
43 lines
3029 bytes
3029 bytes
I keep having problems with my news server falling behind. Whenever the incoming news feeds go down for any length of time (either due to the news server being down or the network connection being down), the server starts falling farther and farther behind. If the incoming feeds are cut off for too long, the server does not catch up without human intervention. I have the Performance release of C news, nntp 1.5.11 with the msgidd patch, and three nntp feeds. Its running on a Sparc II with SunOS 4.1.3, 64MB RAM, and plenty of swap space. Currently there is about 600MB for the news spool, with /usr/lib/news on a separate partition. Neither partition is full. I have looked into the problem, and determined that the cause of the slow processing of incoming news is the /usr/lib/newsbin/input/newsrun script. What that script does that causes problems is an 'ls' of the /usr/spool/news/in.coming directory. When the server comes up after having been down for a couple of hours, my news feeds start sending me all of the back-logged news. This fills up the in.coming directory much faster than the server can process it. After a while, the 'ls' starts taking a lot of time (with ~1000 articles, it takes 5-10 seconds). This causes the newsrun script to take more time finding out which articles to process than the actual processing, and much more time than the nntp receipt of the articles. I have changed several things in the newsrun script to try to make it run faster. The default processing of 50 articles then wait 45 seconds seemed like a good place to start. I have increased the number of articles processed each loop iteration. I have decreased the time newsrun sleeps between batches. And, I replaced the 'ls | sort' with a 'ls -f | sort' so the list of files doesn't get sorted twice. All of these help, but don't eliminate the problem. Does anyone else have this kind of problem? How is it handled? Thanks, -Ralph- -- Ralph Waters | Internet: rwaters@jabba.ess.harris.com Harris Corp, ISD | "The sooner you fall behind, Melbourne, Florida | the longer you have to catch up"
Re: slow processing of backlogged news
Author: Mark Silbernagel
Date: Mon, 12 Jul 1993 18:38
Date: Mon, 12 Jul 1993 18:38
33 lines
2300 bytes
2300 bytes
In article <CA0CDt.623@blilly.uucp> Bruce Lilly, bruce@blilly.uucp writes: > In article <C9wr4C.EvJ@jabba.ess.harris.com>, > posted to newsgroups news.software.b,news.software.nntp,news.admin.misc, > rwaters@jabba.ess.harris.com wrote: > > > > And, I replaced the 'ls | sort' with a > >'ls -f | sort' so the list of files doesn't get sorted twice. All of > > Note that some versions of ls (e.g. the GNU version) don't > support -f. If there are no other flags, you ought to be able > to use ls -a. I had exactly the same problem shortly after installing CNEWS and NNTP. Turning batching on, as suggested earlier, helped a lot. The other significant delay was the 'ls' command, which I replaced with find. You might use a find|sort to get the job done once... If you stick it into a variable it could overflow with the number of articles you're seeing. Perhaps either a file, which would require extensive tweaking, or use "sed '50q' to just pick the first 50 or so. Before the changes, just executing that 'ls' was taking more than 45 seconds for each few articles... Mark Silbernagel | Mentor Graphics Corporation | ...You guys make entropy look 8005 S.W. Boeckman Road | real good -- Pete Kapustynski Wilsonville, OR 97070-7777 | (503) 685-4738 | mark_silbernagel@mentorg.com
SUMMARY: slow processing of backlogged news
Author: Ralph Waters
Date: Wed, 21 Jul 1993 19:10
Date: Wed, 21 Jul 1993 19:10
83 lines
4941 bytes
4941 bytes
A long time (two weeks) ago, I asked about my newsrun falling behind. Sorry for a slow summary, but my real job (the one that I get paid for) has been more critical than the news and system admin job (the one that I don't get paid for). So, when I found a little spare time, I tried out the fixes, and when I found more spare time, this summary gets posted. I received several answers, a couple of which fixed the problem. I received a caution about using the -f flag to ls not being portable. I suspected that it wasn't portable, but that was just me trying to treat the symptoms of the problem on my system, not a recommendation to include it anywhere else. I also received several recommendations to upgrade to INN. I have been thinking about that for a while now, but don't want to get into anything new until I have more time to devote to the news administration task. The problem turned out to be a misconfiguration of the nntp software. The two novice news admins who set this up (I'm one of them) didn't read the documentation enough, and missed the common/conf.h configuration for BATCHED_INPUT, TOO_MANY, TOO_BIG. Specifically, I had to #define BATCHED_INPUT. Without BATCHED_INPUT defined, nntpd wrote one file per incoming article. Not a desirable solution to processing news! Fixing the omission and re-installing the nntpd server fixed it. Thanks to: Doug Sewell <doug@cc.ysu.edu> Christopher Davis <ckd@eff.org> jerry@strobe.ATC.Olivetti.Com (Jerry Aguirre) Eirik Fuller <eirik@elf.Ithaca.NY.US> aad@siemens.siemens.com (Anthony A. Datri) Peter Wemm <peter@DIALix.oz.au> Francis Bell <fgtbell@kingston.ac.uk> linus@lysator.liu.se "Ryan Harvey" <HARVEY@vax.cns.muskingum.edu> bochner@das.harvard.edu (Harry Bochner) dhesi@rahul.net (Rahul Dhesi) bruce@blilly.uucp (Bruce Lilly) jsr@dexter.mi.org (Jay S. Rouman) Original question follows: >I keep having problems with my news server falling behind. Whenever the >incoming news feeds go down for any length of time (either due to the >news server being down or the network connection being down), the server >starts falling farther and farther behind. If the incoming feeds are cut >off for too long, the server does not catch up without human >intervention. > >I have the Performance release of C news, nntp 1.5.11 with the msgidd >patch, and three nntp feeds. Its running on a Sparc II with SunOS >4.1.3, 64MB RAM, and plenty of swap space. Currently there is about >600MB for the news spool, with /usr/lib/news on a separate partition. >Neither partition is full. > >I have looked into the problem, and determined that the cause of the >slow processing of incoming news is the /usr/lib/newsbin/input/newsrun >script. What that script does that causes problems is an 'ls' of the >/usr/spool/news/in.coming directory. > >When the server comes up after having been down for a couple of hours, >my news feeds start sending me all of the back-logged news. This fills >up the in.coming directory much faster than the server can process it. >After a while, the 'ls' starts taking a lot of time (with ~1000 >articles, it takes 5-10 seconds). This causes the newsrun script to >take more time finding out which articles to process than the actual >processing, and much more time than the nntp receipt of the articles. > >I have changed several things in the newsrun script to try to make it >run faster. The default processing of 50 articles then wait 45 seconds >seemed like a good place to start. I have increased the number of >articles processed each loop iteration. I have decreased the time >newsrun sleeps between batches. And, I replaced the 'ls | sort' with a >'ls -f | sort' so the list of files doesn't get sorted twice. All of >these help, but don't eliminate the problem. -- Ralph Waters | Internet: rwaters@jabba.ess.harris.com Harris Corp, ISD | "The sooner you fall behind, Melbourne, Florida | the longer you have to catch up"
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