<font face="arial" size="2"><p style="margin:0;padding:0;">Note: this is all about "how to achieve and sustain the ballistic phase that is optimal for Internet transport" in an end-to-end based control system like TCP.</p>
<p style="margin:0;padding:0;"> </p>
<p style="margin:0;padding:0;">I think those who have followed this know that, but I want to make it clear that I'm proposing a significant improvement that requires changes at the OS stacks and changes in the switches' approach to congestion signaling. There are ways to phase it in gradually. In "meshes", etc. it could probably be developed and deployed more quickly - but my thoughts on co-existence with the current TCP stacks and current IP routers are far less precisely worked out.</p>
<p style="margin:0;padding:0;"> </p>
<p style="margin:0;padding:0;">I am way too busy with my day job to do what needs to be done ... but my sense is that the folks who reduce this to practice will make a HUGE difference to Internet performance. Bigger than getting bloat fixed, and to me that is a major, major potential triumph.</p>
<p style="margin:0;padding:0;"> </p>
<p style="margin:0;padding:0;"><br class="WM_COMPOSE_SIGNATURE_START" /><br class="WM_COMPOSE_SIGNATURE_END" /><br /><br />On Thursday, May 29, 2014 8:11am, "David P. Reed" <dpreed@reed.com> said:<br /><br /></p>
<div id="SafeStyles1401376911">ECN-style signaling has the right properties ... just like TTL it can provide valid and current sampling of the packet ' s environment as it travels. The idea is to sample what is happening at a bottleneck for the packet ' s flow. The bottleneck is the link with the most likelihood of a collision from flows sharing that link.<br /><br /> A control - theoretic estimator of recent collision likelihood is easy to do at each queue. All active flows would receive that signal, with the busiest ones getting it most quickly. Also it is reasonable to count all potentially colliding flows at all outbound queues, and report that.<br /><br /> The estimator can then provide the signal that each flow responds to.<br /><br /> The problem of "defectors" is best dealt with by punishment... An aggressive packet drop policy that makes causing congestion reduce the cause's throughput and increases latency is the best kind of answer. Since the router can remember recent flow behavior, it can penalize recent flows.<br /><br /> A Bloom style filter can remember flow statistics for both of these local policies. A great use for the memory no longer misapplied to buffering....<br /><br /> Simple?<br /><br />
<div class="gmail_quote">On May 28, 2014, David Lang <david@lang.hm> wrote:
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid #cccccc; padding-left: 1ex;">
<p class="k10mail" style="margin:0;padding:0;">On Wed, 28 May 2014, dpreed@reed.com wrote:<br /><br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;">I did not mean that "pacing". Sorry I used a generic term. I meant what my <br />longer description described - a specific mechanism for reducing bunching that <br />is essentially "cooperative" among all active flows through a bottlenecked <br />link. That's part of a "closed loop" control system driving each TCP endpoint <br />into a cooperative mode.</blockquote><br />how do you think we can get feedback from the bottleneck node to all the <br />different senders?<br /><br />what happens to the ones who try to play nice if one doesn't?, including what <br />happens if one isn't just ignorant of the new cooperative mode, but activly <br />tries to cheat? (as I understand it, this is the fatal flaw in many of the past <br />buffering improvement proposals)<br /><br />While the in-h
ouse
router is the first bottleneck that user's traffic hits, the <br />bigger problems happen when the bottleneck is in the peering between ISPs, many <br />hops away from any sender, with many different senders competing for the <br />avialable bandwidth.<br /><br />This is where the new buffering approaches win. If the traffic is below the <br />congestion level, they add very close to zero overhead, but when congestion <br />happens, they manage the resulting buffers in a way that's works better for <br />people (allowing short, fast connections to be fast with only a small impact on <br />very long connections)<br /><br />David Lang<br /><br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;">The thing you call "pacing" is something quite different. It is disconnected <br />from the TCP control loops involved, which basically means it is flying blind. <br />Introducing that kind of "pacing" almost certainly
reduces
throughput, because <br />it *delays* packets.<br /><br />The thing I called "pacing" is in no version of Linux that I know of. Give it <br />a different name: "anti-bunching cooperation" or "timing phase management for <br />congestion reduction". Rather than *delaying* packets, it tries to get packets <br />to avoid bunching only when reducing window size, and doing so by tightening <br />the control loop so that the sender transmits as *soon* as it can, not by <br />delaying sending after the sender dallies around not sending when it can.<br /><br /><br /><br /><br /><br /><br /><br />On Tuesday, May 27, 2014 11:23am, "Jim Gettys" <jg@freedesktop.org> said:<br /><br /><br /><br /><br /><br /><br /><br />On Sun, May 25, 2014 at 4:00 PM, <[dpreed@reed.com](mailto:dpreed@reed.com)> wrote:<br /><br />Not that it is directly relevant, but there is no essential reason to require 50 ms. of buffering. That might be true of some particular QOS-related router algorith
m. 50
ms. is about all one can tolerate in any router between source and destination for today's networks - an upper-bound rather than a minimum.<br /><br />The optimum buffer state for throughput is 1-2 packets worth - in other words, if we have an MTU of 1500, 1500 - 3000 bytes. Only the bottleneck buffer (the input queue to the lowest speed link along the path) should have this much actually buffered. Buffering more than this increases end-to-end latency beyond its optimal state. Increased end-to-end latency reduces the effectiveness of control loops, creating more congestion.<br /><br />The rationale for having 50 ms. of buffering is probably to avoid disruption of bursty mixed flows where the bursts might persist for 50 ms. and then die. One reason for this is that source nodes run operating systems that tend to release packets in bursts. That's a whole other discussion - in an ideal world, source nodes would avoid bursty packet releases by letting the control by the receiver
window
be "tight" timing-wise. That is, to transmit a packet immediately at the instant an ACK arrives increasing the window. This would pace the flow - current OS's tend (due to scheduling mismatches) to send bursts of packets, "catching up" on sending that could have been spaced out and done earlier if the feedback from the receiver's window advancing were heeded.<br /><br /><br /><br />That is, endpoint network stacks (TCP implementations) can worsen congestion by "dallying". The ideal end-to-end flows occupying a congested router would have their packets paced so that the packets end up being sent in the least bursty manner that an application can support. The effect of this pacing is to move the "backlog" for each flow quickly into the source node for that flow, which then provides back pressure on the application driving the flow, which ultimately is necessary to stanch congestion. The ideal congestion control mechanism slows the sender part of the application to a pac
e that
can go through the network without contributing to buffering.<br /><br />Pacing is in Linux 3.12(?). How long it will take to see widespread deployment is another question, and as for other operating systems, who knows.<br />See: [<a href="https://lwn.net/Articles/564978">https://lwn.net/Articles/564978</a>/](<a href="https://lwn.net/Articles/564978">https://lwn.net/Articles/564978</a>/)<br /><br /><br />Current network stacks (including Linux's) don't achieve that goal - their pushback on application sources is minimal - instead they accumulate buffering internal to the network implementation.<br />This is much, much less true than it once was. There have been substantial changes in the Linux TCP stack in the last year or two, to avoid generating packets before necessary. Again, how long it will take for people to deploy this on Linux (and implement on other OS's) is a question.<br /><br />This contributes to end-to-end latency as well. But if you th
ink
about it, this is almost as bad as switch-level bufferbloat in terms of degrading user experience. The reason I say "almost" is that there are tools, rarely used in practice, that allow an application to specify that buffering should not build up in the network stack (in the kernel or wherever it is). But the default is not to use those APIs, and to buffer way too much.<br /><br />Remember, the network send stack can act similarly to a congested switch (it is a switch among all the user applications running on that node). IF there is a heavy file transfer, the file transfer's buffering acts to increase latency for all other networked communications on that machine.<br /><br />Traditionally this problem has been thought of only as a within-node fairness issue, but in fact it has a big effect on the switches in between source and destination due to the lack of dispersed pacing of the packets at the source - in other words, the current design does nothing to stem the "burst g
roups"
from a single source mentioned above.<br /><br />So we do need the source nodes to implement less "bursty" sending stacks. This is especially true for multiplexed source nodes, such as web servers implementing thousands of flows.<br /><br />A combination of codel-style switch-level buffer management and the stack at the sender being implemented to spread packets in a particular TCP flow out over time would improve things a lot. To achieve best throughput, the optimal way to spread packets out on an end-to-end basis is to update the receive window (sending ACK) at the receive end as quickly as possible, and to respond to the updated receive window as quickly as possible when it increases.<br /><br />Just like the "bufferbloat" issue, the problem is caused by applications like streaming video, file transfers and big web pages that the application programmer sees as not having a latency requirement within the flow, so the application programmer does not have an incentive to co
ntrol
pacing. Thus the operating system has got to push back on the applications' flow somehow, so that the flow ends up paced once it enters the Internet itself. So there's no real problem caused by large buffering in the network stack at the endpoint, as long as the stack's delivery to the Internet is paced by some mechanism, e.g. tight management of receive window control on an end-to-end basis.<br /><br />I don't think this can be fixed by cerowrt, so this is out of place here. It's partially ameliorated by cerowrt, if it aggressively drops packets from flows that burst without pacing. fq_codel does this, if the buffer size it aims for is small - but the problem is that the OS stacks don't respond by pacing... they tend to respond by bursting, not because TCP doesn't provide the mechanisms for pacing, but because the OS stack doesn't transmit as soon as it is allowed to - thus building up a burst unnecessarily.<br /><br />Bursts on a flow are thus bad in general. They make
congestion happen when it need not.<br />By far the biggest headache is what the Web does to the network. It has turned the web into a burst generator.<br />A typical web page may have 10 (or even more images). See the "connections per page" plot in the link below.<br />A browser downloads the base page, and then, over N connections, essentially simultaneously downloads those embedded objects. Many/most of them are small in size (4-10 packets). You never even get near slow start.<br />So you get an IW amount of data/TCP connection, with no pacing, and no congestion avoidance. It is easy to observe 50-100 packets (or more) back to back at the bottleneck.<br />This is (in practice) the amount you have to buffer today: that burst of packets from a web page. Without flow queuing, you are screwed. With it, it's annoying, but can be tolerated.<br />I go over this is detail in:<br /><br />[<a href="http://gettys.wordpress.com/2013/07/10/low-latency-requires-smart-queuing-traditional-aqm-is-not-enough">http://gettys.wordpress.com/2013/07/10/low-latency-requires-smart-queuing-traditional-aqm-is-not-enough</a>/](<a href="http://gettys.wordpress.com/2013/07/10/low-latency-requires-smart-queuing-traditional-aqm-is-not-enough">http://gettys.wordpress.com/2013/07/10/low-latency-requires-smart-queuing-traditional-aqm-is-not-enough</a>/)<br />So far, I don't believe anyone has tried pacing the IW burst of packets. I'd certainly like to see that, but pacing needs to be across TCP connections (host pairs) to be possibly effective to outwit the gaming the web has done to the network.<br />- Jim<br /><br /><br /><br /><br /><br /><br /><br /><br />On Sunday, May 25, 2014 11:42am, "Mikael Abrahamsson" <[swmike@swm.pp.se](mailto:swmike@swm.pp.se)> said:<br /><br /><br /><br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7f
a8; padding-left: 1ex;">On Sun, 25 May 2014, Dane Medic wrote:<br /><br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #8ae234; padding-left: 1ex;">Is it true that devices with less than 64 MB can't handle QOS? -><br />[<a href="https://lists.chambana.net/pipermail/commotion-dev/2014-May/001816.html">https://lists.chambana.net/pipermail/commotion-dev/2014-May/001816.html</a>](<a href="https://lists.chambana.net/pipermail/commotion-dev/2014-May/001816.html">https://lists.chambana.net/pipermail/commotion-dev/2014-May/001816.html</a>)</blockquote><br />At gig speeds you need around 50ms worth of buffering. 1 gigabit/s =<br />125 megabyte/s meaning for 50ms you need 6.25 megabyte of buffer.<br /><br />I also don't see why performance and memory size would be relevant, I'd<br />say forwarding performance has more to do with CPU speed than anything<br />else.<br /><br />--<br />Mikael Abrahamsson email:
[swmike@swm.pp.se](mailto:swmike@swm.pp.se)<br /><hr /><br />Cerowrt-devel mailing list<br />[Cerowrt-devel@lists.bufferbloat.net](mailto:Cerowrt-devel@lists.bufferbloat.net)<br />[<a href="https://lists.bufferbloat.net/listinfo/cerowrt-devel">https://lists.bufferbloat.net/listinfo/cerowrt-devel</a>](<a href="https://lists.bufferbloat.net/listinfo/cerowrt-devel">https://lists.bufferbloat.net/listinfo/cerowrt-devel</a>)</blockquote><br /><hr /><br />Cerowrt-devel mailing list<br />[Cerowrt-devel@lists.bufferbloat.net](mailto:Cerowrt-devel@lists.bufferbloat.net)<br />[<a href="https://lists.bufferbloat.net/listinfo/cerowrt-devel">https://lists.bufferbloat.net/listinfo/cerowrt-devel</a>](<a href="https://lists.bufferbloat.net/listinfo/cerowrt-devel">https://lists.bufferbloat.net/listinfo/cerowrt-devel</a>)</blockquote></pre>
<p style="margin:0;padding:0;margin-top: 2.5em; margin-bottom: 1em; border-bottom: 1px solid #000;"> </p>
<p class="k10mail" style="margin:0;padding:0;"><hr /><br />Cerowrt-devel mailing list<br />Cerowrt-devel@lists.bufferbloat.net<br /><a href="https://lists.bufferbloat.net/listinfo/cerowrt-devel">https://lists.bufferbloat.net/listinfo/cerowrt-devel</a><br /></pre>
</blockquote>
</div>
<br />-- Sent from my Android device with <strong><a href="https://play.google.com/store/apps/details?id=com.onegravity.k10.pro2">K-@ Mail</a></strong>. Please excuse my brevity.</div></font>