Skip to content
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

use the new feature of the crc crate for more throughput in sctp #569

Merged
merged 2 commits into from
May 18, 2024

Conversation

KillingSpark
Copy link
Contributor

@KillingSpark KillingSpark commented May 15, 2024

The crc crate has released finally released a new version featuring an improved algorithm that greatly increases performance. The new algorithm uses a few Kb more of lookup tables which is why it has to be enabled explicitly. This PR bumps the version of the crc crate to the required level and enables that new algorithm.

Crc performance is a significant bottleneck in the sctp throughput as showcased by the throughput example:

Before:

Throughput: 67238910 Bytes/s, 1026 pkts, 1026 loops
Send 1031 pkts
Throughput: 68025330 Bytes/s, 1038 pkts, 1038 loops
Send 1038 pkts
Throughput: 68484075 Bytes/s, 1045 pkts, 1045 loops
Send 1049 pkts
Throughput: 68353005 Bytes/s, 1043 pkts, 1043 loops
Send 1046 pkts
Throughput: 68746215 Bytes/s, 1049 pkts, 1049 loops
Send 1050 pkts
Throughput: 67632120 Bytes/s, 1032 pkts, 1032 loops
Send 1037 pkts

After:

Throughput: 85523175 Bytes/s, 1305 pkts, 1305 loops
Send 1311 pkts
Throughput: 86768340 Bytes/s, 1324 pkts, 1324 loops
Send 1325 pkts
Throughput: 86899410 Bytes/s, 1326 pkts, 1326 loops
Send 1328 pkts
Throughput: 86440665 Bytes/s, 1319 pkts, 1319 loops
Send 1319 pkts
Throughput: 86637270 Bytes/s, 1322 pkts, 1322 loops
Send 1323 pkts
Throughput: 86899410 Bytes/s, 1326 pkts, 1326 loops
Send 1328 pkts

Edit: About the formatting CI: I can only reproduce one of the two fixes locally, but that one isn't related to this PR. The one related to this PR I can't reproduce locally (cargo fmt just doesn't produce this output for me...?!)

Do you want me to fix these two? I'd be glad to do it but I don't want to clutter the PR either

Copy link

codecov bot commented May 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 61.50%. Comparing base (dcfefd7) to head (14f02f5).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #569      +/-   ##
==========================================
- Coverage   61.61%   61.50%   -0.12%     
==========================================
  Files         531      531              
  Lines       48885    48751     -134     
  Branches    12289    12297       +8     
==========================================
- Hits        30120    29983     -137     
- Misses       9575     9581       +6     
+ Partials     9190     9187       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rainliu
Copy link
Member

rainliu commented May 18, 2024

please fix cargo fmt check

@rainliu rainliu merged commit 7b3740f into webrtc-rs:master May 18, 2024
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants