Re: Yarn

From: Robert P. Rush (bobr@mcs.com)
Date: Tue, 29 Jul 1997 07:42:24 -0500

Hello fellow Yarners,

On Mon, 28 Jul 1997 17:51:57 -0500,
In article <NKS3zY9GAUPI092yn@onr.com>, labrat@onr.com (Michael Gray) wrote:
> On Mon, 28 Jul 1997 08:19:12 -0500,
> bobr@mcs.com (Robert P. Rush) wrote this about Re: Yarn:
> >Hi fellow Yarners,
[...]
> >I think that'd be more a job for a separate packing utility. The
> >import utility did it's job by importing all the articles you told it
> >to.
>
> Once upon a time (where've I heard that before?) it was stated here on
> the list that import was *supposed* to fill the newsbase from the
> first available space. The way I see it, it's either filling from the
> last available space or maybe the last expired message (but where
> would this info be kept and why?) It's true that it's importing fine,
> it just seem backwards the way it's done.

OK, I see what you're saying. I haven't tried analyzing how Yarn
places articles in the news base. I've only been using version 0.92
for a few months now.

If we assume a steady flow of news into the newsbase, and that expire
is run regularly, the most efficient filling method is to use the
_smallest_ free space in the news base that will hold the article
rather than the _first_ free space. In the long run, this will
produce the minimum amount of wasted space that cannot hold an
article. I don't know if Yarn uses this method, but I wouldn't be
surprised if it did. Especially considering your observations.

What probably happened is that when you imported your monster batch of
news, import placed it in one large chunk in your newsbase. You then
read most of this big chunk of news, leaving a number of articles at
the end unread. When you ran expire -r, it left this huge, multi
megabyte hole in the middle of your news base.

The end result is that you have a number of articles and small
'article sized' holes at both the beginning and of your news base with
one or more huge holes in the middle. Import will fill the 'article
sized' holes at the beginning and end of the news base, but won't touch
the big hole in the middle.

>
> >You might try Yarnpack by Tim Middleton <http://www.vex.net/~x>. This
> >will eliminate all the free space in your news base. Or, you might
> >try one of the rebuild options.
>
> Last I heard here, it was still very much a beta. I'd like to hear
> from anybody out there who's used it. I'd rather not do a rebuild
> unless there's something really wrong because of the expire date
> problem.

I have used it and it works. I haven't observed any errors in the
news base either before, during, or after using it. No red screens in
Yarn, and no errors reported by any utilities.

To be sure that yarnpack works, I tried the following:

1. ran "expire -r"
2. Tested the news base by doing the following steps:
a. ran "yarn", checked out various news groups by searching for
text that wouldn't be found. This will cause Yarn to read each
article in the newsgroup in it's entirety.
b. ran "nnign" (No News is Good News, by Tim Middleton)
c. Write down the number and total size of the articles in the
news base as reported by nnign.
d. ran "yarnpack /I" (by Tim Middleton)
3. saved a copy of: history.dir, history.pag, news.dat, supersed.pag,
and overview\*.*, newsrc (for Yarn and for Souper or uqwk)
4. ran "yarnpack /I" (by Tim Middleton)
5. Re-tested the newsbase using the tests in step 2.
The number and total size of the articles should be the same as in
step 2.
6. imported news
7. Re-tested the newsbase using the tests in step 2.
8. Use Yarn for a while.
9. Discarded the saved files from step 3.

I think Tim's disclaimer is to protect himself since he didn't use an
official definition of Yarn's news base to develop his programs. It's
possible that Chin may have hidden some special case in the news base
that Tim doesn't know about, but I doubt it.

Let me know if you have any questions,

bob

-- 
Bob Rush                    | eschew obfuscation
bobr@mcs.com                |
<http://www.mcs.com/~bobr/> |

Procrastinators do it tomorrow.