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

Reuse existing allocators, enable experimental adaptive one and enable SSL heap pooling (Fixes #5168) #5262

Closed
wants to merge 1 commit into from

Conversation

franz1981
Copy link
Contributor

@franz1981 franz1981 commented Jul 30, 2024

Fixes #5168

@franz1981
Copy link
Contributor Author

@He-Pin do you think this could be useful to use to try the adaptive pool with vertx?

@zekronium
Copy link
Contributor

@franz1981 Why is the heap buffer not pooled, shouldn't it be a almost free lunch in performance?

@franz1981
Copy link
Contributor Author

franz1981 commented Jul 31, 2024

@zekronium

Why is the heap buffer not pooled

IDK I would love to know it from @vietj

probably there's some historical reason for that but I would like to know it.

@franz1981 franz1981 changed the title Reuse existing allocators and enable experimental adaptive one (Fixes #5168) Reuse existing allocators, enable experimental adaptive one and enable SSL heap pooling (Fixes #5168) Jul 31, 2024
@franz1981
Copy link
Contributor Author

@vietj this is adding the option to enable heap pooling when SSL is enable, which can be a saviour with JDK SSL, see quarkusio/quarkus#41880 (comment)

@franz1981
Copy link
Contributor Author

PTAL @vietj

@franz1981
Copy link
Contributor Author

Not good @vietj

Starting test: ClusteredEventBusWithSSLTest#testSendCharacter 
[vert.x-eventloop-thread-1] WARN io.netty.util.concurrent.AbstractEventExecutor - A task raised an exception. Task: io.vertx.core.impl.future.FutureBase$$Lambda/0x00007f59dc23dcd0@54c5bbbf
java.lang.NullPointerException: Cannot invoke "io.vertx.core.net.SSLEngineOptions.usePooledHeapBuffers()" because "this.sslEngineOptions" is null
	at io.vertx.core.net.impl.SSLHelper.preferredNettyAllocatorWith(SSLHelper.java:141)
	at io.vertx.core.net.impl.TCPServerBase.lambda$listen$4(TCPServerBase.java:243)
	at io.vertx.core.impl.future.FutureImpl$4.onSuccess(FutureImpl.java:176)
	at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:66)
	at io.vertx.core.impl.future.FutureImpl.tryComplete(FutureImpl.java:259)
	at io.vertx.core.impl.future.Mapping.onSuccess(Mapping.java:40)
	at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:66)
	at io.vertx.core.impl.future.FutureImpl.tryComplete(FutureImpl.java:259)
	at io.vertx.core.impl.future.Mapping.onSuccess(Mapping.java:40)
	at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:66)
	at io.vertx.core.impl.future.FutureImpl.tryComplete(FutureImpl.java:259)
	at io.vertx.core.impl.future.Mapping.onSuccess(Mapping.java:40)
	at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:66)
	at io.vertx.core.impl.future.FutureImpl.tryComplete(FutureImpl.java:259)
	at io.vertx.core.impl.future.PromiseImpl.onSuccess(PromiseImpl.java:49)
	at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:66)
	at io.vertx.core.impl.future.FutureImpl.tryComplete(FutureImpl.java:259)
	at io.vertx.core.impl.future.Composition$1.onSuccess(Composition.java:62)
	at io.vertx.core.impl.future.FutureBase.lambda$emitSuccess$0(FutureBase.java:60)
	at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:173)
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:166)
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:469)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569)
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:994)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:1583)

not sure the engine options is the right place for that configuration flag...let's see what I can do here...

@franz1981
Copy link
Contributor Author

I've decided to split in 3 separate PRs this effort, to make it easier to integrate (and test)!

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