🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
11 messages
11 total messages Started by Net Scum Mon, 30 Jun 1997 00:00
The Incredible Expanding History File Problem
#18870
Author: Net Scum
Date: Mon, 30 Jun 1997 00:00
100 lines
6380 bytes
As the daily news volume has easily broken the 600 000 article mark and
shows no signs of letting up, not only has the number of cancel messages
combined with traditional Unix filesystems been causing strain on a hefty
number of news servers out there, but also I suspect the increase in size
of the history file has been slowing things down for some.

The conventional wisdom has been to try to maintain a history file for two
weeks, turning down anything older than that time.  However, as a site
which can actually keep up with a full feed would be trying to write to a
file larger than half a gig with such a policy, a lot of sites have cut
back on the number of days.  I'm limited by space to not much more than
300M, and over a couple months, I've had to drop the time I remember
history entries from 11 days down to yesterday's whacking to only seven
days.

A reader site which accepts articles older than the remember time runs a
risk of duplicated articles.  In theory, my history file has the potential
of being twice the size it needs to be, if some of my peers barf up
week-old stale news that I've seen, but forgotten about.  However, I'm
running this truncated history file on transfer machines, and it appears
that I get about 10% or less of a feed recycled with this shorter remember
time.  For such transfer machines, it is the responsibility of the
downstream site to refuse recycled articles, so while it's not good, it's
not criminal either. 

The size of the history text file depends on a number of things, from the
obvious number of entries, to the length of the Message-ID header, and the
path to the groups where the article is posted.  My history text file is
actually smaller than a conventional history file, as the article path is
not stored as a directory path, but as a typically shorter file:offset
combination.  Other sites with the same number of history entries that
fill 300M on my disk could easily have 400M or 500M sized history text
files.

The efficiency of a history lookup is also related to the size of the
history text file.  (Forgive me if I err here, for I haven't found a good
explanation of how the history database works.)  The .pag BDZ database
file is created at a size which depends on the number of entries in the
text file (and also depends on the number of bits used as index into this
file), but as the database entries are pointers to positions in the text
file, there need to be enough bits set aside to span all possible
positions in this file.  That is, for my 300M history file, I need 29
bits, which will hold me until my text file is just over half a gig in
size.  If I were to shave my history text file down to less than 270M,
either by lopping off another day or two from my remember time, or by
handling fewer articles, 28 bits would suffice.  If I've only got 28 bits
but my history file is larger than 270M, any entries after the 2^28th byte
must be looked up directly in the text file, and things go horribly
downhill for the average system.

In the case of a history lookup, the DBZ match is advisory, and one must
be certain by actually looking into the text file to verify that an entry
is present.  The additional bits not needed are used to store part of the
message ID.  The more of a message ID can be stored, the less one needs to
grope through the text file.  So, we have the situation where it's more
efficient to keep a smaller history text file, yet the traffic volume of
today makes that impossible.

This is the situation which Joe Greco's 64-bit history indexing patch is
supposed to help those admins for whom it works buy a bit of time; say,
another couple months the rate things are going.  However, as one adds
more peers, one needs to do more history text file lookups to verify that
an offered message really is there.  This is what Clayton O'Neill's
history cache patch is designed to help, by storing recent entries for the
benefit of well-synchronized peers.

But for suffering sites like myself, with 29 bits needed to store the
position in the text file, we're probably doing a lot of false lookups
into the text file, and a disk buffer cache can only help so much there,
even though chances are any actual matches are going to be near the tail
of the history file.  For suffering admins such as myself, whose eyes sort
of glaze over when poring over the dbz code, we want numbers.  Figures.
Forms and shapes.

My logs, before I started to run out of space to keep this info, would
show around 5 million messages being offered daily, and 10% of them
accepted, meaning I'm refusing some 4 million or so messages by virtue of
being in the history cache, or because I dug around in the text file until
I came up with a match.  But what I'd like to know is, on average, for
each message I'm offered, with 29 bits recorded in the history.dir file to
play with, how many actual times am I banging on the text file with false
hits?

Whatever it is, with an 80% busy history disk and a sluggish server, it's
time for me to apply more hackery.  I don't like the tens of thousands of
articles passing through my servers a second time, I don't like the time
it takes to do the history lookups (my other server with an even smaller
history file and 1/8 the number of lookups daily is doing no better speed-
wise), I don't like that I'm constantly running out of space, I don't like
life, and I don't want to do the math if there's a way I can weasel a
better overview of the history lookups from someone more knowlegeable. 


Thanks heaps,
Barry Bouwsma, news admin for Radio Praha
serving steaming slabs o' spam and gigabytes of gunk for the masses


Re: The Incredible Expanding History File Problem
#18858
Author: Chris Sedore
Date: Mon, 30 Jun 1997 00:00
103 lines
4895 bytes
Most of my comments apply to nntprelay, since that's what we use here,
but...

