🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #11361

Re: makehistory takes forever?

#11361
From: Greg Andrews
Date: Thu, 03 Oct 1996 00:00
70 lines
3341 bytes

[posted and e-mailed]

bvh@falcon.inetnebr.com (Obi-Wan) writes:
>How long should makehistory take to run?
>
>We have a Sun UltraSPARC with a limited spool (1-2 weeks fits
>in a GB or two) running Netscape's bastardized INN clone.
>
>For the first month or so after setup, expire wasn't running.
>I've got that fixed now, but I'm getting the "Can't store
>key" errors that indicate a screwed history file.  Fixhist
>removed some problems, but not all of them, so I resorted
>to makehistory.  The full command was:
>	makehistory -bu -s 2051352 -T /usr/local/news/tmp
>
>I started this as root at 2am Monday with a 0 nice value.
>Early Tuesday I reniced it to -10.  At 11:30am Wednesday,
>it's still running.  Is this normal?  57 hours seems excessive.
>

How many articles are in your spool?  A couple of years ago, it
took 60 hours for makehistory -bun to recreate the history file.
We had about 1.5-1.7 million articles in our spool.

It takes that long because it's doing the equivalent of
a find on every article in every directory of your spool
filesystem.  And it's reading the "Newsgroups:" line to
generate the cross-posting information for the history
database entry.  That's a slow operation, period.


What you want to do instead is make backup copies of your
history file (just the text file, not the .dir or .pag
files).  If you have an uncorrupted copy of the text file,
you can rebuild the database portion in only 1-2 hours
with "makehistory -ri file_name".  Adding the -s option
with the number of lines in the file is also a good
thing to do.

At Netcom, I made a backup of my history file every 12
hours, and kept 4 copies.  Since the file was 200 megs,
I could safely keep 4 copies on a spare 2GB drive.
Two days' worth of backups was a good compromise between
the amount of space they consume and the length of time
it would take me to notice corruption in the history file
and correct it (even over a weekend).

Dave Barr's perl script for fixing the more common types
of history file corruption is also a good tool to keep
handy for rebuilding from backups.

The history database you build from a backup copy will be
missing some articles.  Specifically, the ones that were
received since the last backup copy.  Still, you can
add those in with the -bunv (I think) options to
makehistory afterward, while your server is back up
and serving users.

Good Luck,

  -Greg
-- 
:::::::::::::::::::  Greg Andrews  gerg@netcom.com  :::::::::::::::::::
ObGuindon:  Harriet Bover just found out from television that
            "Rust never sleeps."  Now she can't either.
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

Technical Details
Message-ID: <gergDyoKHu.5yo@netcom.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
References: <52u6ce$bq1@hawk.inetnebr.com>

Show Full Headers
Complete Article Headers
Message-ID: <gergDyoKHu.5yo@netcom.com>
Subject: Re: makehistory takes forever?
Date: Thu, 03 Oct 1996 00:00:00 +0000
From: gerg@netcom.com (Greg Andrews)
References: <52u6ce$bq1@hawk.inetnebr.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: 186848719
Sender: gerg@netcom23.netcom.com
Organization: Movie marquee: THE FLY GODS MUST BE CRAZY ALIENS
Keywords: makehistory
Newsgroups: news.software.nntp