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

"Fred Baker (fred)" <fred@cisco.com> Tue, 28 May 2013 19:16 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 34C8411E80BA for <rmcat@ietfa.amsl.com>; Tue, 28 May 2013 12:16:52 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -109.109
X-Spam-Level:
X-Spam-Status: No, score=-109.109 tagged_above=-999 required=5 tests=[BAYES_05=-1.11, 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 nDC0MqB1BdoE for <rmcat@ietfa.amsl.com>; Tue, 28 May 2013 12:16:47 -0700 (PDT)
Received: from rcdn-iport-6.cisco.com (rcdn-iport-6.cisco.com [173.37.86.77]) by ietfa.amsl.com (Postfix) with ESMTP id 1255F11E80DE for <rmcat@ietf.org>; Tue, 28 May 2013 12:16:47 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=17368; q=dns/txt; s=iport; t=1369768607; x=1370978207; h=from:to:cc:subject:date:message-id:references: in-reply-to:mime-version; bh=97YJoTTO5gCHNzaWEqfprw1AMRFewFzSH/+/QH34bmg=; b=Mm2Lwoo6Ru0gsWZ0IxCV8BkrEcy3rCLpSoo+/01mzAHBZ7zn7iqA3aqs p9GJNxtOuXF/HXUnn6WG9Yr26BCQFNmZzosBx/m7qo4eZU1ZDL1yAJ7xs NBk9pQrcy3hS/HyZwXLMadcEH4HoXJO05SXJ+QBagRC/MD9HjXZBJW0Ie k=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AqYIAAgCpVGtJXG8/2dsb2JhbABPBwOCREQwhFm1EIg2gQcWdIIkAQEESTAQAgEIBxsdBzIUEQIEDgUIE4dyDLwWjVARgQshDAQGAQkIgmJhA4hnj32QF4MPgic
X-IronPort-AV: E=Sophos; i="4.87,759,1363132800"; d="scan'208,217"; a="215887744"
Received: from rcdn-core2-1.cisco.com ([173.37.113.188]) by rcdn-iport-6.cisco.com with ESMTP; 28 May 2013 19:16:45 +0000
Received: from xhc-aln-x07.cisco.com (xhc-aln-x07.cisco.com [173.36.12.81]) by rcdn-core2-1.cisco.com (8.14.5/8.14.5) with ESMTP id r4SJGhaT010246 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Tue, 28 May 2013 19:16:43 GMT
Received: from xmb-rcd-x09.cisco.com ([169.254.9.220]) by xhc-aln-x07.cisco.com ([173.36.12.81]) with mapi id 14.02.0318.004; Tue, 28 May 2013 14:16:43 -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: AQHOWZxL6IEBmtLbYkSjConjeG2EKJkbRk0AgAAKCgA=
Date: Tue, 28 May 2013 19:16:42 +0000
Message-ID: <8C48B86A895913448548E6D15DA7553B8FADD8@xmb-rcd-x09.cisco.com>
References: <CACrWU7MCcA87wcnUiOrsm1rPiGVhjFmiA6q=_dMGRLvG+ECDSA@mail.gmail.com> <CALw1_Q3EVeg5UEVMyBUrx4tGKkAz+BgtshkOyjA4HbQF7bxb=w@mail.gmail.com>
In-Reply-To: <CALw1_Q3EVeg5UEVMyBUrx4tGKkAz+BgtshkOyjA4HbQF7bxb=w@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_8C48B86A895913448548E6D15DA7553B8FADD8xmbrcdx09ciscocom_"
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 19:16:52 -0000

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
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