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
Use RetainableByteBuffer and write a new pool for it #6332
Use RetainableByteBuffer and write a new pool for it #6332
Conversation
996def2
to
6119f2f
Compare
I've also modified |
e7e3ad0
to
5fc4f51
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some initial feedback. More review needed.
jetty-io/src/main/java/org/eclipse/jetty/io/AdapterMemoryPool.java
Outdated
Show resolved
Hide resolved
jetty-io/src/main/java/org/eclipse/jetty/io/RetainableByteBufferPool.java
Outdated
Show resolved
Hide resolved
jetty-server/src/main/java/org/eclipse/jetty/server/AbstractConnector.java
Outdated
Show resolved
Hide resolved
jetty-io/src/main/java/org/eclipse/jetty/io/AdapterMemoryPool.java
Outdated
Show resolved
Hide resolved
jetty-io/src/main/java/org/eclipse/jetty/io/ssl/SslConnection.java
Outdated
Show resolved
Hide resolved
jetty-io/src/main/java/org/eclipse/jetty/io/AdapterMemoryPool.java
Outdated
Show resolved
Hide resolved
jetty-io/src/main/java/org/eclipse/jetty/io/DefaultRetainableByteBufferPool.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's get this in early during the next release cycle!
Looking back, I just noticed that I'm going to work on this right away to make sure this PR is not removing any existing functionality. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix what ludo said
jetty-http2/http2-common/src/main/java/org/eclipse/jetty/http2/HTTP2Connection.java
Show resolved
Hide resolved
jetty-io/src/main/java/org/eclipse/jetty/io/DefaultRetainableByteBufferPool.java
Outdated
Show resolved
Hide resolved
jetty-io/src/main/java/org/eclipse/jetty/io/RetainableByteBufferPool.java
Outdated
Show resolved
Hide resolved
jetty-io/src/test/java/org/eclipse/jetty/io/DefaultRetainableByteBufferPoolTest.java
Outdated
Show resolved
Hide resolved
jetty-io/src/test/java/org/eclipse/jetty/io/DefaultRetainableByteBufferPoolTest.java
Outdated
Show resolved
Hide resolved
jetty-server/src/main/java/org/eclipse/jetty/server/HttpConnection.java
Outdated
Show resolved
Hide resolved
jetty-server/src/main/java/org/eclipse/jetty/server/HttpConnection.java
Outdated
Show resolved
Hide resolved
jetty-io/src/main/java/org/eclipse/jetty/io/RetainableByteBuffer.java
Outdated
Show resolved
Hide resolved
jetty-io/src/main/java/org/eclipse/jetty/io/DefaultRetainableByteBufferPool.java
Outdated
Show resolved
Hide resolved
jetty-io/src/main/java/org/eclipse/jetty/io/DefaultRetainableByteBufferPool.java
Outdated
Show resolved
Hide resolved
jetty-server/src/main/java/org/eclipse/jetty/server/HttpConnection.java
Outdated
Show resolved
Hide resolved
jetty-io/src/main/java/org/eclipse/jetty/io/RetainableByteBuffer.java
Outdated
Show resolved
Hide resolved
jetty-io/src/main/java/org/eclipse/jetty/io/RetainableByteBuffer.java
Outdated
Show resolved
Hide resolved
jetty-server/src/main/java/org/eclipse/jetty/server/HttpConnection.java
Outdated
Show resolved
Hide resolved
jetty-io/src/main/java/org/eclipse/jetty/io/RetainableByteBuffer.java
Outdated
Show resolved
Hide resolved
jetty-io/src/main/java/org/eclipse/jetty/io/RetainableByteBuffer.java
Outdated
Show resolved
Hide resolved
jetty-io/src/main/java/org/eclipse/jetty/io/RetainableByteBuffer.java
Outdated
Show resolved
Hide resolved
jetty-io/src/main/java/org/eclipse/jetty/io/DefaultRetainableByteBufferPool.java
Outdated
Show resolved
Hide resolved
jetty-io/src/main/java/org/eclipse/jetty/io/DefaultRetainableByteBufferPool.java
Outdated
Show resolved
Hide resolved
jetty-io/src/main/java/org/eclipse/jetty/io/DefaultRetainableByteBufferPool.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good.
However, I'd still like to see an alternate version (or perhaps an extension) where the bucket sizes are non-linear. Instead of buckets for 1k, 2k, 3k, 4k....64k I think log buckets could be lot more efficient at avoiding lots of unused buckets. So the bucket sizes should be 1k, 2k, 4k, 8k,16k,32k,64k.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider change from #6513
This PR still needs to be rebased and have its history rewritten. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My PR isn't yet ready, so let's not hold this one up.
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
410d402
to
cfc0a9b
Compare
don't wait for my PR to merge |
Fix #6322
HttpConnection
can be modified to make use ofRetainableByteBuffer
with little effort, which indeed allows the use of a much more efficient pool type.With the above change in place, we can make use of
o.e.j.u.Pool
to create aRetainableByteBuffer
pool for all input buffer needs as that design does bring a significant perf improvement.