{"id":159,"date":"2016-11-02T01:05:23","date_gmt":"2016-11-02T01:05:23","guid":{"rendered":"https:\/\/testmozilla.wpengine.com\/webrtc\/?p=159"},"modified":"2016-11-02T01:05:23","modified_gmt":"2016-11-02T01:05:23","slug":"what-is-rmcat-congestion-control","status":"publish","type":"post","link":"https:\/\/blog.mozilla.org\/webrtc\/what-is-rmcat-congestion-control\/","title":{"rendered":"What is RMCAT congestion control, and how will it affect WebRTC?"},"content":{"rendered":"<p><a href=\"https:\/\/datatracker.ietf.org\/wg\/rmcat\/charter\/\"><strong>RMCAT<\/strong><\/a> is an IETF Working Group which came out of proposal by myself and Harald Alvestrand, and an associated Congestion Control IAB\/IRTF workshop at IETF 84 in Vancouver in 2012.\u00a0 The report from the workshop is <a href=\"https:\/\/tools.ietf.org\/html\/rfc7295\">RFC 7295<\/a>.<\/p>\n<p><strong>tl;dr:<\/strong><br \/>\nThe RMCAT WG is working to develop new congestion control protocols for realtime RTP traffic to improve on state-of-the-art, to ensure that media streams don&#8217;t harm other users of the networks (both non-RTP and other RTP media streams), and to maximize quality.\u00a0 There are several proposed algorithms, and this work will feed back into mainline WebRTC implementations to improve network usage and media quality.<!--more--><\/p>\n<h3><strong>History:<\/strong><\/h3>\n<p>Historically, RTP was unmanaged from a congestion-control perspective.\u00a0 If there wasn&#8217;t enough bandwidth for a stream, packets would queue somewhere, and if the queue overflowed, it would drop packets from the tail of the queue.\u00a0 This was seen as loss and delay, and in the case of the router being susceptible to <a href=\"https:\/\/en.wikipedia.org\/wiki\/Bufferbloat\">Bufferbloat<\/a>, it would cause major delay (even seconds of delay).<\/p>\n<p>In response to problems with this, some VoIP devices would let you choose high or low bandwidth.\u00a0 For audio it did this using different codecs, like G.711 (64Kbps payload) vs G.729 (8Kbps).\u00a0 For video, the fixed video codec rate would be set according to the bandwidth the user said they had.<\/p>\n<p>As you might guess, this was not a very good solution.\u00a0 Users often didn&#8217;t know their bandwidth; it would vary (especially if there was competing traffic at the bottleneck); if you guessed too low (or set it low to deal with an occasional problem), then quality would always be low.\u00a0 If you guessed too high, the call might totally fall apart.<\/p>\n<p>The next logical step was to use congestion control, which is how most traffic on the internet is managed.\u00a0 TCP uses various algorithms for <a href=\"https:\/\/en.wikipedia.org\/wiki\/TCP_congestion_control\">congestion control<\/a>, but in general uses variations on <a href=\"https:\/\/en.wikipedia.org\/wiki\/Additive_increase\/multiplicative_decrease\">AIMD algorithms<\/a>.<\/p>\n<h3><strong>Problems with traditional congestion control:<\/strong><\/h3>\n<p>AIMD causes a sawtooth in the transmission rate when loss is seen.\u00a0 Loss is the indicator of congestion to TCP; in classic routers it means a buffer-queue overflowed due to congestion.\u00a0 Typically in TCP a loss will cause a 50% reduction in bitrate, and then a steady increase until loss is seen again. Needless to say, this is not ideal (or even OK) behavior for video codecs (or non-fixed-rate audio codecs).\u00a0 And because the signal for reduction was queue overflow, serious delay would build up, then start to drain away, then build up again.<\/p>\n<p>You can see a nice graph of AIMD sawtooth <a href=\"http:\/\/www.opentextbooks.org.hk\/system\/files\/resource\/3\/3547\/3578\/media\/image116.png\">here<\/a> (the &#8220;Fast Retransmit&#8221; points are in response to loss).<\/p>\n<h3><strong>Proprietary Solutions:<\/strong><\/h3>\n<p>So people started thinking about it (I was one of them, working on the <a href=\"https:\/\/en.wikipedia.org\/wiki\/List_of_video_telecommunication_services_and_product_brands#\/media\/File:KabelWelt_Ojo.jpg\">Worldgate Ojo videophone<\/a> &#8211; <a href=\"https:\/\/en.wikipedia.org\/wiki\/Explicit_Congestion_Notification\">image in a call<\/a>), and came up with more media-friendly methods.\u00a0 What I did and what GIPS (now part of Google) did was to build a delay-sensitive congestion mechanism, which as a side-effect tries to avoid the conditions (queue overflow) that lead to packet loss.\u00a0 Typically they worked something like this:<\/p>\n<ul>\n<li>Measure the inter-packet timing of incoming RTP packets, and compare with expected arrival times (typically using RTP timestamps).<\/li>\n<li>If packets are arriving consistently late, tell the sender to reduce bitrate\u00a0 The amount of reduction is typically not dramatic, but may be proportional to the arrival slowdown (in the case of my algorithm in the Ojo).<\/li>\n<li>If it appears that packets are arriving faster than expected, a queue is draining, so maintain bitrate.<\/li>\n<li>If packets are arriving on-time, allow the sender to increase bitrate (how fast is one of many ad-hoc proprietary details to these schemes).<\/li>\n<\/ul>\n<p>Lo and behold, these algorithms generally worked!\u00a0 (And often, though not always, worked well.)<\/p>\n<p style=\"padding-left: 30px\">Hallelujah!\u00a0 We&#8217;re done, right?<\/p>\n<p style=\"padding-left: 30px\">No&#8230;<\/p>\n<h3><strong>Problems with proprietary schemes:<\/strong><\/h3>\n<p>So there were (are) still problems:<\/p>\n<ul>\n<li>These schemes were all proprietary, to one degree or another.\u00a0 (Google open-sourced the scheme used in webrtc.org code.)<\/li>\n<li>They were not specified in general other than the implementation.<\/li>\n<li>No one was really sure how much impact they had on other traffic (do they hog all the bandwidth?\u00a0 Do they fail when competing with TCP flows?)<\/li>\n<li>Are they fair with other media streams? (Often algorithms aren&#8217;t without proper tuning.)<\/li>\n<li>What happens when someone implementing proprietary scheme Foo tries to talk to someone who implements scheme Bar?<\/li>\n<li>How efficient are they, and how well do they avoid impairments of quality?<\/li>\n<li>How well they were tuned varied a lot, especially use-cases outside the norm.<\/li>\n<li>Some of these schemes would also lose badly when faced with enough TCP traffic, as long TCP flows (file transfers, etc) would eventually end up with all the bits<\/li>\n<\/ul>\n<h3><strong>Standards work:<\/strong><\/h3>\n<p>In 2012, Harald and I (and others) thought trying to standardize this mess was a really good idea.\u00a0 We proposed starting a Working Group, and there was enough interest in discussing the issues that the IRTF decided to hold<br \/>\na full-day workshop on realtime media congestion control before the IETF meeting.\u00a0 You can see the results of this workshop in <a href=\"https:\/\/tools.ietf.org\/html\/rfc7295\">RFC 7295<\/a>.\u00a0 It went very well, and the working group was approved.<\/p>\n<p>Since then a <strong>lot<\/strong> of work has happened.\u00a0 We have several proposed algorithms, including <a href=\"https:\/\/datatracker.ietf.org\/doc\/draft-ietf-rmcat-nada\/\">NADA<\/a> from Cisco, <a href=\"https:\/\/datatracker.ietf.org\/doc\/draft-ietf-rmcat-scream-cc\/\">Scream<\/a> from Ericsson and Google Congestion Control <a href=\"https:\/\/datatracker.ietf.org\/doc\/draft-ietf-rmcat-gcc\/\">algorithm<\/a> (this <a href=\"http:\/\/c3lab.poliba.it\/images\/6\/65\/Gcc-analysis.pdf\">paper<\/a> has a lot of good details on Google&#8217;s currently-implemented algorithm, tested using the <a href=\"https:\/\/datatracker.ietf.org\/doc\/draft-ietf-rmcat-eval-criteria\/\">evaluation framework<\/a> developed for RMCAT)\u00a0 These algorithms have improved considerably since they were first proposed, particularly in the areas of Fairness (to other flows using the same algorithm), and in competing with short- and long-lived TCP flows, but considerable tuning and updates still need to be made. You can see materials and the presentations from the latest IETF RMCAT meeting at the <a href=\"https:\/\/www.ietf.org\/proceedings\/96\/rmcat.html\">IETF 96 RMCAT Proceedings page<\/a>.<\/p>\n<p>Notably, some of these algorithms are at least able to &#8220;hold their own&#8221; with some TCP flows, though at the cost of expected additional delay.\u00a0 One good sign is that the few results available with routers configured to use modern AQM (Active Queue Management) algorithms such as <a href=\"https:\/\/en.wikipedia.org\/wiki\/CoDel\">CODEL<\/a> show almost no additional delay when competing with a TCP stream.\u00a0 I believe that improved variants on CODEL (<a href=\"https:\/\/tools.ietf.org\/html\/draft-ietf-aqm-fq-codel-06\">fq_codel<\/a>, etc) will work as well or better.<\/p>\n<p>To simplify future development of congestion algorithms for RTP, the WG has been defining a <a href=\"https:\/\/datatracker.ietf.org\/doc\/draft-dt-rmcat-feedback-message\/\">standard feedback RTCP packet<\/a> indicating arrival times and <a href=\"https:\/\/en.wikipedia.org\/wiki\/Explicit_Congestion_Notification\">ECN notifications<\/a>, so that the receiver side can be<br \/>\ngeneric and the algorithm can run solely on the sender side.\u00a0 Earlier versions of the Google algorithm (and others) ran part of the algorithm on the receiver side, and sent indications of available bandwidth using RTCP <a href=\"https:\/\/www.ietf.org\/archive\/id\/draft-alvestrand-rmcat-remb-03.txt\">REMB<\/a> packets.<\/p>\n<p>One thing to remember is that most of these algorithms are being tested and evaluated using network simulators like NS2 and NS3, and usually with &#8220;fake&#8221; video codecs or sometimes canned video sequences.<\/p>\n<h3><strong>Integration with browsers:<\/strong><\/h3>\n<p>An older version of Google&#8217;s algorithm (using REMB) is being used by both Chrome and Firefox currently.\u00a0 We hope to enable some of the other algorithms (preferably all of them!) in Firefox soon, on an optional (or custom-build)<br \/>\nbasis.\u00a0 This will let people experiment with these algorithms in real-world situations.\u00a0 We hope to have these available in some test versions of Firefox this winter, and also to implement the proposed generic feedback packet.<\/p>\n<p>Look for more announcements here as this work progresses, and perhaps additional articles about the individual algorithms (hint hint).<\/p>\n","protected":false},"excerpt":{"rendered":"RMCAT is an IETF Working Group which came out of proposal by myself and Harald Alvestrand, and an associated Congestion Control IAB\/IRTF workshop at IETF 84 in Vancouver in 2012.\u00a0 The report from the workshop is RFC 7295. tl;dr: The RMCAT WG is working to develop new congestion control protocols for realtime RTP traffic to [&hellip;]","protected":false},"author":936,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[295512,19537,298454,298577,300086],"coauthors":[],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>What is RMCAT congestion control, and how will it affect WebRTC? - Advancing WebRTC<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blog.mozilla.org\/webrtc\/what-is-rmcat-congestion-control\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What is RMCAT congestion control, and how will it affect WebRTC? - Advancing WebRTC\" \/>\n<meta property=\"og:description\" content=\"RMCAT is an IETF Working Group which came out of proposal by myself and Harald Alvestrand, and an associated Congestion Control IAB\/IRTF workshop at IETF 84 in Vancouver in 2012.\u00a0 The report from the workshop is RFC 7295. tl;dr: The RMCAT WG is working to develop new congestion control protocols for realtime RTP traffic to [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/blog.mozilla.org\/webrtc\/what-is-rmcat-congestion-control\/\" \/>\n<meta property=\"og:site_name\" content=\"Advancing WebRTC\" \/>\n<meta property=\"article:published_time\" content=\"2016-11-02T01:05:23+00:00\" \/>\n<meta name=\"author\" content=\"rjesup@mozilla.com\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"rjesup@mozilla.com\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/blog.mozilla.org\/webrtc\/what-is-rmcat-congestion-control\/\",\"url\":\"https:\/\/blog.mozilla.org\/webrtc\/what-is-rmcat-congestion-control\/\",\"name\":\"What is RMCAT congestion control, and how will it affect WebRTC? - Advancing WebRTC\",\"isPartOf\":{\"@id\":\"https:\/\/blog.mozilla.org\/webrtc\/#website\"},\"datePublished\":\"2016-11-02T01:05:23+00:00\",\"dateModified\":\"2016-11-02T01:05:23+00:00\",\"author\":{\"@id\":\"https:\/\/blog.mozilla.org\/webrtc\/#\/schema\/person\/dafff245da26a6f5877b280a676b8b77\"},\"breadcrumb\":{\"@id\":\"https:\/\/blog.mozilla.org\/webrtc\/what-is-rmcat-congestion-control\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/blog.mozilla.org\/webrtc\/what-is-rmcat-congestion-control\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/blog.mozilla.org\/webrtc\/what-is-rmcat-congestion-control\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/blog.mozilla.org\/webrtc\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"What is RMCAT congestion control, and how will it affect WebRTC?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/blog.mozilla.org\/webrtc\/#website\",\"url\":\"https:\/\/blog.mozilla.org\/webrtc\/\",\"name\":\"Advancing WebRTC\",\"description\":\"Committed to moving Firefox and WebRTC forward\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/blog.mozilla.org\/webrtc\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/blog.mozilla.org\/webrtc\/#\/schema\/person\/dafff245da26a6f5877b280a676b8b77\",\"name\":\"rjesup@mozilla.com\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/blog.mozilla.org\/webrtc\/#\/schema\/person\/image\/8a7e0f90beb6fef62f850fa89c6b1396\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/707a3249883bc1c42dbd54339c8daf44?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/707a3249883bc1c42dbd54339c8daf44?s=96&d=mm&r=g\",\"caption\":\"rjesup@mozilla.com\"},\"url\":\"https:\/\/blog.mozilla.org\/webrtc\/author\/rjesupmozilla-com\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"What is RMCAT congestion control, and how will it affect WebRTC? - Advancing WebRTC","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/blog.mozilla.org\/webrtc\/what-is-rmcat-congestion-control\/","og_locale":"en_US","og_type":"article","og_title":"What is RMCAT congestion control, and how will it affect WebRTC? - Advancing WebRTC","og_description":"RMCAT is an IETF Working Group which came out of proposal by myself and Harald Alvestrand, and an associated Congestion Control IAB\/IRTF workshop at IETF 84 in Vancouver in 2012.\u00a0 The report from the workshop is RFC 7295. tl;dr: The RMCAT WG is working to develop new congestion control protocols for realtime RTP traffic to [&hellip;]","og_url":"https:\/\/blog.mozilla.org\/webrtc\/what-is-rmcat-congestion-control\/","og_site_name":"Advancing WebRTC","article_published_time":"2016-11-02T01:05:23+00:00","author":"rjesup@mozilla.com","twitter_card":"summary_large_image","twitter_misc":{"Written by":"rjesup@mozilla.com","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/blog.mozilla.org\/webrtc\/what-is-rmcat-congestion-control\/","url":"https:\/\/blog.mozilla.org\/webrtc\/what-is-rmcat-congestion-control\/","name":"What is RMCAT congestion control, and how will it affect WebRTC? - Advancing WebRTC","isPartOf":{"@id":"https:\/\/blog.mozilla.org\/webrtc\/#website"},"datePublished":"2016-11-02T01:05:23+00:00","dateModified":"2016-11-02T01:05:23+00:00","author":{"@id":"https:\/\/blog.mozilla.org\/webrtc\/#\/schema\/person\/dafff245da26a6f5877b280a676b8b77"},"breadcrumb":{"@id":"https:\/\/blog.mozilla.org\/webrtc\/what-is-rmcat-congestion-control\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.mozilla.org\/webrtc\/what-is-rmcat-congestion-control\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/blog.mozilla.org\/webrtc\/what-is-rmcat-congestion-control\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/blog.mozilla.org\/webrtc\/"},{"@type":"ListItem","position":2,"name":"What is RMCAT congestion control, and how will it affect WebRTC?"}]},{"@type":"WebSite","@id":"https:\/\/blog.mozilla.org\/webrtc\/#website","url":"https:\/\/blog.mozilla.org\/webrtc\/","name":"Advancing WebRTC","description":"Committed to moving Firefox and WebRTC forward","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blog.mozilla.org\/webrtc\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/blog.mozilla.org\/webrtc\/#\/schema\/person\/dafff245da26a6f5877b280a676b8b77","name":"rjesup@mozilla.com","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blog.mozilla.org\/webrtc\/#\/schema\/person\/image\/8a7e0f90beb6fef62f850fa89c6b1396","url":"https:\/\/secure.gravatar.com\/avatar\/707a3249883bc1c42dbd54339c8daf44?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/707a3249883bc1c42dbd54339c8daf44?s=96&d=mm&r=g","caption":"rjesup@mozilla.com"},"url":"https:\/\/blog.mozilla.org\/webrtc\/author\/rjesupmozilla-com\/"}]}},"_links":{"self":[{"href":"https:\/\/blog.mozilla.org\/webrtc\/wp-json\/wp\/v2\/posts\/159"}],"collection":[{"href":"https:\/\/blog.mozilla.org\/webrtc\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.mozilla.org\/webrtc\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/webrtc\/wp-json\/wp\/v2\/users\/936"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/webrtc\/wp-json\/wp\/v2\/comments?post=159"}],"version-history":[{"count":0,"href":"https:\/\/blog.mozilla.org\/webrtc\/wp-json\/wp\/v2\/posts\/159\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.mozilla.org\/webrtc\/wp-json\/wp\/v2\/media?parent=159"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mozilla.org\/webrtc\/wp-json\/wp\/v2\/categories?post=159"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mozilla.org\/webrtc\/wp-json\/wp\/v2\/tags?post=159"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/blog.mozilla.org\/webrtc\/wp-json\/wp\/v2\/coauthors?post=159"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}