Article View: news.software.nntp
Article #44682Re: Batched ARTICLE commands
From: Curt Welch
Date: Wed, 01 Mar 2000 00:00
Date: Wed, 01 Mar 2000 00:00
72 lines
4440 bytes
4440 bytes
davidsen@tmr.com (bill davidsen) wrote: > In article <bill-2602001125570001@192.168.254.8>, > Bill Cole <bill@scconsult.com> wrote: > | In article <250220002137494912%planb@newsreaders.com>, "J. Moreno" > | <planb@newsreaders.com> wrote: > > | > Pipelining article commands results in a significant speed boost over > | > doing things in sequence. This isn't of much concern to an online > | > newsreader, but an offline newsreader will certainly want to take > | > advantage of it, so documenting it explicitly would, IMO, be a good > | > thing. > > If there is a significant improvement, the server is serious sick. The > client software should be able to wait for a response and issue the next > article request immediately. Have you every tried it in real life Bill? You have heard of MODE STREAM haven't you? streaming ARTICLE commands will have the same effect but in the opposit direction. Lets do a few numbers just to illustate. The effect is largest with small articles, a fast server, and a high latency link. Think about the extream case -- a T3 to the moon. But to get real, lets say we are on 1 Mbit/sec link with a 100 msec ping time between the client and the server. Or, lets just say it takes 50 msec for a bit to travel one way in either direction. (about what you see going across the US). Lets say the ARTICLE command goes in a packet which is 50 bytes long. That's 400 bits, and .4 msec to transmit. Lets call that 0. After 50 msec of transit time, the server has it and has started working on fetching the article which lets say takes 20 msec. It's 960 bytes and fits in a a 1000 byte packet. That's 8000 bits and takes 8 msec to transmit. 50 msec later, the client has it and then fires off the next command. So that took 50+20+8+50 or 128 msec to get one 960 byte article. or 960 / .128sec is 7500 bytes per second. Next time we send two article commands at once. The packet is 12 bytes larger, so it takes .496 msec to send. Lets call that 1. plus 50 to get there. 20 msec later, the first article starts comming back. How long it takes for the server to get done depends on how good it is at parallel operations, but lets just say it can't do any of that in parallel and it takes another full 20 msec to get the second article and start it off on it's way back. Then, plus 50 msec of delay. So this time, we have 1+50+20+20+8+50 or a total of time or 149 msec for 2 articles. So this time, it's (960*2)/.149 sec or 12855 bytes per second. That's an extra 5, 385 bytes per second just by sending two article command at once instead of 1. If the server can keep up, full pipelining gets you a new article ever 20 msec. That would be 960 / .02 48K bytes per second. So, no pipelining - 7,500 Bytes per second. Full pipelining - 48,000 Bytes per second - 6.4x faster. Notice also that with a 6.5x improvement, you can gain the same speed-up if you use 7 parallel NNTP connections to do the fetches - each sequentially. The improvements are noticable even when you are on a local network with the server, just not as much as this. With a 5 msec transit delay instead of 50, you get: 5+20+8+5=38 msec per article with no pipelining or 25,263 bytes per second vs the same max as above with full pipelining or 48,000. Still more than a 2x speed up. -- Curt Welch http://CurtWelch.Com/ curt@kcwc.com Webmaster for http://NewsReader.Com/
Technical Details
Message-ID:
<20000229221630.469$Gx@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!not-for-mailReferences:
<220220000104304154%planb@newsreaders.com> <87zosog8kl.fsf@erlenstar.demon.co.uk> <250220002137494912%planb@newsreaders.com> <bill-2602001125570001@192.168.254.8> <89hm53$bd1$1@newssvr02.news.prodigy.com>Show Full Headers
Complete Article Headers
Message-ID: <20000229221630.469$Gx@newsreader.com>
Subject: Re: Batched ARTICLE commands
Date: Wed, 01 Mar 2000 00:00:00 +0000
From: curt@kcwc.com (Curt Welch)
References: <220220000104304154%planb@newsreaders.com> <87zosog8kl.fsf@erlenstar.demon.co.uk> <250220002137494912%planb@newsreaders.com> <bill-2602001125570001@192.168.254.8> <89hm53$bd1$1@newssvr02.news.prodigy.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!not-for-mail
X-Deja-AN: 591593048
X-Face: "p}G*1KH{+F7EYGKLb>ogDguabZ+%,?^epeFB!nzu`)`$=QcvL1KF6<0GH!Tbc!Sqo[|tV5 %IW48mQf3K=Ci&gZ7]]aazx@]Y-nq!r5{yH/#,?@lDdUDvOfByB2hVW0.@OM%{l/{cT'{w
X-User: Curt@NewsReader.Com
Organization: NewsReader.Com
X-Url: http://CurtWelch.Com/
Newsgroups: news.software.nntp