-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Reduce contention in all ByteBufferPool
implementations
#6379
Labels
Comments
lorban
added a commit
that referenced
this issue
Jun 9, 2021
…urrent queue implementation Signed-off-by: Ludovic Orban <[email protected]>
lorban
added a commit
that referenced
this issue
Jun 10, 2021
…urrent queue implementation Signed-off-by: Ludovic Orban <[email protected]>
lorban
added a commit
that referenced
this issue
Jun 10, 2021
…urrent queue implementation Signed-off-by: Ludovic Orban <[email protected]>
lorban
changed the title
Reduce contention in all
9.4.x: Reduce contention in all Jun 10, 2021
ByteBufferPool
implementationsByteBufferPool
implementations
lorban
changed the title
9.4.x: Reduce contention in all
Reduce contention in all Jun 10, 2021
ByteBufferPool
implementationsByteBufferPool
implementations
lorban
added a commit
that referenced
this issue
Jun 10, 2021
…urrent queue implementation Signed-off-by: Ludovic Orban <[email protected]>
lorban
added a commit
that referenced
this issue
Jun 10, 2021
…urrent queue implementation Signed-off-by: Ludovic Orban <[email protected]>
lorban
added a commit
that referenced
this issue
Jan 9, 2024
Signed-off-by: Ludovic Orban <[email protected]>
lorban
added a commit
that referenced
this issue
Jan 9, 2024
…ler concurrent queue implementation" This reverts commit 33c1b14.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Target Jetty version(s)
9.4.x, 10.0.x, 11.0.x
Enhancement Description
All
ByteBufferPool
implementations useByteBufferPool.Bucket
s to trackByteBuffer
s. The current implementation ofBucket
stores buffers in aConcurrentLinkedDeque
, and callspoll()
to acquire a pooled buffer andofferFirst()
to release a buffer.This means that all the contention is done at the head of the queue for no particular reason. An easy way to reduce that contention would be to release buffers at the tail of the queue by calling
offer()
instead ofofferFirst()
, this way all the acquisition contention would happen at the head while all the releasing contention would happen at the tail, basically halving the contention.Replacing the
ConcurrentLinkedDeque
with aConcurrentLinkedQueue
could also improve performance an extra bit too.The text was updated successfully, but these errors were encountered: