Re: [rtcweb] Open data channel issues

"Karl Stahl" <karl.stahl@intertex.se> Mon, 03 March 2014 15:06 UTC

Return-Path: <karl.stahl@intertex.se>
X-Original-To: rtcweb@ietfa.amsl.com
Delivered-To: rtcweb@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 0D4061A0141 for <rtcweb@ietfa.amsl.com>; Mon, 3 Mar 2014 07:06:33 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.899
X-Spam-Level:
X-Spam-Status: No, score=-0.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, MSGID_MULTIPLE_AT=1] autolearn=no
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 TDVLng3CekHL for <rtcweb@ietfa.amsl.com>; Mon, 3 Mar 2014 07:06:31 -0800 (PST)
Received: from smtp.it-norr.com (smtp.it-norr.com [80.244.64.162]) by ietfa.amsl.com (Postfix) with ESMTP id B005D1A0127 for <rtcweb@ietf.org>; Mon, 3 Mar 2014 07:06:30 -0800 (PST)
Received: from ([90.229.134.75]) by smtp.it-norr.com (Telecom3 SMTP service) with ASMTP id 201403031606260796 for <rtcweb@ietf.org>; Mon, 03 Mar 2014 16:06:26 +0100
From: "Karl Stahl" <karl.stahl@intertex.se>
To: <rtcweb@ietf.org>
References: <31B9253D-E826-4D07-A8A1-1B062B50F163@lurchi.franken.de> <530D9CC5.5080508@ericsson.com> <5312FBBC.5080006@jesup.org> <CAOJ7v-2GHt37u8raWDKquNFLCjSv-ptP0YGojPwuLv02da_m1Q@mail.gmail.com> <5313EC0D.9030808@jesup.org> <CAOJ7v-3L5_V2wuwVLKpz61VHey7yx3LnG_xrPLb5W+6DOLiEJw@mail.gmail.com> <53146B2C.8080008@jesup.org> <CAOJ7v-3q2TJnVFYLJFJ=mCjdOtOY9-0W1t6=m+_gNC8+Z65b9w@mail.gmail.com> <531488F0.7090300@jesup.org> <CAOJ7v-15EZjPSjAPotCdnZEu4kgeLzBXJdFnYaccaN1ViBvyjQ@mail.gmail.com>
In-Reply-To: <CAOJ7v-15EZjPSjAPotCdnZEu4kgeLzBXJdFnYaccaN1ViBvyjQ@mail.gmail.com>
Date: Mon, 3 Mar 2014 16:06:22 +0100
Message-ID: <000101cf36f2$23da7a60$6b8f6f20$@stahl@intertex.se>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----=_NextPart_000_0002_01CF36FA.859EE260"
X-Mailer: Microsoft Office Outlook 12.0
Thread-Index: Ac827igaTGTVlXvJRqSyhoh73r3fLAAA/I8Q
Content-Language: sv
Archived-At: http://mailarchive.ietf.org/arch/msg/rtcweb/9oXNnibFHEiZ1DLqiayqykDnXbQ
Subject: Re: [rtcweb] Open data channel issues
X-BeenThere: rtcweb@ietf.org
X-Mailman-Version: 2.1.15
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: <http://www.ietf.org/mail-archive/web/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: Mon, 03 Mar 2014 15:06:33 -0000

 

 

Från: rtcweb [mailto:rtcweb-bounces@ietf.org] För Justin Uberti
Skickat: den 3 mars 2014 15:37
Till: Randell Jesup
Kopia: rtcweb@ietf.org
Ämne: Re: [rtcweb] Open data channel issues

 

 

 

On Mon, Mar 3, 2014 at 5:51 AM, Randell Jesup <randell-ietf@jesup.org> wrote:

On 3/3/2014 8:28 AM, Justin Uberti wrote:

On Mon, Mar 3, 2014 at 3:44 AM, Randell Jesup <randell-ietf@jesup.org> wrote:

On 3/3/2014 6:18 AM, Justin Uberti wrote:

On Sun, Mar 2, 2014 at 6:42 PM, Randell Jesup <randell-ietf@jesup.org> wrote:

 

So I still think manual chunking seems like a reasonable thing to support. I don't quite get the congestion control concerns; just because there is a max chunk size doesn't mean the impl can't buffer multiple chunks in bufferedAmount; the app could let that fill up to a degree to avoid having to poll constantly to prevent underrun.

 

On a slow link this will work if the browser isn't janky.  On a fast link GC pauses and other things may cause the buffer to drain out and go idle for significant periods.

 

Since the amount buffered is up to the app, the app can just increase the buffer size to provide enough data to cover the next second or so of transfer. 

 

How does the app increase the size of the internal SCTP buffers?  (And that buffer is shared by all channels, of course).

 

What I meant is the app can make multiple calls to send() at a time, each with a chunk, which will be buffered in the api layer and increase bufferedAmount.


Aha - that explains "increase the buffer size".  Yes, that will work, modulo that the app will have to track the actual bandwidth by either monitoring how fast the bufferedAmount drains, or via a JS API to report bandwidth ala the bug I opened on JS interaction with congestion control.  I still feel this pushes some level of congestion control into the JS app (and done like trying to thread needles with oven mitts on - ok, mild exaggeration) or the app will simply ignore this issue (likely) and get sub-optimal performance, perhaps significantly.  So I think more thought would be useful here, especially at the W3/JS level.

If we have the bandwidth reporting, having the app choose a reasonable amount of buffering would be much easier/simpler.

 

In the simplest case, you could just have a medium-sized buffer of size (max expected transfer rate * worst-case poll interval); 10 MB would be plenty for almost all cases.

 

If you wanted to be smarter, you could start with 1MB buffer, poll every 100 ms, and then adjust the buffer size to be at least ((data sent since last poll / time since last poll) * worst-case poll interval), where worst-case poll interval, accounting for GC, is somewhere around 1 second. 

 

I don't think this pushes CC onto apps, it just pushes spooling onto them, which is the consequence of not having streams yet.

 





-- 
Randell Jesup -- rjesup a t mozilla d o t com


_______________________________________________
rtcweb mailing list
rtcweb@ietf.org
https://www.ietf.org/mailman/listinfo/rtcweb