Java Performance Tuning

Java(TM) - see bottom of page

|home |services |training |newsletter |tuning tips |tool reports |articles |resources |about us |site map |contact us |
Tools: | GC log analysers| Multi-tenancy tools| Books| SizeOf| Thread analysers| Heap dump analysers|

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 March 2024

JProfiler
Get rid of your performance problems and memory leaks!

Modern Garbage Collection Tuning
Shows tuning flow chart for GC tuning


Java Performance Training Courses
COURSES AVAILABLE NOW. We can provide training courses to handle all your Java performance needs

Java Performance Tuning, 2nd ed
The classic and most comprehensive book on tuning Java

Java Performance Tuning Newsletter
Your source of Java performance news. Subscribe now!
Enter email:


Training online
Threading Essentials course


JProfiler
Get rid of your performance problems and memory leaks!


Back to newsletter 280 contents

This month I have a guest, Ingo Kegel architect for JProfiler, telling us about how thread-local handshakes can give you near-zero overhead for full sampling without async! JProfiler uses this technique with Java 17+ so it's a practical useful technique. Although explained here in the context of JProfiler, it's a generally applicable technique. On to Ingo...

Global safepoints were traditionally required for sampling, but async sampling provided a more effective solution with reduced overhead and without safepoint bias. However, async sampling has many drawbacks, such as partial traces and reduced functionality because of the restrictive environment of an async handler. Thread-local handshakes allow performing actions on individual threads without stopping all threads at a global safepoint. This allows sampling which does not suffer from safepoint bias and has very low overhead.

Thread-local handshakes were first added in Java 10 with JEP 312. But it wasn't until Java 16, with JEP 376 (for improved ZGC efficiency in concurrent thread-stacks processing, together with other fixes) that a "mechanism by which other HotSpot subsystems can lazily process stacks" was added to the JVMTI. With this capability available, full sampling can now be comparable in overhead with async sampling. From Java 17 JProfiler supports both thread-local handshake sampling and async sampling. There is some remaining local safepoint bias, but it's irrelevant for the vast majority of applications given the frequency of local safepoints.

Now on to all the usual newsletter list of links, tips, tools, news and articles, and as usual I've extracted all the tips 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

Tools

Java performance tuning related tools

Articles

Jack Shirazi


Back to newsletter 280 contents


Last Updated: 2024-04-28
Copyright © 2000-2024 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/news280.shtml
RSS Feed: http://www.JavaPerformanceTuning.com/newsletters.rss
Trouble with this page? Please contact us