🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #60892

Re: [FNTP] 'in-completeness'

#60892
From: Kjetil Torgrim Homme
Date: Tue, 01 Oct 2002 22:39
129 lines
7041 bytes
[Curt Welch]:
>
>   Kjetil Torgrim Homme <kjetilho@haey.ifi.uio.no> wrote:
>   >   incompleteness only happens when a system is overloaded
>   
>   Well, the machine is not always overloaded.  Sometimes it would be
>   overloaded if it tried to get a full feed, but was configued
>   (though feeds etc) to drop lots of stuff so it wouldn't get
>   overloaded.

size limit, mainly.  yes.  but this wouldn't be apparent to the users
if the parts were the same size.  (I don't care about incompleteness
in the sense complete groups being unavailable.)

>   >   articles go missing when a peer is backlogged
>   
>   For sure - if the backlog exceeds the max queue size of the
>   sending server.

right.  this tends to be a time limit, due to self expiration of
transit spools.

>   >   to solve the incompleteness problem, we need to change the
>   >   behaviour of servers with backlogged peers.
>   
>   Yes.
>   
>   >   articles will always go missing, but we can shape the traffic so
>   >   that missing articles are concentrated on a few (random) files
>   >   rather than evenly distributed over all files.
>   
>   That is already being done on a regular basis.  Feeds tend to be
>   configued to move smaller files with higher priority than larger
>   articles.  The logic is that it's better to drop a few large
>   articles than hundreds of small articles.

right, we do this too, this makes sure that text Usenet is complete.
actually, they are the same priority, but since the articles are
smaller, they will transmit faster with less use of resources, so in
practice they are prioritised.

>   > if you send a peer CHECK msgid, do you have to send it to him
>   > with a TAKETHIS if he asks for it?
>   
>   No, but it's not nice to do that.  The receiving site must be able
>   to deal with that incase the sending site crashes or shuts down
>   without getting to the takethis.
>   
>   > how will servers react to such an implicit broken promise?
>   
>   It will cause them to send "try again later" responses to all the
>   other peers which offer the same article.  At some point, the
>   server times out and stops waiting for the first site to send the
>   article, and if the other peers haven't given up on the "try again
>   later" responses, they will in theory send the article.

yeah right...  this may be a source for incompleteness.  if I recall
correctly, Diablo does this right, but INN 2.x ignored "try later"?

>   But overall, it means you slow down the delivery of the article
>   you sent the fake "check" for, and you risk it never making it to
>   the server.

thanks.

>   > (this could be used by clever feeders to find out how to
>   > maximise completion.)
>   
>   How?  What are you think there?

well, I outlined an algorithm where a feeder kept a database of the
completeness each file has on its peers.  it can't know what parts its
peer has received from others.  a speculative CHECK could map that
out.

here's the algorithm again, slightly modified and more spelled out:

  server receives a message <''offset'segsize'total'mhash''random@rhs>

  store it in history, as usual.

  increase octet count in binary history, using total/hash/rhs as the
  key.  if creating a new entry, initialise total size.

  add the message to each peer's queue.

  when a message is sent to a peer, update the binary history stored
  for that peer as above.  the same update happens if the peer says
  "Duplicate".  when the file is completely transmitted, the binary
  history entry can be removed.

  when expire runs, update the local binary history appropriately (not
  sure if it is worth the effort to do it accurately, just marking the
  tuple as incomplete should suffice).

  if a peer is backlogged (the queue is more than five minutes long,
  or something like that), we try to be intelligent, and sort the
  queue.

    for all files which are complete in the transit spool, sort the
    files so that the file with least remaining octets at the peer is
    sent first.  within a file, send the parts in offset order.  (this
    will typically be the same as chronological ordering.)

    then do the same thing to files which are incomplete in the
    transit spool.

back of the envelope calculation time...  there is 400 GiB of data
every day.  the average file size is something like 20 MiB (taken from
thin air).  the median size is of course much smaller.  this means
there are 200000 files transmitted every day.  this is the number of
entries there will be in the local binary history.  the key is 20
octets + rhs, hash it into 64 octets.  the value is small, 8 octets.
add some overhead, and it should still fit into 30 MiB.  the binary
history for each peer can be smaller, since only incomplete files will
be listed there.  the size of this is not frightening, the number of
I/O operations is more worrying.

it would be more efficient to use a single database for all the peers,
but this leads to concurrency issues when updating it.  possibly not a
problem if mmap'ed, and each process only increasing the octet count
for the peer it is working on.  in such an implementation, you only
need 4 octets per peer, and approx. 90 MiB more RAM for 100 peers.

-- 
Kjetil T.   ==. ,,==. ,,==. ,,==. ,,==. ,,==
           ::://:::://:::://:::://:::://::::
           =='' `=='' `=='' `=='' `=='' `==  http://folding.stanford.edu
Technical Details
Message-ID: <1rofad4wd8.fsf@einn.ifi.uio.no>
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!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!uio.no!nntp.uio.no!ifi.uio.no!not-for-mail
References: <58068.n92202@archiver.winews.net> <20020924011222.716$tx@newsreader.com> <3147e.o92204@archiver.winews.net> <20020924234811.264$g2@newsreader.com> <15518.p9220c@archiver.winews.net> <20020926003453.621$EG@newsreader.com> <38427.r92204@archiver.winews.net> <1rofajcuom.fsf@vingodur.ifi.uio.no> <20020928124251.046$Da@newsreader.com> <39167.u92203@archiver.winews.net> <Xns9299BE9D15965nothing@209.98.50.131> <32317.1a2207@archiver.winews.net> <20021001104847.150$GK@newsreader.com> <1rit0m5gcr.fsf@einn.ifi.uio.no> <20021001123237.950$nc@newsreader.com>

Show Full Headers
Complete Article Headers
Message-ID: <1rofad4wd8.fsf@einn.ifi.uio.no>
Subject: Re: [FNTP] 'in-completeness'
Date: Tue, 01 Oct 2002 22:39:31 +0000
From: Kjetil Torgrim Homme <kjetilho@haey.ifi.uio.no>
References: <58068.n92202@archiver.winews.net> <20020924011222.716$tx@newsreader.com> <3147e.o92204@archiver.winews.net> <20020924234811.264$g2@newsreader.com> <15518.p9220c@archiver.winews.net> <20020926003453.621$EG@newsreader.com> <38427.r92204@archiver.winews.net> <1rofajcuom.fsf@vingodur.ifi.uio.no> <20020928124251.046$Da@newsreader.com> <39167.u92203@archiver.winews.net> <Xns9299BE9D15965nothing@209.98.50.131> <32317.1a2207@archiver.winews.net> <20021001104847.150$GK@newsreader.com> <1rit0m5gcr.fsf@einn.ifi.uio.no> <20021001123237.950$nc@newsreader.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!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!uio.no!nntp.uio.no!ifi.uio.no!not-for-mail
Newsgroups: news.software.nntp
Organization: Dept. of Informatics, Univ. of Oslo, Norway
Lines: 128
NNTP-Posting-Host: einn.ifi.uio.no
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: maud.ifi.uio.no 1033511971 25492 129.240.65.201 (1 Oct 2002 22:39:31 GMT)
X-Complaints-To: abuse@ifi.uio.no
NNTP-Posting-Date: 1 Oct 2002 22:39:31 GMT
User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7