Article View: news.software.nntp
Article #53599Re: rate-limiting peers
From: Curt Welch
Date: Thu, 02 Aug 2001 00:13
Date: Thu, 02 Aug 2001 00:13
78 lines
4941 bytes
4941 bytes
"Eric A. Hall" <ehall@ehsco.com> wrote: > > Ugh, don't strech the ACKs. You just run the risk that the sender > > will waste bandwidth re-transmitting and force them to hold the old > > packets in their buffers wasting memory. > > End systems tend to stabilize around RTT pretty quickly. The benefit of > this particular hack is that it makes command-response activity take > longer (as long as you want), but without affecting throughput during > bulk transfers. EG, I can have a secondary on a long pipe so that > commands take longer to ACK, but when there is a bulk transfer (such as a > backlog to be cleared) then there is still a lot of pipe that can be > filled when necessary. Ok, I can see how that might work for some things. Be we are talking NNTP feeds here (aren't we?) NNTP feeds use CHECK/TAKETHIS commands sent as a large batch. It's not one command per packet. They did this just to get around the problems of latency. If you leave rwin open and slow the ack, you will still get a rwin full (32KB?) of check commands and the feed isn't going to slow down at all. Creating artificial latency in the TCP connection will make very little difference in bandwidth used for a NNTP streaming feed - until you push the latency out far enough that the rwin is filling up and they have to wait for acks to send more. I guess that works as long as the receiving side doesn't have logic to increase the rwin size to make up for that. > This is the opposite of just shrinking rwin, where command-response still > goes fast but bandwidth is limited when you really need it. Well, you don't just set a low max value for rwin, that's stupid as well. That slows down the connection but it does it simply by make it less efficient. rwin (I hope I'm not confused here), changes dynamicaly as the receive buffer fills up. If the application doesn't read the data out of the TCP stack, the rwin drops to 0 and the sending side simply stops sending. When the application reads, the receivng side ACKs the larger rwin and data flows again. TCP is flow controled and works fine. If you want your application to limit the bandwidth, just don't read the data any faster than you want the other side to send it. Don't "break" TCP just to slow it down. That's like shooting one of your tires out with a gun because you were going too fast instead of just taking your foot off the gas. > Stretching ACKs is a pretty neat hack. It lets you turn every connection > into a satellite link (not common but in this particular scenario it may > be very useful). Not at all harmful either. Nore is it useful in my mind for doing anything besides simulating a sat link. > It probably wouldn't work exactly right without a participating control > application also slowing down the response rates. > > > This stuff would normally just be done at the application level > > and at that level, all you have to do is stop reading. The TCP/IP > > stack takes care of the rest. It is a flow-controled protocol. > > Yeah, but I am looking for ways to control it on demand. I can tweak rwin > and ACK delay from an external box. Turning dials, flipping switches, > makes for a pretty responsive environment. > > It's just an option I'm thinking about at the moment. Ok, I can see where if that's all you can do, then that might be an option to play with. That's fine. You have to work with what you have control over. If you can't get access to the gas pedal, then sometimes you just have to shoot the tires out. :) Maybe it will work. -- Curt Welch http://CurtWelch.Com/ curt@kcwc.com Webmaster for http://NewsReader.Com/
Technical Details
Message-ID:
<20010801201330.248$Cg@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!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!howland.erols.net!portc.blue.aol.com.MISMATCH!portc03.blue.aol.com!feed1.newsreader.com!news2.newsreader.com!ellis.newsreader.com!not-for-mailReferences:
<3B6735C3.FF59F476@ehsco.com> <20010801012336.182$ie@newsreader.com> <3B68204E.47CDD90A@ehsco.com> <20010801191648.707$F3@newsreader.com> <3B689173.1C0D21D9@ehsco.com>Show Full Headers
Complete Article Headers
Message-ID: <20010801201330.248$Cg@newsreader.com>
Subject: Re: rate-limiting peers
Date: Thu, 02 Aug 2001 00:13:30 +0000
From: curt@kcwc.com (Curt Welch)
References: <3B6735C3.FF59F476@ehsco.com> <20010801012336.182$ie@newsreader.com> <3B68204E.47CDD90A@ehsco.com> <20010801191648.707$F3@newsreader.com> <3B689173.1C0D21D9@ehsco.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!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!howland.erols.net!portc.blue.aol.com.MISMATCH!portc03.blue.aol.com!feed1.newsreader.com!news2.newsreader.com!ellis.newsreader.com!not-for-mail
Organization: NewsReader.Com
Newsgroups: news.software.nntp
X-Trace: NewsReader.Com S0ygVoyvMlndtF5cZr.V@7TKB-@b3.ZHYm@sye+QFWxEP4s
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-Url: http://CurtWelch.Com/
User-Agent: NewsReader.Com
Lines: 77