-
Couldn't load subscription status.
- Fork 2k
Upgrade to JDK 24, Netty 4.2 and Virtual Thread Experimental support #9800
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
Conversation
|
FYI @yawkat |
|
This is blocked by netty/netty@620794f |
|
Ok it seems netty/netty@620794f is not as harmfull as expected and we have some decent flamegraphs for this both with/without Loom - although we need to put some extra care while configure it because:
The current Loom test is disabling some of these features to avoid been bitten - but sadly the many atomic operations performed while setting the state and carrier in flamegraphs attached - for plaintext: |
|
Which atomic ops are which is related to https://github.com/openjdk/jdk/blob/jdk-24%2B36/src/java.base/share/classes/java/lang/VirtualThread.java#L1358 which is related to https://github.com/openjdk/jdk/blob/jdk-24%2B36/src/java.base/share/classes/java/lang/VirtualThread.java#L1381 which is related to https://github.com/openjdk/jdk/blob/jdk-24%2B36/src/java.base/share/classes/java/lang/VirtualThread.java#L1354 and others... This can be reproduced via franz1981/java-puzzles@7ae7468 quite easily |
|
FYI plaintext on my machine (with fewer connections/threads etc etc) reports without event loop carrier: which is indeed a clear signal of the overhead of allocating virtual threads with pipelining (i.e. in tight loops) |
|
It looks like the json test is not right with loom, by addding and that means that is not a good idea to use this json library, if not with some small adjustment. it looks like that disabling tracking virtual threads still hit a Flamegraph for the JSON endpoint: with event loop as a carrier: and without (i.e. no loom): |
|
@NateBrady23 ready to go ;) |
|
I am now @NateBrady23 - LGTM! |

This is both upgrading to Netty 4.2, unifying few existing code paths and introducing a novel "feature" for Netty
i.e. event loop as carriers for https://openjdk.org/jeps/444
The feature here is used in an highly opinionated way, ensuring that pipelining is still possible and effective.