Almost everyone eventually runs into GC issues with Java.
Is there a cookbook guide or semi-automated tool to tune GC for Java?
My rationale is this:
- Almost anyone eventually has these problems
- There are many possible factors (say 20) out of which only a few affect your problem.
- Most people don’t know how to identify the key factors so GC tuning is more like a black art than a science.
- Not everyone uses a HotSpot VM. Different Sun versions have different GC characteristics.
- There is little incentive to experiment (like run the VM with slightly different settings every day to see how they play out).
So the question really is: Is there something that I can use in a check-list manner? Or maybe even a tool that analyzes GC logs or heap dumps and gives me specific hints where to look (instead of telling me “95% of the data is allocated in objects of the type byte[]” which is basically useless).
Related questions:
- Appropriate Tomcat 5.5 start-up parameters to tune JVM for extremely high demand, large heap web application? which is very specific. My question is more wide.
- What are the best garbage collection settings for client side? Again very narrow scope
- Does anyone know of a good guide to configure GC in Java? HotSpot only
- JVM memory management & garbage collection book? is 80% there but I’m missing the checklist/cookbook/for-dummies approach.
References for various GC information:
Oracle
Tuning Garbage Collection with the 5.0 Java[tm] Virtual Machine
and this also
Java SE 6 HotSpot[tm] Virtual Machine Garbage Collection Tuning
IBM
Fine Tuning Garbage Collection [link dead]
Extensible Verbose Toolkit
SAP JVM
Memory Management (Garbage Collection)
Detecting Memory Leaks
Detecting Hanging / Looping VMs
Analyzing Out-of-Memory Situations
Sorry I don’t know much about SAP but have provided some things I have found.
As for a cookbook, tuning is most likely application specific at this level, but it is an interesting topic.
ADDENDUM
You also mentioned analysis tools. Some candidates are listed here:
Know of any Java garbage collection log analysis tools?