Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/17/84 chuqui version 1.7 9/23/84; site nsc.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!ihnp4!nsc!chuqui
From: chuqui@nsc.UUCP (Chuq Von Rospach)
Newsgroups: net.news
Subject: Re: The politics of groups (of people)
Message-ID: <3262@nsc.UUCP>
Date: Sun, 15-Sep-85 12:37:38 EDT
Article-I.D.: nsc.3262
Posted: Sun Sep 15 12:37:38 1985
Date-Received: Mon, 16-Sep-85 00:11:30 EDT
References: <1996@amdahl.UUCP> <791@vortex.UUCP> <626@bu-cs.UUCP> <1090@ulysses.UUCP> <2167@ukma.UUCP>
Reply-To: chuqui@nsc.UUCP (Chuq Von Rospach)
Organization: Uncle Chuqui's Lemming Farm
Lines: 36
Summary: 

In article <2167@ukma.UUCP> david@ukma.UUCP (David Herron, NPR Lover) writes:
>This one is easy to fix.  Simply have rnews do unbatching.  It won't be
>very hard (I think, haven't really gotten into the code with this in mind
>just yet) but it would save those thousands of execs (one for every article).

I looked at this in 2.10.1 and it unfortunately is (or was, I haven't
looked to see if 2.10.3 has been really cleaned up) non-trivial.
inews/rnews was written under the assumption that a lot of the code was
only accessed once and didn't translate well at all to running multiple
messages through it.

There werw two major areas of performance problem. The first was the
multitude of fork() calls. By default it cost you two fork() calls per
message because someone got lazy and used a 'system()' call. The other,
rather more insidious, was that inews did a lot of writing and re-reading
of the message. The basic path for the data was:

	stdin -> inews -> file in /tmp -> back into inews -> files in
	/usr/spool -> back into inews -> back into /usr/spool -> linked
	into final location.

The reason for this was that everything it read from stdin went into a
holding file, then the file was re-read, the header stripped and parsed,
and the message stored again. Then, they created a new file, wrote the new
header, and copied the message from the storage file to the final file and
linked it into place. You'd probably save a LOT of processing if you could
teach inews to simply write things once, but it was set up this way because
it was the 'easy' way to handle the headers and things...

chuq

-- 
Chuq Von Rospach nsc!chuqui@decwrl.ARPA {decwrl,hplabs,ihnp4}!nsc!chuqui

An uninformed opinion is no opinion at all. If you dont know what you're
talking about, please try to do it quietly.