🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #82204

Re: Overview compression

#82204
From: D. Stussy
Date: Wed, 25 Nov 2009 07:23
62 lines
4511 bytes
"Jeffrey M. Vinocur" <jeff@litech.org> wrote in message
news:hei0m1$qff$1@puck.litech.org...
> In article <hehq17$i0o$1@snarked.org>,
> D. Stussy <replies@newsgroups.kd6lvw.ampr.org> wrote:
> >Where there's a spool with alot of small messages, do we really need to
> >keep all the "overview data" in the overview?  With a sufficiently fast
CPU
> >(as compared to network I/O time), wouldn't a 2 field overview structure
> >do:  Group's message number and storage token?  All other data would be
> >retrieved on the fly from the storage manager by token (requesting
headers
> >only), parsed, and delivered to the client as requested.
>
> It's not the CPU speed, it's the disk speed.

Technically, it would be both.  However, headers are usually less than 2kB,
so that's really just one disk page read (1-4 sectors depending on sector
size, but always sequential since in the same cluster/page).  For server
software that checks to see if the article is still present before
presenting overview data (e.g. INN: "nnrpdcheckart" = TRUE, defaults to
true), the disk read is already happening, so the true additional overhead
is really just CPU time.

> Obviously this depends tremendously on the spool format and local
> configuration, but I just tried `head * > /dev/null` in a few of
> my tradspool directories, and it takes a substantial fraction of
> a second per thousand articles.  And that's ignoring the overhead
> of retrieving via storage manager and then parsing the results.

Yes, but as most modern OS's cache MRU pages, how fast was the SECOND (and
subsequent) reads?  That should be memory accesses only until purged via an
LRU algorithm.

> So I'm not quite sure of a scenario where you have few enough
> articles that there won't be overview requests of that magnitude,
> but so many articles that you're tight on disk space.

Administrators ahead of time can fix the spool size (especially with the
CNFS storage method), but often have no idea how much overview space is
needed for such (other than ovdb's suggestion).  Do you know how much to
allocate to your overview system?

Also, I have noted that practically all the data (with an occasional
exception from non-latin alphabet groups) is usually 7-bit ASCII, so a
compressed overview data, even with the traditional method, would yield at
least a 12% savings in space (if not more), just for crunching out the high
bit.  A typical line is going to use only about 64 symbols (alphanumerics
plus tab and space, with specials like "<" replacing lesser used letters
like "q" and "z"), so a 200-character text line compressed by LZW78 (which
is less efficient than bz2) would be a maximum of 172.125 bytes (13.9%
smaller, as compared to the 12.5% for losing the high bit).  The
compression ratio only goes up from there as we're at the point where
#_of_symbols < length, so every 2 or more symbols becomes one one coded
entry (every 16 bits becomes 8-10 bits as we approach 1kB in original
length).

As long as the whole lookup process (from storage token fetch to parsing
and sending the TCP packets) occurs faster than the network can send such,
the minimal overview of just article number and token could be more
efficient overall.

Technical Details
Message-ID: <heim14$pc8$1@snarked.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.dca.giganews.com!nntp.giganews.com!news-in-01.newsfeed.easynews.com!news-in-02.newsfeed.easynews.com!easynews.com!easynews!news.he.net!news.snarked.org!not-for-mail
References: <ve2cg55op5kimgdb5shii30l4envl403fj@4ax.com> <hef341$khd$1@snarked.org> <heftn6$l8m$1@news.trigofacile.com> <hehq17$i0o$1@snarked.org> <hei0m1$qff$1@puck.litech.org>

Show Full Headers
Complete Article Headers
Message-ID: <heim14$pc8$1@snarked.org>
Subject: Re: Overview compression
Date: Tue, 24 Nov 2009 23:23:16 -0800
From: "D. Stussy" <spam+newsgroups@bde-arc.ampr.org>
References: <ve2cg55op5kimgdb5shii30l4envl403fj@4ax.com> <hef341$khd$1@snarked.org> <heftn6$l8m$1@news.trigofacile.com> <hehq17$i0o$1@snarked.org> <hei0m1$qff$1@puck.litech.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.dca.giganews.com!nntp.giganews.com!news-in-01.newsfeed.easynews.com!news-in-02.newsfeed.easynews.com!easynews.com!easynews!news.he.net!news.snarked.org!not-for-mail
Newsgroups: news.software.nntp
Lines: 62
Reply-To: "D. Stussy" <replies@newsgroups.kd6lvw.ampr.org>
NNTP-Posting-Host: pool-71-118-30-21.lsanca.dsl-w.verizon.net
X-Trace: snarked.org 1259133797 25992 71.118.30.21 (25 Nov 2009 07:23:17 GMT)
X-Complaints-To: newsmaster+complaints@snarked.org
NNTP-Posting-Date: Wed, 25 Nov 2009 07:23:17 +0000 (UTC)
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1478
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1478