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

9.4.x: Improve ByteBufferPool implementations #6380

Merged

Conversation

lorban
Copy link
Contributor

@lorban lorban commented Jun 9, 2021

I also added a simple benchmark that shows the results of this improvement.

Original code:

Benchmark                                         Mode  Cnt        Score        Error  Units
ArrayByteBufferPoolBenchmark.testAcquireRelease  thrpt    3  2527727,245 ± 389428,504  ops/s

Just replacing offerFirst with offer, keeping the ConcurrentLinkedDeque:

Benchmark                                         Mode  Cnt        Score       Error  Units
ArrayByteBufferPoolBenchmark.testAcquireRelease  thrpt    3  3401758,446 ± 66958,678  ops/s

Replacing offerFirst with offer and replacing the ConcurrentLinkedDeque with a ConcurrentLinkedQueue:

Benchmark                                         Mode  Cnt        Score        Error  Units
ArrayByteBufferPoolBenchmark.testAcquireRelease  thrpt    3  4302078,532 ± 108538,319  ops/s

@lorban lorban added this to In progress in Jetty 9.4.43 FROZEN via automation Jun 9, 2021
@lorban lorban added this to In progress in Jetty 10.0.5/11.0.5 FROZEN via automation Jun 9, 2021
@lorban lorban linked an issue Jun 9, 2021 that may be closed by this pull request
@lorban lorban requested review from gregw and sbordet June 9, 2021 12:33
@lorban lorban removed this from In progress in Jetty 10.0.5/11.0.5 FROZEN Jun 9, 2021
@lorban lorban self-assigned this Jun 9, 2021
sbordet
sbordet previously approved these changes Jun 9, 2021
Jetty 9.4.43 FROZEN automation moved this from In progress to Reviewer approved Jun 9, 2021
gregw
gregw previously approved these changes Jun 10, 2021
Copy link
Contributor

@gregw gregw left a comment

Choose a reason for hiding this comment

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

Perhaps say a bit more about performance improvements.... or link to blog:)

…urrent queue implementation

Signed-off-by: Ludovic Orban <lorban@bitronix.be>
@lorban lorban dismissed stale reviews from gregw and sbordet via 80db2b6 June 10, 2021 08:32
@lorban lorban force-pushed the jetty-9.4.x-6379-reduce-ByteBufferPool-contention branch from 5d41093 to 80db2b6 Compare June 10, 2021 08:32
Jetty 9.4.43 FROZEN automation moved this from Reviewer approved to Review in progress Jun 10, 2021
Jetty 9.4.43 FROZEN automation moved this from Review in progress to Reviewer approved Jun 10, 2021
@lorban lorban changed the title Improve ByteBufferPool implementations 9.4.x: Improve ByteBufferPool implementations Jun 10, 2021
@lorban lorban merged commit f19b6fa into jetty-9.4.x Jun 10, 2021
Jetty 9.4.43 FROZEN automation moved this from Reviewer approved to Done Jun 10, 2021
@lorban lorban deleted the jetty-9.4.x-6379-reduce-ByteBufferPool-contention branch June 10, 2021 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Reduce contention in all ByteBufferPool implementations
3 participants