🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #13744

Re: trn generates buttloads of XOVERs

#13744
From: David Woolley
Date: Sat, 04 Jan 1997 00:00
94 lines
5185 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)


Technical Details
Message-ID: <E3HHnp.Fsu@djwhome.demon.co.uk>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
References: <59ap56$37h@shellx.best.com> <5a92b9$cng@news.wco.com>

Show Full Headers
Complete Article Headers
Message-ID: <E3HHnp.Fsu@djwhome.demon.co.uk>
Subject: Re: trn generates buttloads of XOVERs
Date: Sat, 04 Jan 1997 00:00:00 +0000
From: david@djwhome.demon.co.uk (David Woolley)
References: <59ap56$37h@shellx.best.com> <5a92b9$cng@news.wco.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
X-Deja-AN: 207839760
Sender: news@djwhome.demon.co.uk (news)
X-mail2news-user: news@djwhome.demon.co.uk
Followup-to: news.software.readers
X-mail2news-path: djwhome.demon.co.uk
Organization: Demon Subscriber at Home
Newsgroups: news.software.nntp,news.software.readers