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

change ByteBuffer allocation/de-allocation to pool based #120

Closed
wants to merge 0 commits into from

Conversation

heyuanliu-intel
Copy link

Fix the ByteBuffer allocation/de-allocation performance bottleneck.

Please refer to #119

Please refer to this project: https://github.com/heyuanliu-intel/ByteBufferPerformance
Based on the pool based allocation/de-allocation, we can get 4X performance improvement for the Airlift benchmarking.

@stuartwdouglas
Copy link
Contributor

This approach needs to be pluggable, this pattern can result in non-trivial memory leaks if the engine is used by short lived threads. Wildfly/EAP already have their own buffer pools as well, and it would be better to re-use these if they are sized correctly.

@heyuanliu-intel
Copy link
Author

So we can make the pool shared by all the threads instead of thread local object to avoid memory leaks issue for short lived threads.

If Wildfly already have the buffer pools. Could anyone help to integrate it to Wildfly-OpenSSL to fixing the performance bottleneck issue ?

@tristantarrant
Copy link
Contributor

Maybe it should also use a ConcurrentSkipListMap to avoid the synchronized usage.

@heyuanliu-intel
Copy link
Author

Reuse the wildfly-openssl provided DefaultByteBufferPool to rewrite the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants