[rtcweb] Issue with "priority" defined in rtcweb-transports

Taylor Brandstetter <deadbeef@google.com> Wed, 11 October 2017 17:29 UTC

Return-Path: <deadbeef@google.com>
X-Original-To: rtcweb@ietfa.amsl.com
Delivered-To: rtcweb@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 4C137132397 for <rtcweb@ietfa.amsl.com>; Wed, 11 Oct 2017 10:29:48 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.74
X-Spam-Level:
X-Spam-Status: No, score=-1.74 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, HTML_OBFUSCATE_05_10=0.26, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=google.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tk6NnXmQO9Pf for <rtcweb@ietfa.amsl.com>; Wed, 11 Oct 2017 10:29:46 -0700 (PDT)
Received: from mail-ua0-x235.google.com (mail-ua0-x235.google.com [IPv6:2607:f8b0:400c:c08::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id B52A412895E for <rtcweb@ietf.org>; Wed, 11 Oct 2017 10:29:45 -0700 (PDT)
Received: by mail-ua0-x235.google.com with SMTP id z4so1543950uaz.5 for <rtcweb@ietf.org>; Wed, 11 Oct 2017 10:29:45 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=fvBKeqM2GjmkhsZlSihodkr2NaSvA97f40B35WQ/9C8=; b=Ib5zhZXNB4rCrRDQTbU8br7x/NIa95ENCJ+uzlRa24Ix84gWUxBD7Xbgk88XUPG+Lc 1kUCqPtODxcVhQft6noB+vax1bzP2aNY2s5s0sxJCrL0rRr4MklxXPy1Sp54KGOcm9mv RXBhKOIOTVhE9VocqxUqRwQugkrty/jQA+hK0JSNciz3EJsgpROZsZCmjPyXAXwI6/ol 9+0LTXTCVNu6aAu3fZ3jbCKmAHLe3xtEZQLUpkksTzDE+sd9EYuGpKaMEYkWEXvQocrC 1e4LVBLOfeMsEl7jkk5/0NughOd6LrFGbFztugNWEoP2nrczr86BWmpCUYgx3BSg4s99 mQ1g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=fvBKeqM2GjmkhsZlSihodkr2NaSvA97f40B35WQ/9C8=; b=sQ45hQlZvzxhNGySBorieMdR1Y/JxekeFe6i7WLhTlEEjt5mCEK8i0wCt65rrSVEUX 5ZsFqhzNdfZviZpODiCadfEmPNw/rtNtScQIU+xuTr6QQ8qP82T1oPwxClmd6dZUMZsi UHob3GbiGmY9wQqqKHtP4pPtuCo87Tg4KcNTtn6Z43pjLsLr7WCesUSLuI/DCkFBpxqa ejsNFghEnowfublrUFeiYW6pj9v4SyAyB3kj1n+xswvC52FVv0F+Z62RO06DKqd4C7RF UbvjI6pYMNBRTl7ayrDrCOCvARPhdZO586q8wyZ1XePTHBTS2Kg1YCLKh+h3T0zo3x2E Dnxg==
X-Gm-Message-State: AMCzsaUGbKe/+wLaGInQmpjjsySS+iE9o2/iKRKUiMHyo3KGFPln+6wW hqfaucGt+OxPjUEnqVBPZtoq6Xl/WbWb66m4RzpNJePzxjk=
X-Google-Smtp-Source: AOwi7QB4er1F8vNQhl7mhdCweI73ukYquPGtEdq+XJDcNOINDJ0yCVMePJT4CV/Gbx9FJ1AMpjtzAoglXvrTY0auoHg=
X-Received: by 10.159.48.74 with SMTP id i10mr301054uab.115.1507742984213; Wed, 11 Oct 2017 10:29:44 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.31.169.130 with HTTP; Wed, 11 Oct 2017 10:29:43 -0700 (PDT)
From: Taylor Brandstetter <deadbeef@google.com>
Date: Wed, 11 Oct 2017 10:29:43 -0700
Message-ID: <CAK35n0Z6_N9iMZ3F2y1QXG1M9Efx4ha9sm8CBcahzjYtHwWSEg@mail.gmail.com>
To: RTCWeb IETF <rtcweb@ietf.org>
Content-Type: multipart/alternative; boundary="f403045e3b64fcddbd055b48c42c"
Archived-At: <https://mailarchive.ietf.org/arch/msg/rtcweb/PPi-je3QcVoDak0NwQobgabzNX4>
Subject: [rtcweb] Issue with "priority" defined in rtcweb-transports
X-BeenThere: rtcweb@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Real-Time Communication in WEB-browsers working group list <rtcweb.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/rtcweb>, <mailto:rtcweb-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/rtcweb/>
List-Post: <mailto:rtcweb@ietf.org>
List-Help: <mailto:rtcweb-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/rtcweb>, <mailto:rtcweb-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 11 Oct 2017 17:29:48 -0000

(Mainly copied from https://github.com/w3c/webrtc-pc/issues/1625)

When defining priority, rtcweb-transports says:

The WebRTC prioritization model is that the application tells the
WebRTC endpoint about the priority of media and data that is
controlled from the API.
...
The priority settings affect two pieces of behavior: Packet send
sequence decisions and packet markings. Each is described in its own
section below.

The sections below are "Local prioritization" and "Usage of Quality of
Service - DSCP and Multiplexing". The "local prioritization" section gives
this guidance:

When an WebRTC endpoint has packets to send on multiple streams that
are congestion-controlled under the same congestion control regime,
the WebRTC endpoint SHOULD cause data to be emitted in such a way
that each stream at each level of priority is being given
approximately twice the transmission capacity (measured in payload
bytes) of the level below.

Thus, when congestion occurs, a "high" priority flow will have the
ability to send 8 times as much data as a "very-low" priority flow if
both have data to send. This prioritization is independent of the
media type. The details of which packet to send first are
implementation defined.

For example: If there is a high priority audio flow sending 100 byte
packets, and a low priority video flow sending 1000 byte packets, and
outgoing capacity exists for sending >5000 payload bytes, it would be
appropriate to send 4000 bytes (40 packets) of audio and 1000 bytes
(one packet) of video as the result of a single pass of sending
decisions.

This has two significant issues I can see:

   - It only allows ratios of 1:2:4:8. This is not granular enough to be
   very useful. Especially when balancing transmission capacity between audio
   tracks and video tracks; in practice it's common for video tracks to use
   much more than 8 times the bitrate of audio tracks.
   - A single enum is used for both relative bitrate and relative QoS
   priority. But in my experience it's common for an application to want a
   flow that uses *less* bitrate to have a *higher* QoS priority. This may
   even be the *more* common situation.

So, why do we have one enum for both things? I'd propose defining the
priority as something that only impacts the priority in network queues
(QoS-level priority and SCTP priority, as previously discussed), and use
something else to control the relative bitrate allocation.

For example, a floating point value attached to each RTCEncodingParameters
 (say, relativeCapacity), where an encoding with twice the relativeCapacity of
another encoding will be given twice the transmission capacity. If
implementations can handle ratios of 1:2:4:8, I don't see any reason why
they shouldn't be able to handle arbitrary ratios.