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

Do not split headers and payload into two different buffers #6491

Merged
merged 1 commit into from Mar 28, 2023

Conversation

spericas
Copy link
Member

@spericas spericas commented Mar 24, 2023

Doing so may result in a drop in performance if no-tcp-delay is false (i.e. Nagle's algorithm is enabled) and client uses delayed ACKs (normally enabled). This draft also includes calls to listener (were absent) and verifies we don't exceed content length while writing the first payload part.

Writing two or more small buffers in sequence hits a problematic interaction between Nagle's algorithm and ACK delays in TCP that will cause a long delay where both ends are waiting for each other for 40 ms at least. This affects latency and throughput.

… may result in a drop in performance if no-tcp-delay is false and client uses delayed ACKs.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>
@spericas spericas added performance Níma Helidon Níma labels Mar 24, 2023
@spericas spericas self-assigned this Mar 24, 2023
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Mar 24, 2023
@spericas spericas marked this pull request as draft March 24, 2023 20:24
@spericas spericas added this to Normal priority in Backlog Mar 24, 2023
@spericas spericas marked this pull request as ready for review March 27, 2023 13:58
Copy link
Member

@tomas-langer tomas-langer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@spericas spericas merged commit 570893b into helidon-io:main Mar 28, 2023
12 checks passed
Backlog automation moved this from Normal priority to Closed Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Níma Helidon Níma OCA Verified All contributors have signed the Oracle Contributor Agreement. performance
Projects
Backlog
  
Closed
Development

Successfully merging this pull request may close these issues.

None yet

2 participants