Article View: news.software.readers
Article #83983[slrn] Optimizing slrnpull (-jwk) --headers-only for speed. An idea.
From: Marcel
Date: Wed, 05 Sep 2001 07:20
Date: Wed, 05 Sep 2001 07:20
60 lines
4172 bytes
4172 bytes
I think I've found a way to increase the download speed of slrnpull --headers-only by a theorical factor between 2.5 and 16. I noticed slrnpull uses the HEAD n, HEAD n+1, HEAD n+2 method for downloading headers which seemed to be the limiting factor. So I ran several runs in this very newsgroup yesterday with the same range of 449 headers. Slrnpull downloaded 458k of data this way. That's 1k of data by header, which is huge. And most of this data is unnecessary in order to determine which are the bodies to be retrieved. Then I tried telnetting XOVER same-range instead to get 124k of data only. XOVER on this server contains no optional field, only those: subject, author, date, message-id, references, byte count, line count. A potential gain of 458/124 = 3.7 in speed. I think those are important headers. The user may also want Xref and Newsgroups because those fields are scorable. In that case, XHDR Xref same-range is 27k and XHDR Newsgroups same-range is 14k. So the theorical gain in speed is 458/(124+27+14) = 2.7 There's more improvement. I realised then the Message-ID field was irrelevant to reget because the program had issued a XHDR Message-ID in List_server_numbers() prior to Num_Duplicates(). The field References (53k!) seems unnecessary too, but I'm not totally sure of this at this time. It may be mandatory for building the .overview files... Thus the only fields needed would be: I tried some XHDR, just to verify: XHDR Date same-range (16k) XHDR Subject same-range (19k) XHDR From same-range (20k) XHDR Lines same-range (4k) Total: 59k -> Speed gain of 458/59 = 7.7; or 458/(59+27+14) = 4.6 if the user needs the Xref and Newsgroups fields for scoring purposes. More, those commands accepts ranges. Duplicates headers may be skipped. So it may be possible to replace HEAD n, HEAD n+1... by a XOVER and/or XHDR combination and pull only the necessary data from the usenet. Headers (incomplete) and .overview files may be build from this data. It will be a lot faster. If the real complete header is needed, the user can get it when downloading bodies: Issue an ARTICLE command in overwrite mode instead of a BODY command in append mode. I've compared these theorical results with a run of Agent, which uses the LISTGROUP / XOVER method and it seems realistic: Agent is 3-4 times faster in headers-only mode. SBNews is even faster, it uses XHDR Date & Subject & From & Lines method. I've ran Agent for 12 months, 7 days a week, on the very same server and it took between 40-90 minutes to retrieve new headers in newsgroups I've subscribed. I now run slrnpull for 3 months and it takes between 3-10 hours to perform the same task each and every day. With a 56k modem, with SLRN_MAX_QUEUED optimized, average speed is 5.5kbps which is 50% of the maximum this modem can put (it stays at 11kbps with Agent, so another gain in speed is to be expected with the modifications I suggest). I cannot multiprocess with this server. Marcel
Technical Details
Message-ID:
<20010905032018.A4500@Shizuma>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!193.174.75.178!news-fra1.dfn.de!newsfeed.hanau.net!newsfeed01.sul.t-online.de!t-online.de!newsrouter.chello.at!newsfeed.Austria.EU.net!newsfeed.kpnqwest.at!anon.lcs.mit.edu!nym.alias.net!mail2newsShow Full Headers
Complete Article Headers
Message-ID: <20010905032018.A4500@Shizuma> Subject: [slrn] Optimizing slrnpull (-jwk) --headers-only for speed. An idea. Date: Wed, 5 Sep 2001 03:20:18 -0400 From: Marcel <Use-Author-Address-Header@[127.1]> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!193.174.75.178!news-fra1.dfn.de!newsfeed.hanau.net!newsfeed01.sul.t-online.de!t-online.de!newsrouter.chello.at!newsfeed.Austria.EU.net!newsfeed.kpnqwest.at!anon.lcs.mit.edu!nym.alias.net!mail2news Author-Address: u281 <AT> mochamail <DOT> com Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Mailer: Balsa 1.1.7 Lines: 59 X-OriginalArrivalTime: 05 Sep 2001 07:14:27.0953 (UTC) FILETIME=[665BF610:01C135DA] Mail-To-News-Contact: postmaster@nym.alias.net Organization: mail2news@nym.alias.net Newsgroups: news.software.readers