Aug
4
2008
Sun JVM 1.6 Heap Memory Behavior with ColdFusion Frameworks
Posted by Mike Brunt at 7:29 AM
10 comments - Categories:
ColdFusion | JRun-J2EE
There is another behavioral difference in the 1.6 JVM which is important to note. We found that in all previous JVM's there was a default behavior which ran explicit Full Garbage Collections (Full GC's) every 60 seconds. It appears this is part of the Remote Method Invocation (RMI) mechanism. As Full GC's cause the JVM to pause completely (know as stop-the-world events) too many Full GC's is not a good thing. So in the 1.6 JVM it appears that this Full GC behavior is no longer there, which is a better thing. However and as I mentioned above, we have several clients using ModelGlue/Mach-ii-ColdSpring-Reactor/Transfer and in that case we have observed memory problems which often resulted in the heap running out of memory. Whatever default Full GC behavior in is the 1.6 JVM it appears inadequate for some CF applications. Through endurance load testing (up to 12 hours) we have found that causing explicit Full GC's every 10 minutes is an optimal setting. To enable this you need to add these two arguments to the JVM arguments in the jvm.config file located either in {drive-letter}\ColdFusion8\runitime\bin or {drive-letter}\JRun4\bin, depending on your install:
-Dsun.rmi.dgc.client.gcInterval=600000 -Dsun.rmi.dgc.server.gcInterval=600000
This will run explicit Full GC's every 10 minutes. Considering what we have found we strongly advise that you do not disable explicit Full GC's and if you have done so we suggest you replace that with the arguments shown here. All instances will need to be restarted after adding these arguments.
Nathan Mische wrote on 08/04/08 8:26 AM
Thanks for sharing your findings.