From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ob0-x230.google.com (mail-ob0-x230.google.com [IPv6:2607:f8b0:4003:c01::230]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by huchra.bufferbloat.net (Postfix) with ESMTPS id EE03A21F37C for ; Thu, 9 Apr 2015 03:26:54 -0700 (PDT) Received: by obbeb7 with SMTP id eb7so98730067obb.3 for ; Thu, 09 Apr 2015 03:26:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=bQ4cP7P+3Twovp0xkHVLG7S4whTyc3EfzDfgfFzcb9g=; b=jP84xVK0gpDZfPRoP5K9HFX7WJsEBZocUytwiQOhBWVkyqI+lLy8KflxbMEQx1RNyK Ae4IgGDdRiM1qHiJV5H/8tbU3y7Q0px8GgSOWhA/1PV8+cWJBpg9ZafSaEiEiUOO4kY2 e8Vcr4ThydXFXYWu9x/voU72sCc/kbIS94YwWM7UZI2CVnN72ekSeSj40k1UsEqnD5w0 RW4Bns0gcg48rghkVE+BnEMa7d6ypYJUnqHd4wW5KlMWEe4RDelYTyErOHYfbxtiY9Tc dCnLKxNwEfMZF4TMmRkVRX0VLUD9Sga1tSQQchvcV8ucMA3AaxFaGnZ7NkaHe/aTzVqt Fltg== MIME-Version: 1.0 X-Received: by 10.60.23.37 with SMTP id j5mr37520943oef.25.1428575213626; Thu, 09 Apr 2015 03:26:53 -0700 (PDT) Received: by 10.202.216.69 with HTTP; Thu, 9 Apr 2015 03:26:53 -0700 (PDT) In-Reply-To: References: <5BD9D41C-9631-4BD0-9C18-7909E9D6E9C0@gmail.com> Date: Thu, 9 Apr 2015 15:56:53 +0530 Message-ID: From: sahil grover To: David Lang Content-Type: multipart/alternative; boundary=047d7b33d4f224aa0b05134816d5 Cc: bloat@lists.bufferbloat.net Subject: Re: [Bloat] Requirements for bufferbloat to occur X-BeenThere: bloat@lists.bufferbloat.net X-Mailman-Version: 2.1.13 Precedence: list List-Id: General list for discussing Bufferbloat List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 10:27:23 -0000 --047d7b33d4f224aa0b05134816d5 Content-Type: text/plain; charset=UTF-8 Hi David Sir, Sorry for replying late..but i was v. busy with some other work. Thanks for the detailed explaination and yes ofcourse, it helped. Thanks a lot for clearing my doubts. On Sun, Mar 29, 2015 at 11:32 PM, David Lang wrote: > On Sun, 29 Mar 2015, sahil grover wrote: > > can you please explain me the concept of delay-bandwidth product,window >> size and buffer size(or something related with pipe size and packets in >> flight). >> > > > These are several different concepts, all related to network perfromance, > but most unrelated to buffer sizing. > > Any network connection is either 100% used, or idle if you look at a small > enough timeframe. When the network connection finishes sending one packet, > it is idle until the next packet is available to send. If there is no > buffer, the connection is idle until the software generates new data to > send. since this takes time, the connection will be idle. As a result, you > want to have some buffer so that the software can generate the traffic a > little earlier than it's needed so that as soon as the network finishes > sending one packet, it has the next packet available to send. > > when you have a router that is receving packets from multiple computers > and sending it out one link, buffers become even more important, if you > have two computers send you a packet at the same time, without a buffer > youc an only send one and the other will have to be dropped. so you need to > have a buffer to hold the second packet so you can send it out as soon as > you have time. > > bufferbloat is when the buffers are "too large" for the output connection > and you end up with "too much" data sitting in the buffers waiting to be > sent. The problem with trying to size buffers is that how long it takes to > transmit the data in the buffer depends on how large the packets in teh > buffer are and how fast the connection is. Traditionally, buffers were > sized in terms of X packets. If you have a buffer that can hold 10ms worth > of 75 byte packets at 1Gb/sec, but you are connected to a DSL line with an > upload spped of 1Mb/sec and are sending 1500 byte packets, then your buffer > now holds 200,000ms worth of traffic. > > TCP ramps up it's sending speed until it looses packets (or gets an ECN > signal), no packets will be dropped until the buffer fills up (in addition > to the traffic that gets sent), so the buffer will fill up and everything > that you try to do, including DNS lookups, gaming, VoIP, etc is going to be > delayed by how long it takes to get through the buffer. > > > window size, delay-bandwidth product, etc are a different aspect of the > network stack. they limit a little bit how much traffic a single TCP > connection will try to send without receiving any ack packets for the data. > The idea is that if you have a 1Gb/s connection, and a 1sping time, to keep > the connection full you should have 1Gb of taffic "in flight" (i.e. that > you have sent and not yet received acks for). If your window of allowd > unacked data is less than this, then you send your limit, then the > connection goes idle until the receiving side sends the asks > > Since the system doesn't actually know how long the path is, or the > available bandwidth, it again is guessing this and ramping it up until it > runs into trouble and then slows down > > > so back to your questions, the delay of the link times the bandwidth of > the link (delay-banseidth produt) determins the ideal window size for a > given TCP connection. This determins the minimum size of a buffer of > unacknowleged packets that a system has transmitted. This has _nothing_ to > do with the buffer size for packets that a system or rotuer is waiting to > transmit. Bufferbloat happens on the buffer for packets that are waiting to > be transmitted. a few ms worth of buffering for packets waiting to be > transmitted is necessary to keep the connection busy, bufferbloat happens > when these queues get much larger than this minimum value. There isn't a > hard limit that separates bloat from non-bloat, but if your queues are over > a second, you are very clearly way beyond a reasonable size buffer. 10s of > ms is probably reasonable, 100s of ms is probably not. > > Does this help? > > David Lang > _______________________________________________ > Bloat mailing list > Bloat@lists.bufferbloat.net > https://lists.bufferbloat.net/listinfo/bloat > > --047d7b33d4f224aa0b05134816d5 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi David Sir,

Sorry for replying late..but i was v. busy with some o= ther work.

Thanks for the detailed explaination

and yes ofcourse, it helped.

Than= ks a lot for clearing my doubts.

On Sun, Mar 29, 2015 at 11:32 PM, Davi= d Lang <david@lang.hm> wrote:
= On Sun, 29 Mar 2015, sahil grover wrote:

can you please explain me=C2=A0 the concept of=C2=A0 delay-bandwidth produc= t,window
size and buffer size(or something related with pipe size and packets in
flight).


These are several different concepts, all related to network perfromance, b= ut most unrelated to buffer sizing.

Any network connection is either 100% used, or idle if you look at a small = enough timeframe. When the network connection finishes sending one packet, = it is idle until the next packet is available to send. If there is no buffe= r, the connection is idle until the software generates new data to send. si= nce this takes time, the connection will be idle. As a result, you want to = have some buffer so that the software can generate the traffic a little ear= lier than it's needed so that as soon as the network finishes sending o= ne packet, it has the next packet available to send.

when you have a router that is receving packets from multiple computers and= sending it out one link, buffers become even more important, if you have t= wo computers send you a packet at the same time, without a buffer youc an o= nly send one and the other will have to be dropped. so you need to have a b= uffer to hold the second packet so you can send it out as soon as you have = time.

bufferbloat is when the buffers are "too large" for the output co= nnection and you end up with "too much" data sitting in the buffe= rs waiting to be sent. The problem with trying to size buffers is that how = long it takes to transmit the data in the buffer depends on how large the p= ackets in teh buffer are and how fast the connection is. Traditionally, buf= fers were sized in terms of X packets. If you have a buffer that can hold 1= 0ms worth of 75 byte packets at 1Gb/sec, but you are connected to a DSL lin= e with an upload spped of 1Mb/sec and are sending 1500 byte packets, then y= our buffer now holds 200,000ms worth of traffic.

TCP ramps up it's sending speed until it looses packets (or gets an ECN= signal), no packets will be dropped until the buffer fills up (in addition= to the traffic that gets sent), so the buffer will fill up and everything = that you try to do, including DNS lookups, gaming, VoIP, etc is going to be= delayed by how long it takes to get through the buffer.


window size, delay-bandwidth product, etc are a different aspect of the net= work stack. they limit a little bit how much traffic a single TCP connectio= n will try to send without receiving any ack packets for the data. The idea= is that if you have a 1Gb/s connection, and a 1sping time, to keep the con= nection full you should have 1Gb of taffic "in flight" (i.e. that= you have sent and not yet received acks for). If your window of allowd una= cked data is less than this, then you send your limit, then the connection = goes idle until the receiving side sends the asks

Since the system doesn't actually know how long the path is, or the ava= ilable bandwidth, it again is guessing this and ramping it up until it runs= into trouble and then slows down


so back to your questions, the delay of the link times the bandwidth of the= link (delay-banseidth produt) determins the ideal window size for a given = TCP connection. This determins the minimum size of a buffer of unacknowlege= d packets that a system has transmitted. This has _nothing_ to do with the = buffer size for packets that a system or rotuer is waiting to transmit. Buf= ferbloat happens on the buffer for packets that are waiting to be transmitt= ed.=C2=A0 a few ms worth of buffering for packets waiting to be transmitted= is necessary to keep the connection busy, bufferbloat happens when these q= ueues get much larger than this minimum value. There isn't a hard limit= that separates bloat from non-bloat, but if your queues are over a second,= you are very clearly way beyond a reasonable size buffer. 10s of ms is pro= bably reasonable, 100s of ms is probably not.

Does this help?

David Lang

_______________________________________________=
Bloat mailing list
Bloat@lists.bufferbloat.net<= /a>
= https://lists.bufferbloat.net/listinfo/bloat


--047d7b33d4f224aa0b05134816d5--