<div dir="ltr"><div>> [Cake] lower bounds for latency</div><div>> </div><div>> David Lang david at <a href="http://lang.hm">lang.hm</a> </div><div>> Fri Jun 5 20:08:54 PDT 2015</div><div>> Previous message: [Cake] lower bounds for latency</div><div>> Next message: [Cake] lower bounds for latency</div><div>> Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]</div><div>> On Fri, 5 Jun 2015, Dave Taht wrote:</div><div>> </div><div>> > On Fri, Jun 5, 2015 at 6:02 PM, David Lang <david at <a href="http://lang.hm">lang.hm</a>> wrote:</div><div>> >> On Fri, 5 Jun 2015, Dave Taht wrote:</div><div>> >></div><div>> >>> bob's been up to good stuff lately..</div><div>> >>></div><div>> >>> <a href="http://bobbriscoe.net/projects/latency/sub-mss-w.pdf">http://bobbriscoe.net/projects/latency/sub-mss-w.pdf</a></div><div>> >></div><div>> >></div><div>> >> one thing that looks wrong to me. He talks about how TCP implementations</div><div>> >> cannot operate at less than two packets per RTT. It's not clear what he</div><div>> >> means. Does he mean two packets in flight per RTT? or two packets worth of</div><div>> >> buffering per RTT?</div><div>> ></div><div>> > Flight.</div><div>> </div><div>> In that case I think his analysis of the effects of AQM are incorrect because </div><div>> they only limit the buffer size on one device, not the number of packets in </div><div>> flight.</div><div><br></div><div>I think what he was getting after is if you have a low provisioned bandwidth and a really low ping, TCP effectively has a lower bound on how slow it will go. Say you have a 1ms ping to a CDN in your ISP's network, but your ISP only provisioned you 1Mb of bandwidth. Since all current TCP implementations require at least 2 segments in flight, this puts a lower bound on how slowly TCP will send those segments. (1500*2)/1ms = 12Mb/s. Even though you have a 1Mb connection, TCP will flood your connection with 12Mb and will not back off, even with packetloss signalling to back off.</div><div>The example in the paper is a lot more realistic than my extreme example. Several streams with a 6ms ping, putting a lower bound of (1500*2)/6ms = 4Mb/s per stream.</div><div><br></div><div>> </div><div>> </div><div>> He uses the example of 12 connections totaling 40Mb with a 6ms RTT. What if the </div><div>> systems are in the same rack and have <1ms RTT? according to him TCP just won't </div><div>> work.</div><div><br></div><div>If the system's are in the same rack, the choke points are probably somewhere other than the backplane of the switch, like the CPU, harddrive, or possibly even the port. In datacenters, it's relatively easy to throw more bandwidth at the problem.</div><div><br></div><div>> </div><div>> > I also disagree with this statement:</div><div>> ></div><div>> > "It is always wrong to send smaller packets more</div><div>> > often, because the constraint may be packet pro-</div><div>> > cessing, not bits."</div><div>> ></div><div>> > because I believe (but would have to go look at some data to make</div><div>> > sure) that we're good with packet sizes down into the 300 byte range</div><div>> > on most hardware, and thus could (and SHOULD) also reduce the mss in</div><div>> > these cases to keep the "signal strength" up at a sustainable levels.</div><div>> ></div><div>> > I do recall that bittorrent used to reduce the mss and were asked to</div><div>> > stop (a decade ago), when they got as far down as 600 bytes or so.</div><div>> ></div><div>> > but the rest I quite liked.</div><div>> </div><div>> I think it depends on the speed of the link. At the very low end (cheap home </div><div>> routers) and the very high end (multiple links >10Gb/s) the available processing </div><div>> per packet may be a limit. But in the huge middle ground between these extremes, </div><div>> you have quite a bit of cpu time per packet. The 3800 at 100Mb is an example of </div><div>> running into this limit, but at 10Mb it has no problem. The WRT1200 with it's </div><div>> dual-core GHz+ cpu has a lot of processor available for a bit more money. From </div><div>> there up until the large datacenter/ISP cores with multiple 10Gb ports to </div><div>> manage, you hae pleanty of cpu.</div><div>> </div><div>> The other issue is the length of the 'dead air' between packets. The current </div><div>> standards have this being a fixed amount of time. combined with the 'wasted' </div><div>> packet header data results in the same amount of data using less total time if </div><div>> it's sent in fewer, larger packets than in smaller packets. when you are pushing </div><div>> the limits of the wire, this can make a difference.</div><div>> </div><div>> This is why wifi tries to combine multiple packets into one transmission.</div><div>> </div><div>> <rant></div><div>> We just need to break people of the mindset that it makes sense to hold off on </div><div>> transmitting something "just in case" something more comes along that could be </div><div>> combiend with it.</div><div>> </div><div>> Instead they need to start off tranmitting the first one that comes along </div><div>> without any wait, and then in the future, check the queue to see if there's </div><div>> something else that can be combined with what you are ready to transmit, and if </div><div>> so, send it at the same time. Rsyslog implements exactly this algorithm in how </div><div>> it batches log messages that it's processing, the first message gets the minimum </div><div>> delay and future messages only get as much delay as is required to keep things </div><div>> moving. It does mean that the process hits continuous processing sooner (where </div><div>> there is no delay between finishing working on one batch and starting work on </div><div>> the next), but that 'always busy' point is not peak throughput, as batches are </div><div>> more efficient to process, the throughput keeps climbing while the latency </div><div>> climbs at a much lower rate (eventually you do hit a solid wall where larger </div><div>> batches don't help, so you just fall behind until traffic slows)</div><div>> </rant></div><div>> </div><div>> >></div><div>> >> Two packets in flight per RTT would make sense as a minimum, but two packets</div><div>> >> worth of buffering on N devices in the path doesn't.</div><div>> >></div><div>> >> using the example of a 6ms RTT. Depending on the equipment involved, this</div><div>> >> could have from one to several devices handling the packets between the</div><div>> >> source and the destination. Saying that each device in the path must have</div><div>> >> two packets worth of buffering doesn't make sense. At a given line speed and</div><div>> >> data rate, you will have X packets in flight. the number of devices between</div><div>> >> the source and the destination will not change X.</div><div>> ></div><div>> > Flight.</div><div>> ></div><div>> >> If the requirement is that there are always at least two packets in flight</div><div>> >> in a RTT, it doesn't then follow that both packets are going to be in the</div><div>> >> buffer of the same device at the same time. I spoke with a vendor promising</div><div>> >> 7ms Los Angeles to Los Vegas. For the vast majority of that 7ms the packets</div><div>> >> are not in the buffers of the routers, but exist only as light in the fiber</div><div>> >> (I guess you could view the fiber acting as a buffer in such conditions)</div><div>> >></div><div>> >> where is the disconnect between my understanding and what Bob is talking</div><div>> >> about?</div><div>> ></div><div>> > Flight, not buffering. Redefining the goal of an aqm to keep packets</div><div>> > in flight rather than achieve a fixed queuing delay is what this is</div><div>> > about, and improving tcps to also keep packets in flight with</div><div>> > subpacket windows is part of his answer.</div><div>> ></div><div>> > I like getting away from a target constant for delay (why 5ms when 5us</div><div>> > is doable) and this is an interesting way to think about it from both</div><div>> > ends.</div><div>> </div><div>> I agree, the idea of trying to maintain a fixed buffer delay is not what we're </div><div>> trying to do, we're trying for the minimum amount of uneccessary buffer delay. </div><div>> The 'target' numbers are just the point where we say the delay is so bad that </div><div>> the traffic must be slowed.</div><div>> </div><div>> > And I was nattering about how I didn't like delayed acks just a few hours ago.</div><div>> </div><div>> what we need is a TCP stack that can combine acks that arrive separately over </div><div>> time and only send one.</div><div>> </div><div>> David Lang</div></div>