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

Fix #6082 Reduce SSL buffer compaction #6083

Merged
merged 2 commits into from Mar 23, 2021
Merged

Conversation

gregw
Copy link
Contributor

@gregw gregw commented Mar 22, 2021

Fix #6082. Only compact when buffer is underflown.

Note that BufferUtil will also do a cheap "compact" when flipping empty buffers.

Signed-off-by: Greg Wilkins gregw@webtide.com

Only compact when buffer is underflown.  Note that BufferUtil will also do a cheap "compact" when flipping empty buffers.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
@gregw gregw added this to In progress in Jetty 10.0.2/11.0.2 via automation Mar 22, 2021
@gregw gregw requested review from sbordet and lorban March 22, 2021 22:49
@gregw
Copy link
Contributor Author

gregw commented Mar 22, 2021

Running our various SSL tests prior to this PR indicated that compaction was frequently done, with 4, 10 or more compactions done on many tests.
With this PR, compaction is seldom done. In fact it has only been observed in the SslServerBytesTest which needs java11. So the issue is that this change is now probably a little under tested. However it should be a significant performance gain.

Jetty 10.0.2/11.0.2 automation moved this from In progress to Review in progress Mar 23, 2021
Copy link
Contributor

@lorban lorban left a comment

Choose a reason for hiding this comment

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

One detail I'm unsure about.

Only continue if compact creates more space

Signed-off-by: Greg Wilkins <gregw@webtide.com>
@gregw gregw requested a review from lorban March 23, 2021 09:39
Jetty 10.0.2/11.0.2 automation moved this from Review in progress to Reviewer approved Mar 23, 2021
@gregw gregw merged commit 96f707f into jetty-10.0.x Mar 23, 2021
Jetty 10.0.2/11.0.2 automation moved this from Reviewer approved to Done Mar 23, 2021
@gregw gregw deleted the jetty-10.0.x-ssl-compact branch March 23, 2021 21:04
sbordet pushed a commit that referenced this pull request Apr 6, 2021
Fix #6082 Reduce SSL buffer compaction
Only compact when buffer is underflown.  Note that BufferUtil will also do a cheap "compact" when flipping empty buffers.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
(cherry picked from commit 96f707f)
sbordet pushed a commit that referenced this pull request Apr 7, 2021
Fix #6082 Reduce SSL buffer compaction
Only compact when buffer is underflown.  Note that BufferUtil will also do a cheap "compact" when flipping empty buffers.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
(cherry picked from commit 96f707f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

SslConnection compacting
3 participants