-
Notifications
You must be signed in to change notification settings - Fork 120
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
feat(netbench) enable jumbo frame probing by default #1648
Merged
Merged
Conversation
This file contains 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
This commit enabled jumbo frames by default for the quic drivers. They can be disabled by setting the env variable MAX_MTU to some smaller value, like 1,500.
Currently the way to understand netbench is to reverse engineer our code or decipher the netbench CI. I has a lot of difficulty getting a minimal netbench script running, so ended up adding a bit of documentation describing my difficulties and updating some out of date things.
otherwise massive packet sizes are observed
camshaft
reviewed
Mar 2, 2023
Comment on lines
28
to
31
# run the server while collecting metrics. Generic Segmenetation Offload (GSO) | ||
# is disabled, because it results in production-disssimilar behaviors when | ||
# running over the loopback interface. Specifically, packets larger than the | ||
# max supported MTU can be observed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spoke offline: this is to be expected. We hand the OS massive payload buffers and it defers splitting it up into individual packets for as long as possible. I think it's best to test with it enabled.
Also include some light edits in the readme.
camshaft
reviewed
Mar 3, 2023
camshaft
previously approved these changes
Mar 3, 2023
Co-authored-by: Cameron Bytheway <[email protected]>
camshaft
previously approved these changes
Mar 3, 2023
camshaft
approved these changes
Mar 3, 2023
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.
Description of changes:
The main semantic change in this PR is switching the s2n-quic netbench driver to probe for jumbo frames by default. The tcp stack already does this by default, so this should make comparison between quic/tcp/tls a bit more accurate.
This also expands our Netbench readmes and adds an example script that shows a working end to end example of how to use netbench.
Call-outs:
Cleanup of child processes: I don't know that we have a "best practice" way to do this yet. The cleanest way to do this would be to refactor the collector's to use a SIGTERM handler that would kill the child process. This would require a bit more of a code change, so instead my script just uses process groups to send the SIGTERM to multiple processes.
Loopback funkiness: I disable GSO in my script, because if it is enabled there are excessively large packet sizes. Example tshark output
I also saw quite a few 60,000+ sized packets at the start of the run. In my research it looks like this is to be expected with loopback devices, but if anyone wants me to dig into this more let me know.
failure to probe jumbo frames: When I was running netbench with tshark, occasionally I would see that quic would fail to successfully probe the jumbo frames and would instead stick with the minimum transmission unit. My expectation is that this would be happening due to packet drops, but I would expect the drop rate to be very low over the loopback interface, so this was surprising. I think it would be worth investigating this further, but curious for other's opinions.
Testing:
In one terminal I ran
sudo tshark -f "udp port 4433" -i any
to capture the packets sent in the netbench run.In another terminal I ran
run-netbench-request-response.sh
This is an example of the output from the terminal running
tshark
We can see that jumbo frames are being used.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.