Joe Greco <jgreco@ns.sol.net> wrote in article
<5p8c49$cjl$1@earth.execpc.com>...
> In news.software.nntp article
<Pine.LNX.3.96.970630125250.2588A-100000@marley.vszbr.cz>,
ag786@yfn.ysu.edu wrote:
[...]
> 
> I haven't held more than 7 days in a long time.
> 
> :A reader site which accepts articles older than the remember time runs a
> :risk of duplicated articles.  In theory, my history file has the
potential
> :of being twice the size it needs to be, if some of my peers barf up
> :week-old stale news that I've seen, but forgotten about.  However, I'm
[...]
>
> What's criminal is if you haven't lowered your "c" parameter from 14.
> Otherwise what you're describing shouldn't happen.

I'm not sure what you're describing that shouldn't happen, but I reject
about 50,000-60,000 articles per day because they are too old (>7 days).  I
remember between 7-9 days (depending on the history expire cycle and the
article volume). 
 
[...]
> :However, as one adds
> :more peers, one needs to do more history text file lookups to verify
that
> :an offered message really is there.  This is what Clayton O'Neill's
> :history cache patch is designed to help, by storing recent entries for
the
> :benefit of well-synchronized peers.
> 
> If history text lookups are a bottleneck for you, my opinion is that
> something's probably wrong.  I've run 20,000 lookups per 300 second
period
> without killing my I/O subsystems here, and that's in production, and
> without Clayton's code, which I haven't had time to play with.

Well, for another datapoint, we have sustained an average of 1385 history
lookups per second over a 1000 second period (on your scale of 300 seconds
it would be 124650) at the same time it was offering about 500/sec
outgoing, and accepting about 60 per second incoming.  This on a 192MB
Pentium Pro 200 with a 3 disk stripe for history (3 older DEC RZ28s--2GB
5400rpm).  I mention this mostly to point out that there isn't necessarily
a bottleneck in using the articleid as we do full articleid based checks,
rather than using MD5 or similar.  We ran out of network, our we could have
done better.

Our history format is binary rather than text, and we use a simple hash
based index scheme, the index pointing to reversed linked "buckets" through
the history file.  Expiration happens by "sliding" the history data down
(essentially copying the data from about 60 megs into the file back to
offset 0 and reusing the space at the end).  Pointers in the hash index are
updated while the copy is ongoing.  The records are not fixed length, since
we store the actual article id in the file.

We average about 270 history lookups/sec (measured over a 10 day period),
or about 81,000 over 300 seconds.  The 1000 second average ranges from
about 200 (at night) to around 400 (peak weekday hours).
 
[...]
> :My logs, before I started to run out of space to keep this info, would
> :show around 5 million messages being offered daily, and 10% of them
> :accepted, meaning I'm refusing some 4 million or so messages by virtue
of
> :being in the history cache, or because I dug around in the text file
until
> :I came up with a match.  But what I'd like to know is, on average, for
> :each message I'm offered, with 29 bits recorded in the history.dir file
to
> :play with, how many actual times am I banging on the text file with
false
> :hits?
> 
> That's a value that can be calculated (although when I did so, my "in
real
> life" numbers were somewhat higher than expected, presumably I forgot to
> take some factor into account).
> 
> :Whatever it is, with an 80% busy history disk and a sluggish server,
it's
> :time for me to apply more hackery. 
> 
> Or maybe it's time for you to get a second history disk to stripe with.
> 
> When newsfeeds.sol.net had 1xST31055N for history, I was seeing 10-15ms
per
> history lookup on average.  When I went to 2xST31055N, that dropped to a
> much more reasonable 2ms per history lookup.
> 

How much memory does newsfeeds.sol.net have?  For us, keeping the index
file and the most recent history entries in disk cache is crucial.  Both
are memory mapped files.

-Chris

Re: The Incredible Expanding History File Problem
#18878
Author: Joe Greco
Date: Mon, 30 Jun 1997 00:00
161 lines
8030 bytes
In news.software.nntp article <Pine.LNX.3.96.970630125250.2588A-100000@marley.vszbr.cz>, ag786@yfn.ysu.edu wrote:
:The conventional wisdom has been to try to maintain a history file for two
:weeks, turning down anything older than that time.  However, as a site
:which can actually keep up with a full feed would be trying to write to a
:file larger than half a gig with such a policy, a lot of sites have cut
:back on the number of days.  I'm limited by space to not much more than
:300M, and over a couple months, I've had to drop the time I remember
:history entries from 11 days down to yesterday's whacking to only seven
:days.

I haven't held more than 7 days in a long time.

:A reader site which accepts articles older than the remember time runs a
:risk of duplicated articles.  In theory, my history file has the potential
:of being twice the size it needs to be, if some of my peers barf up
:week-old stale news that I've seen, but forgotten about.  However, I'm
:running this truncated history file on transfer machines, and it appears
:that I get about 10% or less of a feed recycled with this shorter remember
:time.  For such transfer machines, it is the responsibility of the
:downstream site to refuse recycled articles, so while it's not good, it's
:not criminal either. 

What's criminal is if you haven't lowered your "c" parameter from 14.
Otherwise what you're describing shouldn't happen.

:The efficiency of a history lookup is also related to the size of the
:history text file.  (Forgive me if I err here, for I haven't found a good
:explanation of how the history database works.)  

