🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.free.newsservers
Article #69256

Re: beta server

#69256
From: YottaNews Support
Date: Thu, 29 Sep 2005 15:18
87 lines
3907 bytes
On Thu, 29 Sep 2005 04:29:11 -0600, DevilsPGD wrote:

> Why no XHDR?

It's stupid.  It's like zipping an mpeg movie to "compress" it.  I'll
explain a little better.  The clients that use it are claiming it allows
them to download the headers more efficiently.  In reality it's a very
inefficient method of obtaining overview/header/xover data.  All of the
brain dead clients that I've seen try to use it actually download nearly
the same amount of data as using the XOVER command and burn up 50-100
times the CPU cycles doing it.

For example, a clients the uses XHDR to pull just the data, subject, from,
message-id headers:

date: 25
subject: 100
from: 30
message-id: 50

article number: 8 (prefixed to each line)
line termination (\r\n): 2 (each line)

Total: 245 bytes

An XOVER line consists of:

subject: 100
from: 30
date: 25
message-id: 50
references: 0
bytes: 6
lines: 4
xref: 50

article number: 8 (once)
line termination: 2 (once)

Total: 275 bytes

That comes down to ~10% savings in bytes downloaded, but the CPU costs are
through the roof.  Each XHDR command causes the entire xover file to be
read and parsed by the server.  

In a big group you end up with something like this happening millions of
times:

for each line in xover.file
  scan line for x tabs (1 for subject, 2 for from, ...)
  for each byte until next tab
    copy to buffer
  write line number to client
  write buf to client
  write \r\n to client

( the three writes (doesn't make a left) could be replaces with a single
write, but that would require using a temp buffer to store it in, ie
sprintf(), in either case it not good. )

That whole process had to be repeated for each XHDR command sent.  Causing
the additional X{number of XHDRS} disk IO load as well.

Compare that to the efficient XOVER command:
  for each line in xover.file
    if line_number > start and line_number < end
      write line
    write line

Now, my software is even better than the typical above and 90% of the time
it can just do:  
  read xover file
  write xover file

It never parses the file at all, just dumps it to the client.

So why have the overworked server parsing out xover fields when you have
thousands of clients running at nearly 0% CPU used?  Just to save them 10%
of downloaded bytes?  If they pull just one more header with XREF their
savings actually turns into a negative and they end up downloading more
data than they would have with an efficient xover command.

-- 
Steve
News Administrator
YottaNews.com/NNTPServer.com
Technical Details
Message-ID: <1128006851.2f42395a9a0f8a8f778f9a073e8d1cbd@yottanews>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-alt.free.newsservers.20150605.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newsfeed-east.nntpserver.com!nntpserver.com!newsfeed-west.nntpserver.com!roc.nntpserver.com.POSTED!yottanews!not-for-mail
References: <1127976543.22bdd0709f9ffa5b1b596c9d99f1f2a5@yottanews> <o6gnj1duqm6pq30pbl5u468n2qn5aeqcjp@4ax.com>

Show Full Headers
Complete Article Headers
Message-ID: <1128006851.2f42395a9a0f8a8f778f9a073e8d1cbd@yottanews>
Subject: Re: beta server
Date: Thu, 29 Sep 2005 10:18:13 -0500
From: YottaNews Support <spamtrap@yottanews.com>
References: <1127976543.22bdd0709f9ffa5b1b596c9d99f1f2a5@yottanews> <o6gnj1duqm6pq30pbl5u468n2qn5aeqcjp@4ax.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-alt.free.newsservers.20150605.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newsfeed-east.nntpserver.com!nntpserver.com!newsfeed-west.nntpserver.com!roc.nntpserver.com.POSTED!yottanews!not-for-mail
Newsgroups: alt.free.newsservers
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Lines: 87
NNTP-Posting-Date: Thu, 29 Sep 2005 10:14:11 EST
X-Abuse-Report: http://www.usenetabuse.com
X-Abuse-Notes: Abuse reports must be submited via the usenetabuse.com portal
 listed above.
X-Abuse-Notes2: Reports sent via any other method will not be processed.
X-Abuse-Notes3: Any other abuse reporting headers in this article are
 fraudulent.
X-Orginal-Message-ID: <7xT_e.59750$Yi2.36002@roc.nntpserver.com>