Sending small chunk in webrtc datachannels cause high cpu
Reported by
shach...@gmail.com,
Mar 16 2017
|
||||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.110 Safari/537.36 Steps to reproduce the problem: 1. open 2 tabs in http://13.81.0.79:8085/ 2. open dev tools - there'll be a number in the console, that's the id 3. In 1 of the tabs fill in 1st input box the other tab's id and connect 4. In the same tab, fill in the 2nd input box with 1200 and press create data 5. then click send data continuously This will keep on sending 1200 packets synchronously until the bufferedAmount reaches an upper threshold, will stop until it reaches a lower threshold and send again... What is the expected behavior? I'd expect the send until bufer is full -> stop until buffer empty, cycles to be very fast. And cpu to be mostly idle. What went wrong? But sometimes my computer never gets to the high buffer threshold because sending on a datachannel buffer of 1200 bytes is so cpu intensive. If I'd change the buffer to 16000 and repeat this experiment, the cpu is a lot more idle, and actually the throughput measured on the other tab (the receiver) is much better That's not the case on Firefox. Did this work before? N/A Does this work in other browsers? Yes Chrome version: 57.0.2987.110 Channel: stable OS Version: OS X 10.11.3 Flash Version: On Chrome 56, sometimes the connection would have sort of dropped entirely, meaning that after a few times dc.send would just do nothing, and no messages would be received on the other tab (even though the channel is still open on both ends)
,
Mar 17 2017
Test results: FF 1200: process - 159%, system: 13.29%, User: 31.25%, idle 55.46% 16000: process - 112.1%, system: 10.61%, User: 20.36%, idle: 69.03% CR (incognito) 1200: process1 - 109.1%, process2- 99.3%, process3 - 73.8%, system: 28.9% , User: 49.11%, idle: 21.99% 16000: process1 - 93.3%, process2 - 86.2%, process3 - 85.3%, system: 24.42%, User: 49.46%, idle: 26.13 Also, in Chrome it totally janks the frame rate, I can add rAf thingy to make it more visible. attached gpu details, and shots for the tests
,
Mar 17 2017
Thank you for providing more feedback. Adding requester "brajkumar@chromium.org" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Mar 17 2017
,
Mar 21 2017
I've updated the page, to also render frames whenever possible (rAf). That shows that when sending in chrome the main thread gets completely stuck while in firefox all good.
,
Mar 21 2017
,
Mar 24 2017
Some one from WEBRTC dev team could you please look in to this issue. Thank You!
,
Mar 27 2017
pthatcher@ can you take a look?
,
Aug 31 2017
Any update on this CC rbasuvula@chromium.org ? |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by brajkumar@chromium.org
, Mar 17 2017Labels: Needs-Feedback
62.6 KB
62.6 KB View Download