Not really, as in general you are only going to cache a small part of the
history text file (unless you have gobs of RAM).  I've always worked with
the assumption that one WILL go to disk for a history text access, except
for the last few thousand articles written, since those will tend to be
in cache.  That helps when you've got dozens of peers all feeding you up-
to-date feeds.

:The .pag BDZ database
:file is created at a size which depends on the number of entries in the
:text file 

Yes

:(and also depends on the number of bits used as index into this
:file),

No, unless that's a sly reference to a 64-bit DBZ variant, but in either
case, the size is mainly a factor of #entries.

:but as the database entries are pointers to positions in the text
:file, there need to be enough bits set aside to span all possible
:positions in this file.  That is, for my 300M history file, I need 29
:bits, which will hold me until my text file is just over half a gig in
:size.  If I were to shave my history text file down to less than 270M,
:either by lopping off another day or two from my remember time, or by
:handling fewer articles, 28 bits would suffice.  If I've only got 28 bits
:but my history file is larger than 270M, any entries after the 2^28th byte
:must be looked up directly in the text file, and things go horribly
:downhill for the average system.

Hmmmm, well, sorta.

:In the case of a history lookup, the DBZ match is advisory, and one must
:be certain by actually looking into the text file to verify that an entry
:is present.  The additional bits not needed are used to store part of the
:message ID.  The more of a message ID can be stored, the less one needs to
:grope through the text file.  So, we have the situation where it's more
:efficient to keep a smaller history text file, yet the traffic volume of
:today makes that impossible.

Reduce remember time and "c" param.  I run with "3" on a top 25 news server.

:This is the situation which Joe Greco's 64-bit history indexing patch is
:supposed to help those admins for whom it works buy a bit of time; say,
:another couple months the rate things are going. 

I'm not sure I agree...

:However, as one adds
:more peers, one needs to do more history text file lookups to verify that
:an offered message really is there.  This is what Clayton O'Neill's
:history cache patch is designed to help, by storing recent entries for the
:benefit of well-synchronized peers.

If history text lookups are a bottleneck for you, my opinion is that
something's probably wrong.  I've run 20,000 lookups per 300 second period
without killing my I/O subsystems here, and that's in production, and
without Clayton's code, which I haven't had time to play with.

:But for suffering sites like myself, with 29 bits needed to store the
:position in the text file, we're probably doing a lot of false lookups
:into the text file, and a disk buffer cache can only help so much there,

As you approach 32, you're going to be doing more and more "false" lookups 
to resolve DBZ collisions.  At 30 bits it's almost intolerable.

:even though chances are any actual matches are going to be near the tail
:of the history file.  For suffering admins such as myself, whose eyes sort
:of glaze over when poring over the dbz code, we want numbers.  Figures.
:Forms and shapes.

What kind of numbers?  Maybe I still have my modified DBZ around that
originally gave me some of the numbers I had used to justify 64-bit DBZ.

:My logs, before I started to run out of space to keep this info, would
:show around 5 million messages being offered daily, and 10% of them
:accepted, meaning I'm refusing some 4 million or so messages by virtue of
:being in the history cache, or because I dug around in the text file until
:I came up with a match.  But what I'd like to know is, on average, for
:each message I'm offered, with 29 bits recorded in the history.dir file to
:play with, how many actual times am I banging on the text file with false
:hits?

That's a value that can be calculated (although when I did so, my "in real
life" numbers were somewhat higher than expected, presumably I forgot to
take some factor into account).

:Whatever it is, with an 80% busy history disk and a sluggish server, it's
:time for me to apply more hackery. 

Or maybe it's time for you to get a second history disk to stripe with.

When newsfeeds.sol.net had 1xST31055N for history, I was seeing 10-15ms per
history lookup on average.  When I went to 2xST31055N, that dropped to a
much more reasonable 2ms per history lookup.

:I don't like the tens of thousands of
:articles passing through my servers a second time,

A solvable configuration problem.  rc.news, FLAGS="[...] -c3"

:I don't like the time
:it takes to do the history lookups (my other server with an even smaller
:history file and 1/8 the number of lookups daily is doing no better speed-
:wise),

More I/O can solve it.

:I don't like that I'm constantly running out of space, 

And fortunately more I/O means more disk which means more space.

:I don't like
:life, 

Neither do I but that's not a problem I'll solve for you.

:and I don't want to do the math if there's a way I can weasel a
:better overview of the history lookups from someone more knowlegeable. 

What is it that you want to know?  I may be one of the few parties
responsible for any serious DBZ hacking in this decade, so I guess you
should ask me.

FWIW, I haven't really devised any substantially-better-than-DBZ methods,
although I have some ideas which could be used to reduce the requirements
somewhat, although some big changes would be needed.

... JG

Re: The Incredible Expanding History File Problem
#18891
Author: Larry Vaden
Date: Mon, 30 Jun 1997 00:00
17 lines
996 bytes
Joe Greco <jgreco@ns.sol.net> wrote in article
<5p8c49$cjl$1@earth.execpc.com>...
> When newsfeeds.sol.net had 1xST31055N for history, I was seeing 10-15ms
per
> history lookup on average.  When I went to 2xST31055N, that dropped to a
> much more reasonable 2ms per history lookup.
> ... JG

