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 January 2015

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

Get rid of your performance problems and memory leaks!

Back to newsletter 170 contents

I love the fascinating new items my newsletters teach or remind me. In this month's extracted tips from the linked articles I learned:

A note from this newsletter's sponsor

Get total visibility in just 15 minutes with AppDynamics PRO,
A performance monitoring tool for Java/.NET apps.
It installs in minutes. Start your FREE TRIAL today.

1. You can back any (ExecutorService) thread pool with a SynchronousQueue which makes it queueless (it only accepts a task if there is a free thread);

2. You can use AtomicIntegerFieldUpdater for lazily atomically updating volatiles (volatile++ is not atomic, AtomicIntegerFieldUpdater.getAndIncrement(object) is);

3. All Java 8 parallel streams across the JVM globally share the same thread pool by default - I can immediately see this is something that will cause contention issues in the future, so you should know it so it's easily diagnosed.

4. I've used the following statement every time I look at a heap dump, but funnily enough I've never seen it written down in this concise way: When there is a large difference in retained memory between a parent and child object, this is a good candidate for the holder of a memory leak.

5. Change the thread name to show the resources and data context it is operating in so that if you take a trace using jstack, you get the context as well as the operating stack - this makes diagnosing what it is doing much easier (you can keep changing the thread name, though it's probably not useful to change it too often).

6. Cancelling running tasks asynchronously is hard - you need to think about how that can happen if your task is in a non-interruptible call like using a resource (often that requires another thread closing that resource so that the task can exit the call and terminate).

Now on to all our usual sections: links to tools, articles, news, talks and as ever, all the extracted tips from all of this month's referenced articles including those gems above.

A note from this newsletter's sponsor : Deep dive Application Performance Monitoring
Fix performance issues with Java, .NET and Ruby platforms.
*** Monitor one app instance starting at $9 ***.


Java performance tuning related news.


Java performance tuning related tools.

A note from this newsletter's sponsor

New Relic - Try New Relic today and get your free Data Nerd shirt!
Free SaaS APM tool to monitor, troubleshoot, and tune apps
running on Websphere, Weblogic, Tomcat, Jetty, JBoss, Solr, Resin


Jack Shirazi

Back to newsletter 170 contents

Last Updated: 2022-11-29
Copyright © 2000-2022 All Rights Reserved.
All trademarks and registered trademarks appearing on are the property of their respective owners.
Java is a trademark or registered trademark of Oracle Corporation in the United States and other countries. is not connected to Oracle Corporation and is not sponsored by Oracle Corporation.
RSS Feed:
Trouble with this page? Please contact us