Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!husc6!mit-eddie!uw-beaver!ubc-vision!van-bc!sl From: sl@van-bc.UUCP (Stuart Lynne) Newsgroups: comp.unix.questions,news.sysadmin Subject: Re: uuxqt problems with news Message-ID: <748@van-bc.UUCP> Date: Sat, 23-May-87 14:27:49 EDT Article-I.D.: van-bc.748 Posted: Sat May 23 14:27:49 1987 Date-Received: Sun, 24-May-87 08:58:53 EDT References: <116@bvax.UUCP> <311@pollux.UUCP> Reply-To: sl@van-bc.UUCP (Stuart Lynne) Organization: Public Access Network, Vancouver, BC. Lines: 101 Keywords: news, VAX 730, HELP! Xref: mnetor comp.unix.questions:2519 news.sysadmin:214 In article <311@pollux.UUCP> jgd@pollux.UUCP (Dr. James George Dunham) writes: >In article <116@bvax.UUCP> dave@bvax.UUCP (Dave Wallace) writes: >> >>I recently joined the 'net but have a problem. I am running System V, >>Release 2.2 on a VAX 730( No, that's NOT the problem). When I get my >>'feed', uuxqt runs, forking a sh, who forks a sh, who forks a >>compress and rnews,( plus the compress forks an unbatch). I can >>get up to 6 of these running at once, which causes the 730 to slow down >>just a bit (-: . I currently get my feed from one site and don't send >>to anyone else ( until I get this problem resolved. ) It takes the 730 >>most of a working day to process 6 or 7 batch files in /usr/spool/uucp! It >>seems like these processes are fighing them selves. Any body have >>any suggestions? Whats probably happening is the mulitple copies of compress fighting for table space. > > We reduced the priority of our news jobs so they would not interfere >with other users doing work on our system and have a similiar problem. >It seems that the lock on uuxqt is a timed lock, and so if you have a uuxqt >job running for a long time and someone else calls, they can start a new >uuxqt job if the time on the lock is expired. We have seen several uuxqt >jobs get started when we have long jobs running in the background. On our >system the problem get worse since it appears there is a limit to the number >of processes one user can run. When the limit is reached, then everything >comes to a halt. > I feel that the correct solution is to make the lock on uuxqt a pid >lock rather than a timed lock. This way, only one copy of uuxqt can run >at a time. If uuxqt is killed for some reason, then the pid will be wrong >and a new one is allowed to start up. A quick fix is to lengthen the time >of the lock which is X_LOCKTIME in uucp.h and when multiple jobs are found, >kill all but the oldest one. I am hoping to get the lock changed to a pid >lock this summer. The best (?) way around this problem seems to be to define SPOOLNEWS and re make your news system. rnews/inews will then simply copy the incoming files to /usr/spool/news/.rnews. Then once(twice) per hour run a script from crontab to run rnews -U. With a couple of tests you can figure out if rnews is already unbatching and exit if it is. Defining NICENESS does seem to be a big win for small systems. You stop noticing when news is being unbatched. The other problem with running rnews from uuxqt is that if it does lock up correctly so that no second copy of rnews starts up, your mail gets delayed until the news is unbatched. Which on some small systems can be hours. Spooling the news takes only a few seconds and then the system is ready to forward incoming mail. In general you should try avoid running jobs which take a long time to execute directly from uuxqt. Instead try and use uuxqt to spool the information and initiate the job as a separate task allowing uuxqt to exit or run the job from a cron entry. --------- Cut here for sample news hourly script ----------- # hourly script for news # # check for various lock files # initiate rnews -U to unspool news # ACTIVELOCK="active.lock" ACTIVEBATCH="active.unbatch" RNEWSLOCK="/usr/spool/news/.rnews.lock" cd /usr/local/lib/news if test -f $ACTIVELOCK then echo newshourly: $ACTIVELOCK exists exit 1 fi if test -f $ACTIVEBATCH then echo newshourly: $ACTIVEBATCH exists exit 1 fi if test -f $RNEWSLOCK then echo newshourly: $RNEWSLOCK exists exit 1 fi ln active $ACTIVEBATCH /usr/local/bin/rnews -U rm $ACTIVEBATCH # end of news hourly -- Stuart Lynne ihnp4!alberta!ubc-vision!van-bc!sl Vancouver,BC,604-937-7532