What stripe size did you use?

Are you using MD on Linux?

Thanks,


Re: The Incredible Expanding History File Problem
#18898
Author: Matt Dillon
Date: Tue, 01 Jul 1997 00:00
88 lines
5051 bytes
:In article <5p8ns5$jq1$5@darla.visi.com>,
:Mike Horwath <drechsau@yuck.net> wrote:
:>Hmm...
:>
:>I think Diablo does things differently using a MD5 sum of the message
:>id, but I could be wrong...

    Diablo uses a duel prime-mod-xor hashing algorithm to obtain a 62 bit
    hash code from the message-id.  It seems to work pretty well.. I figure
    message-id's are not normally generated from prime numbers, so there's
    a good dispersal.  MD5 would probably be overkill.

    Keeping 16 days worth of message-id's, Diablo's dhistory file is
    approaching 300 MB.  Each history file entry is 28 bytes, so the
    history file is storing upwards of 10 million message-id's.  It
    ranges between 200 MB just after the bi-weekly history cleaning
    run to a bit over 300 MB just before the next cleaning run.

:>Now, I really can't do much more than watch some of this stuff
:>happening, but something does need to be done.
:>
:>My reader machine is slowly dying in terms of performance.  What was
:>once a very fast dual processor sparc 10 is becoming quite the hulk of
:>a beast.  It was handling 45 feeds just 4 months ago by itself before

    One thing I do is keep the spool on my newsfeeds machine small.. only
    8 GB.  This reduces overhead somewhat.

    There is a general trend with news backbones becoming more and more 
    real-time.  The obvious intermediate solution is to reduce the history
    file retention time from 16 days to 8 (and not accept any article over
    7 days old), which would halve the size of the history file on the
    newsfeeds box.

    A typical newsreader box has a somewhat larger problem in that the history
    file entry must stick around as long as the article.  However, it would
    not be necessary to follow hash chains beyond the 8 day mark (with an
    8 day retention) since we would not accept any article over 7 days
    old anyway, so the larger spool does not necessarily result in a
    less-cacheable history file.  If the initial hash index also stores
    a timestamp, it could be made very efficient.

