tracker issue : CF-3586424

select a category, or use search below
(searches all categories and all time range)
Title:

gvInterval JVM args no longer work

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/NotThisProduct

Reporter/Name(from Bugbase): Bradley Wood / Bradley Wood (Bradley Wood)

Created: 06/27/2013

Components: Installation/Config

Versions: 10.0

Failure Type: Non Functioning

Found In Build/Fixed In Build: Final /

Priority/Frequency: Critical / All users will encounter

Locale/System: English / Win 2008 Server R2 64 bit

Vote Count: 0

Problem Description: In previous version of coldfusion, the JVM args -Dsun.rmi.dgc.client.gcInterval and
-Dsun.rmi.dgc.server.gcInterval could be used in jvm.config to increase the frequency of major garbage collections.  In ColdFusion 10, the setting appears to be ignored.  Collections appear to be happening once per hour-- possibly due to the org.apache.catalina.core.JreMemoryLeakPreventionListener listener.  This makes it more difficult to tune your JVM's GC settings.

Steps to Reproduce:
The following Java args should produce a major collection every 10 minutes, but they do not:

java.args=-server -Xms256m -Xmx512m -XX:MaxPermSize=192m -XX:+UseParallelGC -Dsun.rmi.dgc.client.gcInterval=60000 -Dsun.rmi.dgc.server.gcInterval=60000 -Xloggc:gc2.log -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=1024K -Xbatch -Dcoldfusion.home={application.home} -Djava.awt.headless=true -Dcoldfusion.rootDir={application.home} -Djava.security.policy={application.home}/lib/coldfusion.policy -Djava.security.auth.policy={application.home}/lib/neo_jaas.policy  -Dcoldfusion.classPath={application.home}/lib/updates,{application.home}/lib,{application.home}/lib/axis2,{application.home}/gateway/lib/,{application.home}/wwwroot/WEB-INF/cfform/jars,{application.home}/wwwroot/WEB-INF/flex/jars,{application.home}/lib/oosdk/lib,{application.home}/lib/oosdk/classes -Dcoldfusion.libPath={application.home}/lib -Dorg.apache.coyote.USE_CUSTOM_STATUS_MSG_IN_HEADER=true -Dcoldfusion.jsafe.defaultalgo=FIPS186Random

Actual Result:
Full GCs execute hourly, or only if the Perm Gen fills up to the point where a full GC is required.  (Confirmed with verbose GC logging)

Expected Result:
Regular full collections every 10 minutes.

Any Workarounds:
Create scheduled task on the server that runs on the interval you desire and executes the following two lines of code:
<cfset runtime = CreateObject("java","java.lang.Runtime").getRuntime()>
<cfset runtime.gc()>

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3586424

External Customer Info:
External Company:  
External Customer Name: bradwood.com
External Customer Email:  
External Test Config: My Hardware and Environment details:

Windows Server 2008 R2

ColdFusion Enterprise 10,0,10,284825

Tomcat: 7.0.23.0

Java: 1.7.0_21

Attachments:

Comments:

I'm wondering if this might be due to some of the modifications made to Tomcat for CF10.
Comment by External U.
15109 | June 27, 2013 10:25:18 AM GMT
I can't edit the bug and I just realized that the args I pasted in have a typo and are actually set to 1 minute (60000). Those should read: -Dsun.rmi.dgc.client.gcInterval=600000 -Dsun.rmi.dgc.server.gcInterval=600000
Comment by External U.
15110 | June 27, 2013 10:27:16 AM GMT
Also, a reminder to myself-- if/when Adobe replies to this bug I want to remember to update this question I started on ServerFault. Adobe, feel free to respond there as well :) http://serverfault.com/questions/518457/why-are-full-gcs-not-running-on-my-gcinterval-i-set
Comment by External U.
15111 | June 27, 2013 11:09:34 AM GMT
1. If a JVM argument is not working, ColdFusion is not in picture and it would not be a bug with CF. It would be the issue with JVM. 2. The system property is "sun.*" which is not a standard system property which the JVM is supposed to honour. If you really feel that JVM should honour this, please log it with Oracle. 3. The property is for RMI server and client and not for the JVM and therefore it would apply only if there is any RMI server/client is there in picture. ColdFusion does not use RMI and therefore this system property does not really apply.
Comment by Rupesh K.
15112 | June 28, 2013 04:24:58 AM GMT
Rupesh, why did these args work on previous versions of ColdFusion then?
Comment by External U.
15113 | June 28, 2013 09:53:16 AM GMT
Brad, in general, the JVM does not run the GC on a fixed regular interval. It is completely up to the JVM to decide when to run the full GC. In case of RMI, since the objects are exported and used by other VM, the garbage collection is distributed and hence the name dgc. Check out the following links to understand what DGC is http://publib.boulder.ibm.com/infocenter/javasdk/v5r0/index.jsp?topic=%2Fcom.ibm.java.doc.diagnostics.50%2Fdiag%2Funderstanding%2Frmi_dgc.html http://java.sys-con.com/node/35865 Because of its nature, DGC needs to have a frequency when GC can run so that the unused objects can get collected. Before JDK 1.6, this default interval was 60 sec and from JDK 1.6 onwards this has been increased to 1 hr by default. Now coming to why this setting is not working now, by defaulu the RMI server would not be running in Tomcat and therefore DGC is not running. With CF 9, the inbuilt server was JRun which is stack application server that of course would have a RMI server running.
Comment by Rupesh K.
15114 | June 28, 2013 12:00:54 PM GMT
Thanks for the followup, Rupesh. I understand that the JVM likes to make its own determination of when GC is necessary. I have still found that it can be helpful to force GC when tuning apps with certain memory usage patterns. It's too bad there isn't a generic JVM setting for it. For anyone reading this, Fusion Reactor 5 now has a plugin to schedule full GCs if you're interested. I haven't tried it yet, but it does exist.
Comment by External U.
15115 | September 25, 2013 10:08:58 AM GMT