🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
2 messages
2 total messages Started by David Woolley Sat, 04 Jan 1997 00:00
Re: trn generates buttloads of XOVERs
#28696
Author: David Woolley
Date: Sat, 04 Jan 1997 00:00
94 lines
5110 bytes
[ Bogus, for about 18 months, Distribution inet deleted ]

[ Full text copied to news.software.readers, and followed up there as more
likely to produce a response from the authors. ]

In article <5a92b9$cng@news.wco.com>,
paul theodoropoulos  <paul@wco.com> wrote:
>Jef Poskanzer <jef@acme.com> wrote:
>> Something I noticed yesterday while debugging the proxy nnrpd I
>> mentioned elsewhere, is that trn generates a whole lot of XOVER
>> commands.  While you're reading an article it does XOVERs for
>> every other current article in the group, even the ones you've
>> long since read.  It does them in batches of 40.  Seems to me
>> that on machines serving lots of readers, this will severely
>> thrash the disk.

Based on trn-3.4 (I run 3.6, but 3.4 is the last one that I have in 
full form, rather than as patches), I think there may be a real problem,
namely a failure to make use of the data which was read ahead if the
read ahead didn't complete before the user typed a character.  However
I think you confuse the issue by describing perfectly reasonable actions
as though they were problems.

It shouldn't thrash the disk at all if you are running a modern server
and have adequate memory - if the overview files for active groups are
getting pushed out of the cache, you have much too little RAM.  I would 
say that this was true even if trn is broken.

I think the reason it is reading in background is to enable it to
construct the thread trees, without unnecessarily delaying the user.  It
is probably doing it in blocks of 40 to allow it to do other things in
parallel.  (Note that the code for trn-3.4 actually seems to use blocks
of 100, not 40.)

It reads in forwards time order, so there should be essentially no
thrashing at all, within a single pass, on a good server, as the
overview file should have been opened on entering the group and should
simply be read sequentially forwards a bit at a time.

I'm not aware of any server that implements XOVER but doesn't use an
overview file, although there are servers which do XHDR directly on the
raw articles.

If there is a problem, it may be that cached_all_in_range doesn't get reset
if the read ahead is interrupted.  There are two ranges:  one is the
range actually processed and the other is the range of relevant articles.
If cached_all_in_range isn't set, it seems to assume that the cached
data is unsafe and tries to refresh it completely.  I haven't fully 
analysed it, but it may well be that only parts are missing and flagged
as such, but, when using overviews, it is thought cheaper not to just
fetch individual articles.

If the read ahead is pre-empted, cached_all_in_range doesn't then get set.

It seems to me that either it should limit the cached range to the 
articles it has just grabbed, so that it can set cached_all_in_range,
or it should maintain a subrange of articles for which full overview data
has been fetched.  I haven't analysed the code enough to know the side
effects of this, and it is not a problem for me (I'm the only user on the
home system and everyone in the office is a Windows convert).

>> Has anyone looked at recompiling trn without these background XOVERs?
>> Is it a simple change?  A config option maybe?

I suspect that forcing the cheating parameter to FALSE on ov_data and
art_data - specifically when called from cache_all_arts, might have this
effect.  It won't stop it doing multiple XOVERs, but I think it will
ensure that the sequence completes before trn takes any notice of the
user.

>> ---
>> Jef
>
>I've pored over the configs and sources of trn numerous times, and
>recompiled several times in hopes of getting a handle on this very
>unfriendly behaviour - to no avail. We've simply resorted to setting up
>trn to run niced to 10 to try to keep a handle on the resources it
>consumes. Luckily trn isn't tremendously popular here.
>
>--
>Paul Theodoropoulos     admin@wco.com     VP, West Coast Online, Inc.
>
>Key Faceplant: I8 12 4U SO WE GO TO AN IP GW DO BE DO BE DO BE DO


-- 
David Woolley, London, England          david@djwhome.demon.co.uk
(Sending any email to this site constitutes a licence to copy it to any
company which might reasonably be assumed to have transported it or
might reasonably be assumed to service any addresses quoted in it. 15Sep1996)


Re: trn generates buttloads of XOVERs
#28897
Author: Vincent Archer
Date: Mon, 06 Jan 1997 00:00
34 lines
2151 bytes
David Woolley (david@djwhome.demon.co.uk) wrote:
> I think the reason it is reading in background is to enable it to
> construct the thread trees, without unnecessarily delaying the user.  It
> is probably doing it in blocks of 40 to allow it to do other things in
> parallel.  (Note that the code for trn-3.4 actually seems to use blocks
> of 100, not 40.)

Not specially in parallel. More notably to allow you to start reading
at once, when you have opened a 30000-articles group (say, a misc.jobs)
without waiting for the 30000-line XOVER to complete.

> It reads in forwards time order, so there should be essentially no
> thrashing at all, within a single pass, on a good server, as the
> overview file should have been opened on entering the group and should
> simply be read sequentially forwards a bit at a time.

It depends. I haven't looked at the innards of nnrpd, but I wouldn't be
surprised if it fclosed the overview after the completion of the command.
In which case, reading the *end* of the overview makes more sense: You hit
what you'll be reading in the next batch first, and never hit again the
blocks you already have read in the previous pass.

> I'm not aware of any server that implements XOVER but doesn't use an
> overview file, although there are servers which do XHDR directly on the
> raw articles.

nnrpd is supposed to complement the XOVER data from the articles if the
.overview cache (it *is* a cache file, no more) doesn't has it.

-- 
Vincent ARCHER  				Email: archer@frmug.org

Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads