[net.news] News batching to avoid uucp overload

johnl (11/02/82)

At ima, practically all of the news comes from one source (cca) and is
forwarded on to two other sites (n44a and cfiB.)  When I added cfiB as
a news recipient, all uucp traffic ground to a halt because the spool
directory became huge and searching it took so long that other machines
would hang up in the meantime.

To get rid of this trouble, I cooked up the following scheme:  Rather
than handing news items to uucp as they are posted, I create batched
spool files in /usr/tmp/news.XXXXXX where XXXXXX is the time in hours
from 1970.  Then every few hours, I run another program that takes all of
the spool files and uux'es a "bnproc" command on them at the remote
hosts.  This program allows multiple "host" arguments so that the batched
files can be sent to more than one host.

Finally, I wrote a tiny "bnproc" program for the other sites, which is
executed there via uux, that breaks up the batched spool files and passes
the articles one at a time to rnews.  I also added a "-l" switch to uux
that tries to link to files rather than copying them, to avoid making
multiple copies of stuff for multiple hosts.

The upshot is that there are about 10 spool files in my directory rather
than 200, which speeds up uucp a lot.  Also note that uucp delays a lot
between transfers so that one large file is transferred a lot faster than
several small ones.

If there is sufficient interest, and when the programs have been shaken
down some more, I'll post the programs to the net.  None of them are more
than a few pages long.

John Levine, IECC, PO Box 349, Cambridge MA 02238; (617) 491-5450
decvax!cca!ima!johnl, harpo!esquire!ima!johnl, ucbvax!cbosgd!ima!johnl,
yale-co!jrl (all uucp), Levine@YALE (Arpa).