🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #90656

Re: INN performance curve - why so much time dealing with the history file?

#90656
From: Julien ÉLIE
Date: Sun, 30 Jul 2023 15:47
86 lines
4858 bytes
Hi Russ,

Again an interesting insight of the dbz database.  Thanks Jesse for this thread!


> Running makedbz manually will let you provide the -s flag, which specifies
> the number of entries to size the history file for.  news.daily will use
> the current size as the expected size.  When you're going to feed in a ton
> of articles, you want to pass in something much, much larger, roughly the
> number of entries you're expecting to have at the end.  The relevant
> instructions in INSTALL are:
> 
> | Next, you need to create an empty F<history> database.  To do this, type:
> |
> |     cd <pathdb in inn.conf>
> |     touch history
> |     makedbz -i -o
> 
> which possibly should mention the -s flag.

Indeed!
Additional wording:

     Next, you need to create an empty history database.  To do this, type:

         cd <pathdb in inn.conf>
         touch history
         makedbz -i -o

+   makedbz will then create a database optimized for handling about
+   6,000,000 articles (or 500,000 if the slower tagged hash format is
+   used).  If you expect to inject more articles than that, use the -s flag
+   to specify the number of entries to size the initial history file for.
+   To pre-size it for 100,000,000 articles, type:
+
+       makedbz -i -o -s 100000000
+
+   This initial size does not limit the number of articles the news server
+   will accept.  It will just get slower when that size is exceeded, until
+   the next run of news.daily which will appropriately resize it.





I'll also update the makedbz documentation to make it clearer:

     -i  To ignore the old database when determining the size of the new one
         to create, use the -i flag.  Using the -o or -s flags implies the -i
         flag.

+       When the old database is ignored, and a size is not specified with
+       -s, makedbz will count the number of lines of the current text
+       history file, add 10% to that count (for the next articles to
+       arrive), and another 50% (or 100% if the slower tagged hash format
+       is used) to determine the size of the new database to create.  The
+       aim is to optimize the performances of the database, keeping it
+       filled below 2/3 of its size (or 1/2 with the tagged hash format).
+
+       If no text history file exists, the new one will have the default
+       creation size (see -s).


     -s *size*
         makedbz will also ignore any old database if the -s flag is used to
         specify the approximate number of entries in the new database.
         Accurately specifying the size is an optimization that will create a
         more efficient database.
+       The news server will still accept more articles, but will be slower.
         Size is measured in key-value pairs (i.e. lines).  (The size should
         be the estimated eventual size of the file, typically the size of
         the old file.)
+
+       The effective size used will be larger, to optimize the performances
+       of the database.
         For more information, see -i and the discussion of dbzfresh and
         dbzsize in libinn_dbz(3).

+       The default is 6,666,666 when creating a new history database.  (If
+       the slower tagged hash format is used, the default is 500,000.)


-- 
Julien ÉLIE

« Ne craignez pas d'être lent, craignez seulement d'être à l'arrêt. »
Technical Details
Message-ID: <ua60lk$d2hc$1@news.trigofacile.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
References: <u9q0c8$28ja$1@nnrp.usenet.blueworldhosting.com> <87351bz91n.fsf@hope.eyrie.org> <u9q2rs$1d3h$1@nnrp.usenet.blueworldhosting.com> <87y1j3xsl4.fsf@hope.eyrie.org>

Show Full Headers
Complete Article Headers
Message-ID: <ua60lk$d2hc$1@news.trigofacile.com>
Subject: Re: INN performance curve - why so much time dealing with the history file?
Date: Sun, 30 Jul 2023 17:47:00 +0200
From: Julien ÉLIE <iulius@nom-de-mon-site.com.invalid>
References: <u9q0c8$28ja$1@nnrp.usenet.blueworldhosting.com> <87351bz91n.fsf@hope.eyrie.org> <u9q2rs$1d3h$1@nnrp.usenet.blueworldhosting.com> <87y1j3xsl4.fsf@hope.eyrie.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
Newsgroups: news.software.nntp
Organization: Groupes francophones par TrigoFACILE
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 30 Jul 2023 15:47:00 -0000 (UTC)
Injection-Info: news.trigofacile.com; posting-account="julien"; posting-host="san13-h02-176-143-2-105.dsl.sta.abo.bbox.fr:176.143.2.105"; logging-data="428588"; mail-complaints-to="abuse@trigofacile.com"
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.13.0
Cancel-Lock: sha1:j2+STRbwyAKcXfgcIzQyOygF/zU= sha256:5YW1+rsat6rlIW19X1r3PMgLplwovsdrypf37GfFszA= sha1:Inogyv7xr1LATvOkiMezDEOuiaQ= sha256:ZtLLuefXXVonATxestGzCdBCK5EBzGPC/wn7M/foJWU=
In-Reply-To: <87y1j3xsl4.fsf@hope.eyrie.org>