Newsgroups: news.software.b
Path: utzoo!henry
From: henry@utzoo.uucp (Henry Spencer)
Subject: Re: CNews building up files in "in.coming"
Message-ID: <1989Oct23.023759.17067@utzoo.uucp>
Organization: U of Toronto Zoology
References: <1989Oct22.192159.4827@acd4.UUCP>
Date: Mon, 23 Oct 89 02:37:59 GMT

In article <1989Oct22.192159.4827@acd4.UUCP> mjb@acd4.UUCP ( Mike Bryan          ) writes:
>I've noticed that when C News is unbatching articles in the in.coming
>directory, it doesn't remove the batch files until it is completely
>done.  It seems to me that newsrun should remove each file in turn
>immediately after unbatching the articles it contains...

If you are running a current C News, it will (a) remove the batch files
after every 50 files processed, or (b) remove the batch file after each
file processed, depending on whether space is tight or not.  This was
a deliberate change from our earlier version that always did (b).

>... I'm curious, though; why
>not just remove each file when you are done with it?

Because there is a noticeable performance loss in doing *anything*
unnecessary on each pass through the inner loop.  As it is, on systems
with high-performance shells (with the "test" command built in), when
space is plentiful the inner loop runs compress and relaynews, period.

>... If we were doing any other work
>on that segment, there would have existed a chance of running the
>system out of space before CNews finished its current file.  [We
>weren't, however.]  Granted, it's a slim chance, but it would be
>lessened if CNews would remove batch files one at a time.

This sort of thing is the reason why spacefor, as shipped, has safety
margins built in.  C News as shipped will fall back on strategy (b)
when space margin falls below 5000 blocks.  If you have programs that
suddenly eat multiple megabytes on your news filesystems, then you need
to either crank the margins up or modify the shell files to change the
strategy.  Setting the margins to zero is a bad idea no matter how
well-behaved your system is.
-- 
A bit of tolerance is worth a  |     Henry Spencer at U of Toronto Zoology
megabyte of flaming.           | uunet!attcan!utzoo!henry henry@zoo.toronto.edu
