[news.admin] a "nice" rnews...

jane@tolerant.UUCP (Jane Medefesser) (06/23/88)

Is there a way I can "nice" rnews to a lower priority? I thought
about renaming rnews to nrnews then making rnews a shell script
that does a "nice -5 nrnews" but I suspect it's not that simple.
Obviously I haven't thought about this much and I am hoping someone
else has and is willing to share the info.  

The problem is this: when rnews runs during normal working hours
it raises the load ave. on this system so high that getting any
real work done become tedious.  If I "renice" the process it just
"renice's" itself back to 0.

(I don't want to restrict polling during non-business hourse because 
we also exchange email with this system....)

Help?
Thanks in advance


============================================

Jane Medefesser		uucp: {pyramid,mordor,oliveb,ucbvax}!tolerant!jane
Tolerant Systems
San Jose, Ca  95134

sl@van-bc.UUCP (pri=-10 Stuart Lynne) (06/25/88)

In article <1751@tolerant.UUCP> jane@tolerant.UUCP (Jane Medefesser) writes:
>Is there a way I can "nice" rnews to a lower priority? I thought
>about renaming rnews to nrnews then making rnews a shell script
>that does a "nice -5 nrnews" but I suspect it's not that simple.

van-bc is a small 68010 box at 10mhz so I can sympathize. 

I run news with SPOOLNEWS defined. This means that nothing ever takes to
long when it runs from uuxqt. 

Crontab starts up script every fifteen minutes or so:

	15,30,45,0 * * * * /bin/su - news -c "nice -20 
		/local/lib/news/newshourly"

This keeps news unbatching well in the background. Newshourly also does a
check to see if there is already a copy running so there is never more than
one. Batching is done in a similiar fashion, and it also checks to ensure
that no unbatching is going on. 

To keep uucico from having to many problems I have all uucp logins
start up with pri=-5 (that decreases their nice value, increasing their
priority).  

Another thing to look out for is scramble inode free lists. News makes large
numbers of small files which are deleted and reallocated repeatedly. A great
way to get a random free list which is death on performance. fsck -s or -S
every once in a while helps a lot.

To preserve disk space for outgoing multiple feeds you can trick news in to 
creating one outgoing batched file which you trick uucp in to sending to
remote systems by forging a link to the file rather than creating a copy.
Once the links are made delete the original file. Then as uucico delivers
the files it destroys the links. When the last site gets theirs it just
quietly disappears. This saves disk space *and* having to batch the same
crud up more than once. My only overhead to add another full feed site is
the cpu cycles to deliver it. 


-- 
Stuart.Lynne@wimsey.bc.ca {ubc-cs,uunet}!van-bc!sl     Vancouver,BC,604-937-7532

wtm@bunker.UUCP (Bill McGarry) (06/28/88)

In article <1751@tolerant.UUCP> jane@tolerant.UUCP (Jane Medefesser) writes:
>Is there a way I can "nice" rnews to a lower priority?
>
>The problem is this: when rnews runs during normal working hours
>it raises the load ave. on this system so high that getting any
>real work done become tedious.
>

There are two defines in "defs.h" in the inews sources that you
may want to change.  The first is "NICENESS" and if defined, rnews
will "nice" itself to the value specified.  The second define
is "SPOOLNEWS" and if defined, incoming news is spooled rather
than being processed.  Then at the times when you want news to be
processed, then run "rnews -U" (usually via crontab).

What I do here is spool news up during the day and then run rnews -U
periodically starting after work hours, through the night and up to
the next morning.

Hope this helps!
				Bill McGarry

     PATH:  {oliveb, philabs, decvax, fortune, yale}!bunker!wtm

jane@tolerant.UUCP (Jane Medefesser) (06/29/88)

Thanks to everyone who responded. I un-commented out #DEFINE NICENESS in
defs.h, recompiled, reinstalled and it does just what I want.


============================================
Jane Medefesser		uucp: {pyramid,mordor,oliveb,sci}!tolerant!jane
Tolerant Systems
San Jose, Ca  95134