:>sd3       2.0  4.5   12.5   32.5  0.0  0.1   14.4   0   7 
:>sd8      19.4 10.3  144.2   70.8  0.0  1.2   41.5   0  36 
:>sd9      13.0  5.2   86.5   32.3  0.2  0.6   45.6   0  18 
:>sd14      8.5  8.1   59.0   60.7  0.0  0.5   30.4   0  21 
:>sd16      8.3  8.1   58.0   61.0  0.0  0.5   28.8   0  21 
:>sd17      8.3  8.0   57.5   60.1  0.0  0.5   29.0   0  21 
:>sd18      8.2  8.0   57.1   60.2  0.0  0.5   30.5   0  21 
:>sd19      8.4  8.4   58.1   61.8  0.0  0.5   29.3   0  21 
:>
:>Service times (svc_t) are slowly increasing though :(
:>
:>(sd8 is overviews, sd9 is history storage, sd14-19 are spool)

    Another thing I've noticed with Diablo is that once I got away
    from the one-file-per-article storage format, it's sensitity
    was almost exclusively with history file lookup latencies rather
    then spool file latencies.  It's gotten to the point where
    I am willing to stripe the history file's partition across two
    physical disks.  I think I will reduce the history file
    retention time first, though, since a 150 MByte history file
    will help the cache out a lot better then a 300 MByte history file
    and that makes all the difference.

    Lastly, most newsfeeds out there are still in the 'we need multiple
    parallel connections to push a full feed' mentality engendered from
    INN's broken implementation.  Something like Diablo really needs only
    one or two incoming streaming feeds from each feed... in fact, usually
    just one, and can keep up just fine.  I will often see our news box
    get bogged down and start to swap because bbn's systems suddenly decide
    to make 20 parallel connections to me, or maxwell decides to make 10.
    It's entirely unecessary... when one has 70+ incoming feeds, and a
    quarter of them want to make three or four connections each, one winds
    up with about three times the number of connections that one really 
    needs.

					-Matt

:>-- 
:>Mike Horwath    IRC: Drechsau    LIFE: Lover    drechsau@yuck.net
:>Visi:  info@visi.com                           drechsau@Geeks.ORG
:>Twin Cities area Internet Access:  612-288-0880 for more info
:>The founding member of Minn. Coalition for Internet Accessibility


Re: The Incredible Expanding History File Problem
#18928
Author: Net Scum
Date: Wed, 02 Jul 1997 00:00
224 lines
12847 bytes
On 30 Jun 1997, Joe Greco wrote:

> :A reader site which accepts articles older than the remember time runs a
> :risk of duplicated articles.
> 
> What's criminal is if you haven't lowered your "c" parameter from 14.
> Otherwise what you're describing shouldn't happen.

    Actually, no matter what I do, I'm going to have a problem until *all*
sites drop articles more than, say, a week old.  Even today, I'll still be
seeing fresh articles disgorged from some far reaches, that have been
sitting idly, festering for more than a week before making it into the
mainstream.  Certain schools in the southeastern US seem to have a problem
here in particular, and while pretty much all of us would agree that a
site has a problem if it can't get its posts into the backbone within a
few minutes, it happens.

    (Rummages around under the desk to see if INN writes history entries
for articles too old, when one is configured to remember trash...)  The
criminal thing in this part of the world is the bandwidth taken to
transfer an article needlessly.  I'm running pretty much at 100% of line
capacity outgoing, but nearly all of this is to destinations in this
country, over fast connections with available capacity.  However, it's the
incoming bandwidth that is limited to me.  Whether an article passes
through my server with shortened remember time a second time, or is sent
to me to be tossed away after receipt, the big damage is the use of the
bandwidth.  So long as any peer has articles older than a week, the only
solution for me is to hold the message IDs longer.  Or relocate somewhere
that some 100 000 rejected articles daily (particularly the large binaries
that take time to propagate around to some of my peers) isn't so painful.

    So my ideal solution would be to have a sufficiently long remember
time so as to be able to refuse articles that can still be found in
transit somewhere (which, given the default, would be two weeks), and a
cutoff to match some general consensus as to when an article can no longer
be considered particularly useful.  Most of what I'm hearing seems to
center around a one week cutoff.


> :The .pag BDZ database [size...]
> :(and also depends on the number of bits used as index into this
> :file),
> 
> No, unless that's a sly reference to a 64-bit DBZ variant, but in either
> case, the size is mainly a factor of #entries.

    Gosh darnit, you can see right through me.  Put them X-Ray Infra-
Red Herring Specs away right now, thank you.  From what I've gathered from
the source, a suitably appropriate random prime number is carefully
chosen, roughly 50% larger than the number of entries in the history file
(these two numbers can be seen in the following sample atypical 32-bit
history.dir file:
dbz 3 7367639 9 C 4 3 29 4 0 1 2 3
4660771 4315890 4519779 4331113 4472988 4911755 4541803 4433979 4401256
^^^^^^^present number of entries
      ^^^^^^^top line; appropriately calculated prime
No more need to spend minutes waiting for a wc -l history to complete...)
Then, the .pag file is created at a size in bits equal to this prime
number, multiplied by the number of bits -- typically 32, but with your
hackery, 64.  As most versions of `ls' show sizes in 8-bit bytes, the
actual size of the .pag file will be 4 times the chosen prime normally,
or twice this size with the Improved DBZ.

    Now, the exact principles behind this, as well as the effects of
larger or smaller primes on the efficiency of the database or lookups, is
beyond me, and could easily be the subject of a book, or at least a
chapter of one about INN.  But I digress.


> If history text lookups are a bottleneck for you, my opinion is that
> something's probably wrong.  I've run 20,000 lookups per 300 second period
> without killing my I/O subsystems here, and that's in production, and
> without Clayton's code, which I haven't had time to play with.

    But that's also with your 64-bit indexing, I hope, since that's your
handiwork.  If I recall vaguely your words from the middle of December of
last year, you said that were I to stop being lazy and do the math, I'd
see collisions with 64-bit indexing on the order of one or two per year. 
My eyes glazed over, I started drooling uncontrollably, and I haven't been
the same since.

    Now, (hmm, thinks, scratches numbers with felt tip marker on back of
head) your 20 000 lookups in 300 seconds comes to some 2 million lookups
in 30 000 seconds, or some 6 million lookups in 90 000 seconds.  I'll call
that a day.  That's close to what I've seen.  The difference, though, is
that your 20 000 lookups, minus, say 3000 articles not in history at ten
articles per second, comes to 17 000 hits to the text file.  17 001, if
you're unlucky and you've hit your yearly collision.  And a good deal of
these are going to be in the disk cache.  Assuming I've got this straight.

    Whereas I, since I have failed to have success so far with your
patchery, will have these 20 000-odd lookups that each must be verified
against the text file not once, but multiple times.  And presumably, the
number of collisions goes up by a factor of two as one starts losing bits.


> As you approach 32, you're going to be doing more and more "false" lookups 
> to resolve DBZ collisions.  At 30 bits it's almost intolerable.

    And only half as intolerable at 29 bits, which is where I imagine most
sites out there are today.  Many of them are tempted to make things even
less intolerable, shrinking their history files.


> : For suffering admins such as myself, whose eyes sort
> :of glaze over when poring over the dbz code, we want numbers.  Figures.
> 
> What kind of numbers?  Maybe I still have my modified DBZ around that
> originally gave me some of the numbers I had used to justify 64-bit DBZ.

    Well, the sort of numbers that led you to claim you'd get collisions
with alarming infrequency with your 64-bit DBZ patchery.  For example,
let's take the INN dbz code's default of 24 bits out of 32, that one gets
when starting fresh.  That'll be optimal for a history file up to just
over 16M in size, and at the time of this original code, this was probably
the size of a typical site's history file, give or take a couple factors
of two.

    Once the history file busts the 16M mark (probably about 8 hours at
today's rate), you'll need to makehistory (dbzfresh?) your database to nab
another bit.  That'll last you another 8 hours until you hit the 33M mark,
and once more you need to grab a bit.  So, from having 7 bits unused, in
just one day, you've dropped to 5 bits, or from 128 additional hints, down
to 32 additional hints.

    With this background aside, then my question is, given a typical
message ID, and a <16M history file at INN's defaults, how many actual
hits to the text file are you going to be doing?  Likewise, with a 300M
history file (29 bits + 2 bits for a hint).  Assuming Murphy to be in full
effect, you're going to keep doing false lookups until you reach a hit, so
the actual number of slams on the disk will be less than the theoretical
maximum, although presumably at somewhat random places in the text file.
This probably also wipes out the advantage of the disk cache where you
know that your well-synchronized peers will be giving you IDs that will be
found near the end of your history text file.

    By now, I'm even more confused than when I started, so I'd love to
find a good solid reference to how the DBZ stuff works that I can curl up
with.

    Anyway, while I know that with the 64-bit indexing, I can count on
hitting the text file roughly once per message ID, I really have no idea
whether I'm hitting this file twice, five times, twenty times, a hundred
times, or what, for each message I'm offered.  So that's what I'm asking.
Just how badly is the traditional history lookup affecting news
performance?  How many theoretically unnecessary lookups am I making?

    It would be just my luck if this data were in the idle timer patches
you kindly contributed, that I haven't yet installed...


> :Whatever it is, with an 80% busy history disk and a sluggish server, it's
> :time for me to apply more hackery. 
> 
> Or maybe it's time for you to get a second history disk to stripe with.

    I'm in the same boat as you, only more so.  Any additional hardware
for my news machines will come straight from my pocket, and with a gig of
decent disk storage costing a month's pay, I'll happily spend a month
hacking on code to squeeze more performance from the single news disk that
has been provided for my play.  That's why I'm running the CNFS on that
disk, rather than striping over several disks I'd have to buy myself.
Plus, the increase in news traffic has pushed my servers to the point
where their intended use as graphics workstations is being severely
affected by the additional news load that's been freeloading for half a
year on them, and I'm fast wearing out my welcome to play with spare
cycles, magnetic patterns, and optical blips.

    And it's very possible that the other disk activity is slowing things
down a bit.  Not only does that disk serve history, but it also serves the
CNFS spool and innfeed backlog tapes, as well as news logs.  However, just
a couple weeks ago this disk was running at 20 to 40% busy, and given the
optimizations to disk activity in the latest innfeed and cyclical spool,
my gut feeling is that history comprises the bulk of the disk activity.
Don't think I'm not dying to move history to a different disk, and with
adequate space too.  (Not quite as much as my servers are dying, tho)


> FWIW, I haven't really devised any substantially-better-than-DBZ methods,
> although I have some ideas which could be used to reduce the requirements
> somewhat, although some big changes would be needed.

    Your ideas are certainly interesting, as are the ideas in use behind
Maxwell's NNTPrelay and Matt Dillon's Diablo.  You've made it clear that
regardless of the hashing one might use, one has to take into account the
possibility of collisions, and that's why even though you have one heck of
a 64-bit system, you still go to the text file.  I've seen the numbers you
and Scott Fritchie have tossed around with MD5 hashes, and the number of
collisions with a typical history file's contents with different length
hashes, and those collisions aren't negligible.

    On the other hand, without having studied the history files in use by
the other news routers, I don't know if they all need to perform the same
duty as does INN's history database, also serving readers.  I'll let
someone else look at them for possible weaknesses in logic.

    The other big problem with the large history file was hinted at
earlier by Chris Sedore (NNTPrelay).  With INN's history files, one needs
at least as much space free somewhere as is devoured by the history files,
minus the amount of text file that arrives in the expiration interval.
With a 300M text file, I've gotta clear out any old files from a space
where I've scrounged up 300M free, else I'll run out of space for the new
history files.  Then all relevant entries are copied from the old history
file to the new one.  Still, a few hundred spare megs is not something to
sneeze at.  Even if one has this space free (most of the time) in another
filesystem, it still takes a bit of time to copy the new file from one
filesystem to another, to say nothing of disk activity.

    Some ``cyclical'' variant of the history file would be heavenly to
lots of sites, so that, as with the spool, new entries somehow overwrite
old ones.  Just exactly how to implement such a thing, I wouldn't know.
Or, like you suggested, rotating smaller history files.  All of which
require coding.


    Ah well, now both of my servers are hosed.  Time to figure out where
I'm going wrong in the 64-bit history code, sigh...


Barry Bouwsma, Radio Praha news disservice


Re: The Incredible Expanding History File Problem
#18929
Author: Matt Dillon
Date: Wed, 02 Jul 1997 00:00
63 lines
4024 bytes
:In article <Pine.LNX.3.96.970702110058.5427A-100000@marley.vszbr.cz>,
:Net Scum  <ag786@yfn.ysu.edu> wrote:
:>On 1 Jul 1997, Matt Dillon wrote:
:>
:>>     Lastly, most newsfeeds out there are still in the 'we need multiple
:>>     parallel connections to push a full feed' mentality engendered from
:>>     INN's broken implementation.  Something like Diablo really needs only
:>>     one or two incoming streaming feeds from each feed... in fact, usually
:>>     just one, and can keep up just fine.
:>
:>    Depends.  Obviously, you're in a far better neck of the woods than I
:>am here, and as latency increases, the problems inherent in streaming
:>feeds rear their ugly heads.
:>
:>    I see typically 500ms RTTs to certain of my peers at good times.
:>While I haven't done the math here either, in looking at innxmit's article
:>transfer rates from a non-spool-bound machine to other peers, it seems
:>pretty clear from the transfer rates that there's no way a single stream
:>will be able to hand off ten articles/second, particularly when I start to
:>mix in binaries, and when packet loss exceeds 50% after the third hop
:>away.  Sure, a Cyclone site can NAK CHECKs at 20 per second with innxmit's
:>default, but when I've actually been transferring articles to that Cyclone
:>site, I'd see no more than 1 article/second over my connection.

    Streaming works.  I have a number of long-delay feeds.  I have one to
    germany, which sits at around 220 mS RTT.  I can push a full feed to
    it with a single streaming connection.

    Basically, unless you are suffering from packet loss, you ought to be
    able to push the bandwidth of the pipe with one or two streaming
    connections.

:>    And as far as incoming feeds to my machine go, I'm still using INN,
:>albeit a mutation thereof, so I don't have any sort of pre-commit cache to
:>drop incoming bandwidth by turning down duplicates until they're on their
:>way.  The peer with the best success feeding me was opening 17
:>connections, but has recently been surpassed by a slightly nearer peer
:>after I told him to ramp up his connections from 5 to 15.  At the same
:
:>    Unfortunately, INN has a scheduling problem for certain types of
:>feeds, meaning that the optimal situation of 250 incoming connections
:>sending me less than half a dozen article CHECKs at a shot has caused a
:>slowdown.  One patch for this results in an ever-increasing INN, which

    Ouch.  This is pretty insane.  I would definitely NOT use INN for
    your feeds machine.  Without precommit caching you cannot run streaming
    connections efficiently in the face of multiple feeds.  Both Diablo
    and NNTPRelay do precommit caching.  It works in a big way.  The
    10+ connections you would need with INN turns into one or two connections
    with a proper news transit system.

    I know a lot of people who are in the same situation that you are... they
    don't have the resources or the time to either add a backend newsfeeds
    machine or replace the software on the one they have with Diablo or
    NNTPRelay (or Cyclone), and are slowly seeing their news systems 
    melt.  You've got to take the plunge and get rid of INN on the newsfeeds
    box.

						-Matt


Re: The Incredible Expanding History File Problem
#18941
Author: Jeff Garzik
Date: Wed, 02 Jul 1997 00:00
27 lines
1894 bytes
Matt Dillon wrote:
>     Lastly, most newsfeeds out there are still in the 'we need multiple
>     parallel connections to push a full feed' mentality engendered from
>     INN's broken implementation.  Something like Diablo really needs only
>     one or two incoming streaming feeds from each feed... in fact, usually
>     just one, and can keep up just fine.


True, but quite often multiple connections help the *incoming* site push
articles more quickly.  innfeed tends to get bogged down with its
single-tasking nature, and it can buffer better with more outgoing
connections to a site.  Cyclone sites and nntprelay sites incoming to me
both seem to need multiple connections, while a Diablo peer only uses
the default 1-2 connections pushing a full feed.

My two top incoming sites are a Diablo and Cyclone site, respectively. 
The Diablo site pushes 4 to 8 times the amount of news my way, in less
clock time than the Cyclone site.  (Strangely, though, I've been
rejecting a lot of the Diablo site's articles after download, 80% of
them.)
-- 
Jeff Garzik					   Quality news feeds
News Administrator		       INN Technical info, Consulting
Spinne, Inc.				http://www.spinne.com/usenet/

Re: The Incredible Expanding History File Problem
#18942
Author: Net Scum
Date: Wed, 02 Jul 1997 00:00
56 lines
3848 bytes
On 1 Jul 1997, Matt Dillon wrote:

>     Lastly, most newsfeeds out there are still in the 'we need multiple
>     parallel connections to push a full feed' mentality engendered from
>     INN's broken implementation.  Something like Diablo really needs only
>     one or two incoming streaming feeds from each feed... in fact, usually
>     just one, and can keep up just fine.

    Depends.  Obviously, you're in a far better neck of the woods than I
am here, and as latency increases, the problems inherent in streaming
feeds rear their ugly heads.

    I see typically 500ms RTTs to certain of my peers at good times.
While I haven't done the math here either, in looking at innxmit's article
transfer rates from a non-spool-bound machine to other peers, it seems
pretty clear from the transfer rates that there's no way a single stream
will be able to hand off ten articles/second, particularly when I start to
mix in binaries, and when packet loss exceeds 50% after the third hop
away.  Sure, a Cyclone site can NAK CHECKs at 20 per second with innxmit's
default, but when I've actually been transferring articles to that Cyclone
site, I'd see no more than 1 article/second over my connection.

    And as far as incoming feeds to my machine go, I'm still using INN,
albeit a mutation thereof, so I don't have any sort of pre-commit cache to
drop incoming bandwidth by turning down duplicates until they're on their
way.  The peer with the best success feeding me was opening 17
connections, but has recently been surpassed by a slightly nearer peer
after I told him to ramp up his connections from 5 to 15.  At the same
time, my percentage of the ~600 000 articles daily that were being sent to
me twice (rejected duplicates) dropped from about 1/3 of the number of
articles accepted to 1/10.  It's pretty clear.  When there's such delay
over a congested network like this, there's quite a bit of time between
when a CHECK is given and the article actually is sent, in which time the
message ID could easily be rotated out of the pre-commit cache.  However,
given the distribution of which peers actually send duplicates, I would
see a benefit from such a cache.

    Unfortunately, INN has a scheduling problem for certain types of
feeds, meaning that the optimal situation of 250 incoming connections
sending me less than half a dozen article CHECKs at a shot has caused a
slowdown.  One patch for this results in an ever-increasing INN, which
then causes the machine to swap and again slow down.  The other method
seems better, but after time, both innd and innfeed have grown in size
enough to again hasten their demise through swapping.  While my server had
little problem keeping up in the past, the larger history file and the
additional work it is doing have pushed it past its 128M RAM limit, which
only gets worse when other users log in, start half a dozen Netscrapes to
view animated GIFs and Java, and other CPU and memory-hogging tools.


Barry Bouwsma, Radio Praha newsadmin



Re: The Incredible Expanding History File Problem
#19025
Author: Net Scum
Date: Sat, 05 Jul 1997 00:00
66 lines
4229 bytes
On 2 Jul 1997, Matt Dillon wrote:

>     Streaming works.  I have a number of long-delay feeds.  I have one to
>     germany, which sits at around 220 mS RTT.  I can push a full feed to
>     it with a single streaming connection.

    Of course, you're not the sole provider to that peer, so you're not
intermingling CHECKs with too many article bodies.  I haven't seen
Michael's stats for accepted and rejected articles from his peers, so I
don't have as much of an idea how effective his feeds are.


>     Basically, unless you are suffering from packet loss, you ought to be
>     able to push the bandwidth of the pipe with one or two streaming
>     connections.

    Well, the available bandwidth of the pipe, at least.  More data points
are that the bandwidth into this country stands at some 4Megabits/second,
but the actual available bandwidth to one given TCP connection by a
workday ranges from a few hundred bytes/second to a few k/sec.  That's
because the single streaming connection is in competition with tens or
maybe hundreds of thousands of other TCP connections sending mail, web
imagery, and who-knows-what-all, all at the same time, to tens of
thousands of users throughout the country.  And that doesn't even include
streaming UDP connections delivering audio and video strip shows and
whatnot.

    When the effective bandwidth is limited in this way, and a single
streaming connection just doesn't cut it, a second connection can almost
double the throughput.  Naturally, your connection to your German peer is
over far less congested lines.  But it simply requires far more than a
single connection here to muscle ones way into the fray and transfer a
full feed, given a cap on per-connection throughput.

    I remember, way back when, when I was trying to feed a peer over a 64k
connection that served an entire country, and I had to resort to ten or so
parallel innxmits just to nab enough bandwidth to get only a Big 8 feed
through, with backlogs in unimportant groups only clearing overnight...


    And I do have an outgoing feed to a Diablo site, consisting of
articles <4k in size.  This site seems to be down more often than up, but
when it's up and I use innxmit -d (to see transactions) -v (verbose
summary) to this site from a CNFS spool (meaning that there's no delay
digging around in the spool to find the article as verified by -d), it'll
take about 75% of the articles I offer it, but at the rate of one article
every two seconds.  Clearly that won't sustain a full feed.  Whether this
miserable throughput is indicative of the need for tuning on the recipient
machine, or just shows the limited bandwidth I have available, I cannot
say, but my gut feeling is the latter.

    I just want to point out that there are times when more than a single
connection is required to push a timely feed, regardless of the software
in use by the recipient.  I do have this gut feeling that innfeed doesn't
quite push articles as fast as innxmit, but then, all my innfeeds are
configured at a far lower number of CHECKs, which, combined with the line
latency, is guaranteed to give the appearance of lower throughput; plus,
my innfeeds could be overworked.  Honestly.


Not that I should talk about other sites when mine... um...
Barrry Bouwsma, miserable newsadmin


Re: The Incredible Expanding History File Problem
#19180
Author: Lukas Wunner
Date: Fri, 11 Jul 1997 00:00
16 lines
1275 bytes
"Chris Sedore" <cmsedore@maxwell.syr.edu> writes:
>Pentium Pro 200 with a 3 disk stripe for history (3 older DEC RZ28s--2GB
>5400rpm).

Sorry, can you clue me in on which interleave size you chose? I am also
setting up a 3 disk stripe set for the history on my machine, but I'm
a bit irritated on which interleave size is optimal. I imagine
the 65536 blocks I have configured for the news spool is not optimal
for the history, as the history has a completely different access pattern.
Any ideas?

Thanks,
	Lukas.

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