Add dynamic packet batching to take advantage of sendmmsg on Linux#751
Merged
phillip-stephens merged 35 commits intomainfrom Dec 27, 2023
Merged
Add dynamic packet batching to take advantage of sendmmsg on Linux#751phillip-stephens merged 35 commits intomainfrom
sendmmsg on Linux#751phillip-stephens merged 35 commits intomainfrom
Conversation
…on a linux machine
…rn behavior to send-bsd.h
zakird
reviewed
Dec 9, 2023
zakird
reviewed
Dec 9, 2023
Member
|
@phillip-stephens it looks like this is now conflicting with another PR that we merged. Can you resolve conflicts? |
Contributor
Author
dadrian
approved these changes
Dec 18, 2023
Member
|
@phillip-stephens I would err towards getting this merged now since the work is complete. I don't see a ton of reason to hang around as a PR. Can you tag me once you've had a chance to address @dadrian's comments? |
Contributor
Author
zakird
reviewed
Dec 20, 2023
zakird
reviewed
Dec 20, 2023
zakird
reviewed
Dec 20, 2023
zakird
reviewed
Dec 20, 2023
| } | ||
| } | ||
| } | ||
| if (packets_sent == 0) { |
Member
There was a problem hiding this comment.
I don't think that I follow why there needs to be different logic here for packets_sent == 0
Contributor
Author
There was a problem hiding this comment.
Should have added a comment explaining the special handling to mimic linux's send_mmsg call. I've updated this!
zakird
approved these changes
Dec 20, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
--helptextTesting
Tested on both Mac and Ubuntu
Correctness
Ran against a smaller subnet with both
mainandPhillip/batch-packetsand both returned same outputPerformance
Inputs
sender-threads=4batch=6412% speedup compared to
mainon lab Ubuntu box (1.40 Mp/s vs. 1.25 Mp/s)Inputs
sender-threads=1batch=6448% speedup compared to
mainon lab Ubuntu box (860 Kp/s vs. 551 Kp/s)