GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Reuse existing allocators, enable experimental adaptive one and enable SSL heap pooling (Fixes #5168) by franz1981 · Pull Request #5262 · eclipse-vertx/vert.x

Conversation

@franz1981

@franz1981 franz1981 commented Jul 30, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Fixes #5168

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
This was referenced Jul 30, 2024
Vertx pooled allocator should be the same as Netty #5168
Closed
Support experimental Netty adaptive allocator quarkusio/quarkus#40934
Closed
@franz1981
franz1981 force-pushed the 4.x_better_pools branch from 44354d0 to 4265ae0 Compare July 30, 2024 13:35
@franz1981 franz1981 mentioned this pull request Jul 30, 2024
Enabling SSL can double RSS due to Netty off-heap arenas quarkusio/quarkus#42224
Closed
@franz1981

franz1981 commented Jul 30, 2024

Copy link
Copy Markdown
Contributor Author

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@zekronium

zekronium commented Jul 30, 2024

Copy link
Copy Markdown
Contributor

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@franz1981

franz1981 commented Jul 31, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

@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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@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

franz1981 commented Jul 31, 2024

Copy link
Copy Markdown
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)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@franz1981 franz1981 mentioned this pull request Jul 31, 2024
Expose OpenSSL engine settings quarkusio/quarkus#41880
Open
vietj
vietj reviewed Jul 31, 2024
View reviewed changes
Comment thread src/main/java/io/vertx/core/net/TCPSSLOptions.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

vietj
vietj reviewed Jul 31, 2024
View reviewed changes
Comment thread src/main/java/io/vertx/core/buffer/impl/VertxByteBufAllocator.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

vietj
vietj reviewed Jul 31, 2024
View reviewed changes
Comment thread src/main/java/io/vertx/core/buffer/impl/VertxByteBufAllocator.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

vietj
vietj reviewed Jul 31, 2024
View reviewed changes
Comment thread src/main/java/io/vertx/core/buffer/impl/VertxByteBufAllocator.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

@franz1981
franz1981 force-pushed the 4.x_better_pools branch from 0a7ad40 to ba8c032 Compare August 28, 2024 21:27
@franz1981

franz1981 commented Aug 28, 2024

Copy link
Copy Markdown
Contributor Author

PTAL @vietj

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

vietj
vietj reviewed Aug 28, 2024
View reviewed changes
Comment thread src/main/java/io/vertx/core/net/SSLEngineOptions.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

@franz1981 franz1981 mentioned this pull request Aug 29, 2024
AdaptiveByteBufAllocator may be memory leak netty/netty#14269
Closed
@franz1981

franz1981 commented Aug 29, 2024

Copy link
Copy Markdown
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...

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@franz1981
franz1981 force-pushed the 4.x_better_pools branch from ba8c032 to 094f68d Compare August 29, 2024 15:45
@franz1981
Reuse existing allocators, enable experimental adaptive one, enable h…
afafb7a
…eap JDK SSL heap buffer pooling (Fixes eclipse-vertx#5168)
@franz1981
franz1981 force-pushed the 4.x_better_pools branch from 094f68d to afafb7a Compare August 29, 2024 16:08
@franz1981

franz1981 commented Sep 1, 2024

Copy link
Copy Markdown
Contributor Author

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@franz1981 franz1981 closed this Sep 1, 2024
@franz1981 franz1981 mentioned this pull request Sep 1, 2024
Try reuse existing Netty pooled allocator singleton (Fixes #5168) #5292
Closed
@franz1981 franz1981 mentioned this pull request Nov 24, 2025
Severe throughput regression after upgrading Netty from 4.1.124.Final to 4.1.125.Final netty/netty#15852
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@vietj vietj vietj left review comments
+1 more reviewer
@zekronium zekronium zekronium left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@franz1981 @zekronium @vietj
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.