-
-
Notifications
You must be signed in to change notification settings - Fork 372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WebRTC] investigate data-channels-flow-control example throughput performance issue #101
Comments
cargo build --release --example data-channels-flow-control increases performance, but not comparable to pion. ./target/release/examples/data-channels-flow-control |
should be tokio performance limit some other benchmark goroutines: 3.22234675s total, 3.222346ms avg per iteration https://www.reddit.com/r/rust/comments/lg0a7b/benchmarking_tokio_tasks_and_goroutines/ |
@rainliu I made some benchmarks between Go(Pion) and Rust with long running time, maybe will help. Go(Pion)
after has been throwed an exception and throughput started to go slow down without stop to stable point.
Rust
after that, started to go down and reached lowest point
after started slowly to grow up and balancing between CPU/RAM Go
Rust
|
@whans Benchmarks was made on I/O for file, not on socket. Linux have different behavior for files and sockets. @rainliu I suppose that, here example use socket connection. |
@vitdevelop thanks |
thanks @vitdevelop and @whans for the benchmarking. Look like we need some efforts to profile the hotspots/bottlenecks. |
add tokio console to check the schedule issue |
@whans thanks for I tried to check with
|
@vitdevelop |
@vitdevelop, thanks for the finding. Could you submit a PR to add tokio-console/console_subscriber to data-channels-flow-control example? so, I can take a look. |
@rainliu Added PR |
I was doing some testing of my own on sctp and on just write to streams it takes almost 22x slower compared to same example on pion side. I was seeing an issue to use IO-free state machine style, while that will speed up the protocol it still doesnt explain the root cause. The rust example shouldn't be 22x slower it should be atleast comparable to the pion one if not faster. Has anyone explored the root cause of such slow down of the protocol? |
Pion has more than 500Mbps+,
but, webrtc-rs only has around 13Mbps:
The text was updated successfully, but these errors were encountered: