Repository navigation
test: enable TCP_NODELAY in SslEnd2EndTest - #93
Merged
Merged
Conversation
`SslEnd2EndTest` performs 8192 small echo round trips. Without `TCP_NODELAY`, Nagle's algorithm interacts with Linux delayed ACKs and adds about 80 ms to each round trip, so the test takes about 11 minutes on Ubuntu CI runners versus 9 seconds on Windows. With `TCP_NODELAY` it completes in about 4 seconds on Linux. Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
|
https://github.com/apache/mina/actions/runs/43107600113/job/130814898000 Good stuff. I knew it would make a difference, but I didn't realize it would be that significant. |
Contributor
|
FTR, when I run the build on my Ubuntu machine, it takes 15 mins without the patch,; and only 4 mins with it. I frankly wonder what is the root cause on Ubuntu, there may be some Linux tuning that are different from Windows and BSD... |
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.
SslEnd2EndTest(added in #77) takes about 11 minutes on Ubuntu runners but only about 9 seconds on Windows and macOS. In the latest 2.2.X run it accounts for 663 s of the 866 s spent in tests on Ubuntu, which pushes the Ubuntu jobs close to 15 minutes.Cause
The test performs 2 × 4096 small echo round trips, and neither socket enables
TCP_NODELAY. Nagle's algorithm then interacts with delayed ACKs (up to 40 ms on Linux), adding about 80 ms per round trip. Stack dumps show the main thread idle, waiting for the echo, not burning CPU.Fix
Enable
TCP_NODELAYon both the acceptor and the connector sessions in the test. Locally on Linux the class now runs in about 4 s instead of about 11 minutes.This also unblocks the 15 minute job cap proposed in #58.
🤖 Generated with Claude Code