Low DataChannel throughput between 2 peers

Skip to first unread message

Drago Titev

Jun 7, 2022, 2:03:35 PMJun 7
to discuss-webrtc

I'm testing webrtc datachannel throughput between 2 peers. Results are terrible.
1st peer is native webrtc client(webrtc M101 with usrsctp, centos, behind WiFi Docsis Router(srflx mode)) and 2nd peer is chromium browser(v101, windows 10, direct connection(host mode)).
RTT between hosts varies between 100-400ms. Pings varies 6-7 seconds they are 100 ms next 4 seconds are 400ms.
Maximum DC troughput between both peers is no more then 1-2 mbps. I tried on same hosts and same condition with iperf3(udp mode) and make several tests. Everytime i reach 80-100mbps.
So i'm wondering what may cause this and how to increase speed, Is it kernel tunning parameters, is it wrong webrtc configuration of my native client.
I'm stuck on this and can not find any solution.

Thank you in advance.

Victor Boivie

Jun 19, 2022, 6:22:45 PM (6 days ago) Jun 19
to discuss-webrtc
I think we need more information to be able to help you. Your RTT and ping times doesn't quite make sense (what are the 6-7 seconds?)

DataChannel has a loss-based congestion control algorithm, so it's generally your packet loss that affects performance. RTTs absolutely matter (they control how quickly packets can get paced out, as SCTP will pace out packets when it receives acknowledgements, and as they vary by RTT, your performance will vary), but packet loss will result in shrinking the congestion window, which affects the throughput.

I believe you can configure iperf3 in different ways, and I'm not sure how it does congestion control.

On your native webrtc client, please ensure that you have sufficient socket read and write buffer sizes. If they are too small, you will very easily experience packet loss. You can't do any changes on Chrome, and it has fairly small buffers, as they are mainly optimized for ensuring low latency for the media sent over the same UDP socket in WebRTC (and then you don't want to fill several hundreds of milliseconds worth of data). 

To be able to help you more, we need more information. And if you believe that there is a bug, please open a bug report at https://bugs.webrtc.org/ with enough information for us to reproduce the problem. Note that the usrsctp support in WebRTC has been deprecated.


Reply all
Reply to author
0 new messages