Skip to main content
Legend
March 30, 2011
Question

JDK7 G1 Garbage Collector

  • March 30, 2011
  • 1 reply
  • 2695 views

Hi,

I notice JDK7 preview is available:

http://jdk7.java.net/

Have done a small amount of testing with Java 7 on CF9 and find encouraging results for application performance particularly with the new Generational One collector (not sure what the correct terminology is for that) -XX:+UseG1GC in place of the usual -XX:+UseParallelGC garbage collector. Don’t let the new collector scare you the ParallelGC we all use and love still works with Java 7.

Once JDK7 is installed, edit CF\runtime\bin\jvm.config (need I mention backup the original first?) eg:

java.home=C:\\Program Files\\Java\\jdk1.7.0\\jre

# Arguments to VM

java.args=-server  -Xmx512m -Dsun.io.useCanonCaches=false -XX:MaxPermSize=192m -XX:+UseG1GC

etc

For those interested my CFADMIN > System Information reports in part:

Server Details 

Server Product  ColdFusion 

Version  9,0,1,274733   

Edition  Developer   

Serial Number    

Operating System  Windows 7   

OS Version  6.1   

Update Level  /C:/ColdFusion9/lib/updates/chf9010001.jar   

Adobe Driver Version  4.0 (Build 0005)   

JVM Details 

Java Version  1.7.0-ea   

Java Vendor  Oracle Corporation   

Java Vendor URL  http://java.oracle.com/ 

Java Home  C:\Program Files\Java\jdk1.7.0\jre   

User Dir  C:\ColdFusion9\runtime\bin   

Java VM Specification Version  1.7   

Java VM Specification Vendor  Oracle Corporation   

Java VM Specification Name  Java Virtual Machine Specification   

Java VM Version  21.0-b05   

Java VM Vendor  Oracle Corporation   

Java VM Name  Java HotSpot(TM) Server VM   

Java Specification Version  1.7   

Java Specification Vendor  Oracle Corporation   

Java Specification Name  Java Platform API Specification   

Java Class Version  51.0   

Has anyone noticed something positive or negative with JDK7 and CF? Maybe I should add caveat - do not try this at home kids (on production CF servers).

Regards, Carl.

    This topic has been closed for replies.

    1 reply

    Legend
    March 30, 2011

    PS

    -XX+UseG1GC  = Garbage First garbage collector   - using correct terminology

    Sorry I missed that when I posted.

    Cheers, Carl.

    Legend
    July 12, 2011

    Hello,

    With Java 7 release pending at end of July thought I would bump this thread up again.

    Curious have you found any issues running CF 8 or 9 with java 7 1.7.0 preview available?

    Thanks again, Carl.

    Inspiring
    August 11, 2011

    I went to DL Java 7 and give it a go, but then I read this:

    http://www.lucidimagination.com/blog/2011/07/28/dont-use-java-7-for-anything/

    And decided I might wait until they get their more significant bugs ironed out before even considering it.

    Other than "well: because"  is there a compelling reason to upgrade?

    --

    Adam