Re: [rmcat] "Soup Nazi" RTP Congestion Control

"Fred Baker (fred)" <fred@cisco.com> Tue, 28 May 2013 20:57 UTC

Return-Path: <fred@cisco.com>
X-Original-To: rmcat@ietfa.amsl.com
Delivered-To: rmcat@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 0EE5A21E8097 for <rmcat@ietfa.amsl.com>; Tue, 28 May 2013 13:57:47 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -109.853
X-Spam-Level:
X-Spam-Status: No, score=-109.853 tagged_above=-999 required=5 tests=[AWL=0.745, BAYES_00=-2.599, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-8, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Sw1UORyiFY9M for <rmcat@ietfa.amsl.com>; Tue, 28 May 2013 13:57:41 -0700 (PDT)
Received: from rcdn-iport-8.cisco.com (rcdn-iport-8.cisco.com [173.37.86.79]) by ietfa.amsl.com (Postfix) with ESMTP id 4825121F8E12 for <rmcat@ietf.org>; Tue, 28 May 2013 13:56:42 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=21420; q=dns/txt; s=iport; t=1369774602; x=1370984202; h=from:to:cc:subject:date:message-id:references: in-reply-to:mime-version; bh=SHM7YfyG0M5+RsYRXURSOL6S4Nt4ES3U9PaPMCkh9yg=; b=jFU6ITo9D7ZY/xoDmrRcUjhW6PIybKHAKUt6uc2W3XLZ0hns9nyeg4At PQX0Aw96x0QIdiOHSX9k036fJV0+ajztvx34COYzHQqsH2SFzmBGUH8BB +Go1ADHZebB0ttOkiLLrnYDEQ9EdJ0vO9/ArUTQiSlbqGiXp6w8q8SOMb I=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AlwGAFYYpVGtJV2Y/2dsb2JhbABPBwOCREQwuWyINoEGFnSCJAEBBEkkDBACAQgHGx0HMhQRAgQOBQgTh3IMu2aNUBEFgQYhDAQGAQkIgmJhA4hnj32QF4MPgWk+
X-IronPort-AV: E=Sophos; i="4.87,759,1363132800"; d="scan'208,217"; a="215911149"
Received: from rcdn-core-1.cisco.com ([173.37.93.152]) by rcdn-iport-8.cisco.com with ESMTP; 28 May 2013 20:56:41 +0000
Received: from xhc-aln-x12.cisco.com (xhc-aln-x12.cisco.com [173.36.12.86]) by rcdn-core-1.cisco.com (8.14.5/8.14.5) with ESMTP id r4SKufsv007475 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Tue, 28 May 2013 20:56:41 GMT
Received: from xmb-rcd-x09.cisco.com ([169.254.9.220]) by xhc-aln-x12.cisco.com ([173.36.12.86]) with mapi id 14.02.0318.004; Tue, 28 May 2013 15:56:41 -0500
From: "Fred Baker (fred)" <fred@cisco.com>
To: Kevin Gross <kevin.gross@avanw.com>
Thread-Topic: [rmcat] "Soup Nazi" RTP Congestion Control
Thread-Index: AQHOWZxL6IEBmtLbYkSjConjeG2EKJkbRk0AgAAKCgCAAAlUgIAAEp6A
Date: Tue, 28 May 2013 20:56:40 +0000
Message-ID: <8C48B86A895913448548E6D15DA7553B8FB058@xmb-rcd-x09.cisco.com>
References: <CACrWU7MCcA87wcnUiOrsm1rPiGVhjFmiA6q=_dMGRLvG+ECDSA@mail.gmail.com> <CALw1_Q3EVeg5UEVMyBUrx4tGKkAz+BgtshkOyjA4HbQF7bxb=w@mail.gmail.com> <8C48B86A895913448548E6D15DA7553B8FADD8@xmb-rcd-x09.cisco.com> <CALw1_Q3qdPqj0+A2xuxOCMUT0DZAtxeucz9C3bm1USDpawy2-A@mail.gmail.com>
In-Reply-To: <CALw1_Q3qdPqj0+A2xuxOCMUT0DZAtxeucz9C3bm1USDpawy2-A@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [10.19.64.122]
Content-Type: multipart/alternative; boundary="_000_8C48B86A895913448548E6D15DA7553B8FB058xmbrcdx09ciscocom_"
MIME-Version: 1.0
Cc: Dan Weber <dan@marketsoup.com>, rmcat WG <rmcat@ietf.org>
Subject: Re: [rmcat] "Soup Nazi" RTP Congestion Control
X-BeenThere: rmcat@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: "RTP Media Congestion Avoidance Techniques \(RMCAT\) Working Group discussion list." <rmcat.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/rmcat>, <mailto:rmcat-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/rmcat>
List-Post: <mailto:rmcat@ietf.org>
List-Help: <mailto:rmcat-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/rmcat>, <mailto:rmcat-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 28 May 2013 20:57:47 -0000

On May 28, 2013, at 12:49 PM, Kevin Gross <kevin.gross@avanw.com<mailto:kevin.gross@avanw.com>> wrote:

We should definitely keep AQM (including ECN) in mind in this work but I don't think this is the right place to have a PIE vs CoDel discussion.

I didn't intend to introduce a "vs"; my point, if anything, is to not limit one's thinking to CoDel, and to suggest a way that hop-by-hop AQM would be effectively used in RTP congestion control.

Kevin Gross
+1-303-447-0517
Media Network Consultant
AVA Networks - www.AVAnw.com<http://www.avanw.com/>, www.X192.org<http://www.x192.org/>


On Tue, May 28, 2013 at 1:16 PM, Fred Baker (fred) <fred@cisco.com<mailto:fred@cisco.com>> wrote:

On May 28, 2013, at 11:40 AM, Kevin Gross <kevin.gross@avanw.com<mailto:kevin.gross@avanw.com>> wrote:

I don't know where you get the idea that codel drops packets in bursts. It drops one packet per "interval". "Interval" starts at 100 ms and is reduced slowly (71, 58, 50, 45 ms...) until congestion abates. Codel is effective on TCP flows because the loss happens promptly, not because the loss is substantial.

Codel is designed to be applied on a per-hop basis. I don't see how it can be applied at a receiver for an end-to-end connection as you are apparently proposing and still behave as generally intended by its inventors.

I was scratching my head on that as well.

In context, you would do well to also consider PIE:

http://tools.ietf.org/html/draft-pan-tsvwg-pie
  "PIE: A Lightweight Control Scheme To Address the Bufferbloat Problem",
  Rong Pan, Preethi Natarajan, Chiara Piglione, Mythili Prabhu, 10-Dec-12

It has the same caveat, of being designed to operate hop by hop. CoDel specifically talks about dropping, and Van will tell you he's not fond of ECN, but IMHO it could be applied to ECN as well. The PIE draft explicitly mentions ECN marking as a possibility. That would feed into

https://tools.ietf.org/html/rfc6679
6679 Explicit Congestion Notification (ECN) for RTP over UDP. M.
     Westerlund, I. Johansson, C. Perkins, P. O'Hanlon, K. Carlberg.
     August 2012. (Format: TXT=148560 bytes) (Status: PROPOSED STANDARD)

In short, ECN is intended to trigger a TCP/SCTP sender to reduce its effective window a bit. RFC 3168 says "do the same thing you would in the event of loss", which for loss-triggered TCPs (newReno, CUBIC) means to either set it to some value (used to be one), multiply it by some fractional value (1/2, 7/8, or whatever), or reset it to the last value that didn't result in such a trigger. I would expect that in the RTP context it might insert some form of seder traffic shaping/pacing (if one presumes that a codec has certain mean and maximum rates, it might default to allowing the sender to send at its maximum rate, and might when told to reduce the rate in the direction of the mean - and if the mean is still too quick, ask the application to reduce its rate by changing codecs).


Kevin Gross
+1-303-447-0517<tel:%2B1-303-447-0517>
Media Network Consultant
AVA Networks - www.AVAnw.com<http://www.avanw.com/>, www.X192.org<http://www.x192.org/>


On Sat, May 25, 2013 at 5:04 PM, Dan Weber <dan@marketsoup.com<mailto:dan@marketsoup.com>> wrote:
Hi guys,

I've been reviewing CoDel, and it's clear how it works reasonably well for TCP.  It's only slightly more complicated than an implementation using a fixed timestamp per packet expiration.  The minor difference occurs when it goes into its dropping state which uses a square root scaling factor for the time based on the number of previously dropped packets in a sequence.  This takes advantage of a known behavior of TCP congestion control algorithms which expect congestion to happen in large bursts.

When applied to RTP unknowingly, the behavior could be pretty disastrous on video content.  Although I doubt it's any worse than actual competing content with no AQM, a particular case does stand out.  When CoDel is in place where there is no competing traffic and the RTP sender bursts the wire without pacing in respect to maximum stream bitrate, CoDel is likely to burst drop packets because of overflow on the queue time.  I think this behavior is extremely desirable.  This will bring awareness to all vendors and implementors that their implementations were working despite the fact that they were improper.

This kind of behavior can be enhanced and augmented in a way that can be used to expedite the implementation of effective RTP Congestion Control.   If we were to implement receiver side CoDel for dropping "frames" or "messages" of RTP packets on new implementations, we could become the "Soup Nazi" and start effectively identifying improper implementations as well as rendering them inoperable.  If implemented by one of the major WebRTC browser implementations, a chain reaction may develop that forces implementation of RTP congestion control up the pipeline.  If useful feedback is delivered back to the sender, which really needs to be net translated to frames processed and frames dropped, an application with its encoder could reasonably adjust.  This may solve fairness related problems because the receiver could identify if the sender overflowed the queues by evaluating actual arrival time compared with frame presentation time (converted RTP timestamps).  If the receiver enforces this constraint, fairness on RTP streams is effectively in force because implementations are rendered inoperable, and it works safely within the scope of CoDel.  This implies that TCP would be only at most affected in the same way that another TCP stream would.

And finally this leads to my suggested solution for sender side congestion control.  Based on my assumption that CoDel implementation for AQM is on the horizon across routers in the next 5 to 10 years, a reasonable suggestion for RTP Congestion control may lead to CoDel over CoDel.  An enhanced version of CoDel for implementation in the RTP stack (or at the codec encapsulation layer) provides clear frame demarcation and packet mapping (frame no == packets n..m), and drops entire frames based on: an assumption (or determination) of targeted maximum bandwidth and (optional, but highly recommended) some form of ECN.  Notifications are then provided back to the application as to which frames were dropped, and the application can make the decision on how it seeks to change its behavior if at all [This combines well with the receiver based notification.  If it chooses not to, the RTP stack enforces "fairness" by degrading the application performance in full units.  A good implementation of this should use FEC to maintain a constant bitrate despite the variations of the bitrate in the underlying stream.  While it does use more bandwidth than immediately necessary it provides great stability for the stream in cooperation with both long lived TCP streams and short lived bursty streams.  It also prevents unfair competition from TCP.  In addition, it provides additional resiliency for handling intermittent packets loss from WiFi and other wireless/cellular transmissions.

I think the benefits of this solution outweigh any other that has been proposed, and solves many of the difficult challenges presented.  While I have not yet build a full working model, It should work in at least as many places as CoDel works, and much research has been done and continues to be done on how well CoDel handles fairness.

I would love to hear everyone's thoughts on this.  Please send me your feedback.

Thanks,
Dan



  *   Make things as simple as possible, but not simpler.
Albert Einstein



-----------------------------------
"We are learning to do a great many clever things...The next great task
will be to learn not to do them."

- G. K. Chesterton (1874-1936)