Every once in a while I run into someone that has a JVM that is running back to back collections and yet the heap is still almost full after each attempt! When they discover that their problem is related to the JVM not having enough memory they often ask the question, why didn't the JVM throw an OutOfMemoryError?
Just recently I was engaged to assist with an application that wasn’t behaving. The application, running in a 1.7.0_45 JVM, relied heavily on a 3rd party SAAS framework. That vendor provided my client with a list of 26 different JVM flags that should be set. When faced with this long list of flags I couldn’t resist asking why all the flags and why these flags. After all there are more than 700 product flags defined in the JVM and to be honest, I’ve only a vague idea of the effect may have on a runtime.
New JVM 7.0 flags to enable and configure GC log file rotation
One of the old bits of tuning advice given when Java memory management was not as tall as it it today was to set max heap to min heap. After all, we don't really want the JVM messing around with memory when it should really be getting on with things. Fast forward a few years and the adaptive memory management picture has matured considerably.
It’s after JavaONE and as promised, here is the answer to the performance puzzler with a stack trace.