Java Performance Tuning
Java(TM) - see bottom of page
Our valued sponsors who help make this site possible
JProfiler: Get rid of your performance problems and memory leaks!
Training online: Concurrency, Threading, GC, Advanced Java and more ...
News February 2025
JProfiler
|
Get rid of your performance problems and memory leaks!
|
JProfiler
|
Get rid of your performance problems and memory leaks!
|
|
|
Back to newsletter 291 contents
As usual before a Java release, I'm listing all the new performance features in the upcoming release, this time for Java 24 (I have done this every 6 months, prior to each new release, you can track back to the previous February and August newsletters if you want to see what's new performance-wise in any particular release). Each time I give the new features, the performance benefits from each feature, and how to use the feature.
Java 24 has one important performance improvement. Finally synchronization no longer pins carrier threads, meaning that highly scaled virtual threads no longer need to have workarounds for synchronized blocks and methods. There remain two cases where carrier threads can effectively be pinned: native calls, and file IO. Apart from that, Java 24 has one other interesting performance change: ahead-of-time class loading and linking, which is the next stage of startup time improvement beyond application class data sharing. There are other less interesting changes, all detailed in this newsletter.
Now on to the details of those Java 24 changes, including the options you have available to use them. And of course the tips from this month's articles, as ever are extracted into this month's tips page.
A note from this newsletter's sponsor
JProfiler
Get rid of your performance problems and memory leaks!
News
Java performance tuning related news - Java 24 performance changes
- JEP-475 Although the title "Late Barrier Expansion for G1" seems like it's about changing something in G1, this is actually reducing additional overheads that G1 places on the C2 compiler - so JITC will be faster than it was when you are also using G1 GC
- JEP-483 Ahead-of-Time class loading & linking - a startup speed optimization with new -XX:AOTMode and -XX:AOTCache options to store and use classes letting the JVM skip reading, parsing, loading, and linking them (doesn't let you skip JIT compilation - that is separate). Essentially the next step in CDS
- JEP-484 Class File API - a standard API for parsing, generating, and transforming Java class files
- JEP-490 ZGC: Remove the non-generational mode. Because non-generational GC is almost always worse
- JEP-491 Synchronize virtual threads without pinning. This took forever, but is finally here. You no longer need to try and migrate synchronized blocks and methods to use locks
- JEP-493 Linking runtime images without JMODs. Gives smaller images from jlink in some scenarios
- JEP-498 Warn upon use of memory-access methods in sun.misc.Unsafe
- JDK-8337199 Two new jcmd commands Thread.vthread_scheduler and Thread.vthread_pollers
- JDK-8344882 Memory used by internal temporary direct buffers is no longer limited - no longer included in MaxDirectMemorySize
- JDK-8286851 Options -verbosegc, -noclassgc, -verify, -verifyremote, -ss, -ms and -mx are deprecated. Old->new: -verbosegc -> -verbose:gc, -noclassgc -> -Xnoclassgc, -verify -> -Xverify:all, -verifyremote -> -Xverify:remote, -ss -> -Xss, -ms -> -Xms, -mx -> -Xmx
- JEP-499 Structured Concurrency (Fourth Preview). Simplify concurrent programming by grouping related tasks running in different threads
- JEP-404 Generational Shenandoah (Experimental). Generational GC comes to all GCs eventually. Enable with -XX:+UnlockExperimentalVMOptions -XX:ShenandoahGCMode=generational
- JEP-450 Compact Object Headers (Experimental). Smaller is better if it works for your deployment -XX:+UnlockExperimentalVMOptions -XX:+UseCompactObjectHeaders
- JEP-487 Scoped Values (Fourth Preview). More efficient than thread-local variables, especially with large numbers of virtual threads
- JEP-489 Vector API (Ninth Incubator). Vector computations that reliably compile at runtime to optimal vector hardware instructions. Useful for ML, image processing, scientific processing, massive financial calculations, etc
- JEP-488 Primitive types in patterns, instanceof, and switch (Second Preview). Unlikely to provide any significant performance improvement (fair enough as that's not the motivation)
Tools
Java performance tuning related tools
Articles
Jack Shirazi
Back to newsletter 291 contents
Last Updated: 2025-02-25
Copyright © 2000-2025 Fasterj.com. All Rights Reserved.
All trademarks and registered trademarks appearing on JavaPerformanceTuning.com are the property of their respective owners.
Java is a trademark or registered trademark of Oracle Corporation in the United States and other countries. JavaPerformanceTuning.com is not connected to Oracle Corporation and is not sponsored by Oracle Corporation.
URL: http://www.JavaPerformanceTuning.com/news/news291.shtml
RSS Feed: http://www.JavaPerformanceTuning.com/newsletters.rss
Trouble with this page? Please contact us