Article View: news.software.nntp
Article #21888Re: A history file question.
From: Frank Durda IV
Date: Thu, 25 Sep 1997 00:00
Date: Thu, 25 Sep 1997 00:00
75 lines
4225 bytes
4225 bytes
Steve Day wrote:
> I am running inn-1.5.1 on a Sparc 20/50 with Sunos version 4.1.3_U1.
> After a history rebuild, the history.dir file will be somewhere around 63
> bytes. Over a period of time this number will increase to 123. Once it
> gets to 123, it stays there and there seems to be about a 10% drop in
> performance. The size of history.pag remains the same until the .dir file
> hits 123 bytes. The history.pag file then starts increasing in size.
There is a bug in 1.5x and 1.6x that causes the history.pag file to double
or triple (or more) in size, particularly on sites where INND actually
receives multiple overlapping feeds. The problem does not occur in 1.4.x.
As an example, our .pag file would start out (once cleaned of trash) at
a directory size (ls -al) of about 120Meg. Within a day, it would be
500Meg. At this point, the flat history file was about 390 to 420Meg!
Eventually INND would core dump when it tried to grow the history.pag
file to over 1GB in size and exceeded the memory limit of 900Meg we
set for INND. The flat file is still under 420Meg. This takes as
little as 10 additional hours, leaving a .pag file several times larger
than the flat history file. Very reproducible.
I am talking about the size of history.pag becoming insane, not
the various memory leaks in innd that make INND grow when it discards
duplicates and also eventually kills it. That's a different bug.
To see if you are afflicted by the oversized history.pag file, take the
flat history file, sort it, and see how many duplicate Message-ID entries
you have in there. There should be zero. With 1.5 and 1.6, there will
be duplicates due to the bug. Before we took action on our systems, we
measured duplicates being inserted into the history database at rates of
thousands per hour. DBZ doesn't take kindly to its callers giving it
duplicate records, and tends to split database trees to cope with the
collision rate (you have collisions when you stuff the exact same ID
in there), causing the history.pag file size to grow insanely large.
Once you have the history file sorted, the following awk will help:
BEGIN {
LINE = "";
}
{
if (LINE != $1) {
print $0
LINE = $1
} else {
print $0 >> "history.dups"
}
}
One easy "fix" is to firewall your INND box with a Diablo or similar
package, allowing only one feed into your INND system. This also reduces
the INND memory leaks considerably, although you will still manage
to have a few duplicates added per hour.
I note we have had 1349 duplicate history database write attempts on our
system that we caught today, or about 74/hour, and that is with only two
feeds reaching the INND box.
By the way, those 1349 duplicates were counted at the HISwrite call,
long after duplicates should have been caught at higher levels. Dbz.c
does not check to see if the caller is doing something stupid. There is
some code that appeared in 1.5.x that doesn't check before it writes to
the database. That code is also in 1.6. Bad code, no biscuit.
Frank Durda IV - only these addresses work:|"The Knights who say "LETNi"
<uhclem.ds3%nemesis.lonestar.org> | demand... A SEGMENT REGISTER!!!"
or <uhclem.ds3%rwsystr.nkn.net> |"A what?"
These Anti-spam addresses expire Oct. 15th |"LETNi! LETNi! LETNi!" - 1983
(c) 1997, ask before printing.
Technical Details
Message-ID:
<95DC289B9E7188D2.018E6D44DD568BAA.7BA4E92FC2970B0B@library-proxy.airnews.net>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-mailReferences:
<5vvb4o$2kl$1@ccnet3.ccnet.com>Show Full Headers
Complete Article Headers
Message-ID: <95DC289B9E7188D2.018E6D44DD568BAA.7BA4E92FC2970B0B@library-proxy.airnews.net> Subject: Re: A history file question. Date: Thu, 25 Sep 1997 00:00:00 +0000 From: Frank Durda IV <uhclem.ds3@nemesis.lonestar.org> References: <5vvb4o$2kl$1@ccnet3.ccnet.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: 275568109 X-Orig-Message-ID: <342AFBB9.36A6BBF9@nemesis.lonestar.org> NNTP-Posting-Time: Thu Sep 25 19:03:44 1997 Organization: The Big Blue Box B NNTP-Proxy-Relay: library.airnews.net Newsgroups: news.software.nntp