paullouisageneau / libdatachannel

C/C++ WebRTC network library featuring Data Channels, Media Transport, and WebSockets
https://libdatachannel.org/
Mozilla Public License 2.0
1.81k stars 364 forks source link

what is the bandwidth of the datachannel under Local Network? #1291

Open pppaulpeter opened 2 days ago

pppaulpeter commented 2 days ago

Hi Louis,

may i know have you test the bandwidth of the datachannel with libdatachannel? have you test it under arm device like raspberry pi4? it seems there is limitation in sctp library. this is the issue on sctp library https://github.com/sctplab/usrsctp/issues/245 @paullouisageneau

paullouisageneau commented 1 day ago

Locally data channel throughput will CPU-limited, mostly because of encryption. SCTP was a CPU bottleneck earlier because it had to calculate CRC32, however this is not the case anymore.

In practice between two desktop computers a data channel should be able to reach 700Mbit/s to 1Gbit/s with libdatachannel built in release mode provided the local network is fast enough, but it depends on the crypto library (from my experience it is significantly faster with GnuTLS than with OpenSSL). Of course throughput will be lower if one side is a less powerful machine or runs WebRTC in a browser.