CF10 with Java 8

Guide ,
Sep 11, 2013 Sep 11, 2013

Copy link to clipboard

Copied

Hello,

Has anyone else tried to use CF with Java 8 preview? If you have tried Java 8 preview have you noticed anything interesting?

Something to share. Java 8 uses memory differently to Java 7 or 6 (reminder Java 6 is EOL). The non heap memory Permanent generation has been done away with and is now consumed in a new memory space called Metaspace. I guess that will mean CF folks will not see the dreaded “java.lang.OutOfMemoryError: PermGen space” in coldfusion-out.log anymore.


For interested readers here is my CF10 Summary part:

Server Settings > Settings Summary

System Information  
 
Server Product  ColdFusion 
Version  ColdFusion 10,284825 
Operating System  Windows 7   
OS Version  6.1   
Update Level  /C:/ColdFusion10/cfusion/lib/updates/chf10000010.jar   
Adobe Driver Version  4.1 (Build 0001)   

JVM Details

 

Java Version  1.8.0-ea   
Java Vendor  Oracle Corporation   
Java Vendor URL  http://java.oracle.com/   
Java Home  C:\Program Files\Java\jdk1.8.0\jre   
Java File Encoding  Cp1252   
Java Default Locale  en_AU   
User Dir  C:\ColdFusion10\cfusion\bin   
Java VM Specification Version  1.8   
Java VM Specification Vendor  Oracle Corporation   
Java VM Specification Name  Java Virtual Machine Specification   
Java VM Version  25.0-b48   
Java VM Vendor  Oracle Corporation   
Java VM Name  Java HotSpot(TM) Server VM   
Java Specification Version  1.8   
Java Specification Vendor  Oracle Corporation   
Java Specification Name  Java Platform API Specification   
Java Class Version  52.0   

For those more curious about Java memory heap, non heap spaces and garbage collection here is a portion of CF10 verbose Java 8 log:


{Heap before GC invocations=25 (full 11):
PSYoungGen      total 116736K, used 58624K [0x25840000, 0x30300000, 0x30300000)
  eden space 58624K, 100% used [0x25840000,0x29180000,0x29180000)
  from space 58112K, 0% used [0x2ca40000,0x2ca40000,0x30300000)
  to   space 58112K, 0% used [0x29180000,0x29180000,0x2ca40000)
ParOldGen       total 349440K, used 349401K [0x10300000, 0x25840000, 0x25840000)
  object space 349440K, 99% used [0x10300000,0x258364e0,0x25840000)
Metaspace total 39432K, used 38121K, reserved 11104K
  data space     39432K, used 38121K, reserved 11104K
545.052: [Full GC (Ergonomics) [PSYoungGen: 58624K->0K(116736K)] [ParOldGen: 349401K->38999K(276992K)] 408025K->38999K(393728K), [Metaspace: 38121K->38111K(11104K)], 0.2856262 secs] [Times: user=0.45 sys=0.00, real=0.29 secs]
Heap after GC invocations=25 (full 11):
PSYoungGen      total 116736K, used 0K [0x25840000, 0x30300000, 0x30300000)
  eden space 58624K, 0% used [0x25840000,0x25840000,0x29180000)
  from space 58112K, 0% used [0x2ca40000,0x2ca40000,0x30300000)
  to   space 58112K, 0% used [0x29180000,0x29180000,0x2ca40000)
ParOldGen       total 276992K, used 38999K [0x10300000, 0x21180000, 0x25840000)
  object space 276992K, 14% used [0x10300000,0x12915c00,0x21180000)
Metaspace total 39418K, used 38111K, reserved 11104K
  data space     39418K, used 38111K, reserved 11104K
}

To have something to compare switching CF10 back to Java 7 with no other JVM alterations verbose log portion for similar usage says:

{Heap before GC invocations=24 (full 9):
PSYoungGen      total 116480K, used 65026K [0x1d360000, 0x27e00000, 0x27e00000)
  eden space 58240K, 100% used [0x1d360000,0x20c40000,0x20c40000)
  from space 58240K, 11% used [0x24520000,0x24bc09b8,0x27e00000)
  to   space 58240K, 0% used [0x20c40000,0x20c40000,0x24520000)
PSOldGen        total 205184K, used 35647K [0x07e00000, 0x14660000, 0x1d360000)
  object space 205184K, 17% used [0x07e00000,0x0a0cfc90,0x14660000)
PSPermGen       total 58880K, used 45819K [0x03e00000, 0x07780000, 0x07e00000)
  object space 58880K, 77% used [0x03e00000,0x06abec70,0x07780000)
530.568: [GC [PSYoungGen: 65026K->5223K(116480K)] 100673K->45573K(321664K), 0.0220773 secs] [Times: user=0.05 sys=0.00, real=0.02 secs]
Heap after GC invocations=24 (full 9):
PSYoungGen      total 116480K, used 5223K [0x1d360000, 0x27e00000, 0x27e00000)
  eden space 58240K, 0% used [0x1d360000,0x1d360000,0x20c40000)
  from space 58240K, 8% used [0x20c40000,0x21159d78,0x24520000)
  to   space 58240K, 0% used [0x24520000,0x24520000,0x27e00000)
PSOldGen        total 205184K, used 40350K [0x07e00000, 0x14660000, 0x1d360000)
  object space 205184K, 19% used [0x07e00000,0x0a567a60,0x14660000)
PSPermGen       total 58880K, used 45819K [0x03e00000, 0x07780000, 0x07e00000)
  object space 58880K, 77% used [0x03e00000,0x06abec70,0x07780000)
}

I should add Java 8 is preview and not officially support by Adobe CF so do not install it on your CF production or any environment that you rely on.

Java 8 release is expected March 2014. That might seem a long way off but like the previous Java 7 release can creep up on you rather quickly.

Regards, Carl.


Views

4.4K

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Guide , Oct 26, 2014 Oct 26, 2014
Thanks Adobe CF team; Java 8 support available:ColdFusion 10 support with Java 8 — Adobe ColdFusion BlogRegards, Carl.

Likes

Translate

Translate
Guide ,
Feb 02, 2014 Feb 02, 2014

Copy link to clipboard

Copied

With Java 8 release pending next month I thought I would edit this post. When will CF10 be officially supported on Java 1.8? 

Thanks, Carl.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Aug 18, 2014 Aug 18, 2014

Copy link to clipboard

Copied

Just received an email from FusionReactor announcing support for Java 8.  Does anybody know the status of official CF10 support for Java 1.8 ?

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 18, 2014 Aug 18, 2014

Copy link to clipboard

Copied

I'm also interested to know if CF10/11 will be patched to officially support Java 8.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Aug 18, 2014 Aug 18, 2014

Copy link to clipboard

Copied

I have been using CF11 with Java 8 in development environments.

About ColdFusion > System Information  

Server Product  ColdFusion 
Version  11,0,0,289822 
Tomcat Version  7.0.52.0 
Adobe Driver Version  5.1.1 (Build 0001)   
JVM Details 
Java Version  1.8.0_11   
Java Vendor  Oracle Corporation   
Java Vendor URL  http://java.oracle.com/ 
Java Home  C:\Program Files\Java\jdk1.8.0_11\jre  

Regards, Carl.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Aug 19, 2014 Aug 19, 2014

Copy link to clipboard

Copied

It is worth noting although Java 8 does not consume PermGen memory space since it is using Metaspace

you can have PermGen defined in your JVM Arguments EG -XX:MaxPermSize=192m. Java 8 will notice that as a syntax error and ignore it rather than not start ColdFusion (Java).

Cheers, Carl.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Oct 26, 2014 Oct 26, 2014

Copy link to clipboard

Copied

Thanks Adobe CF team; Java 8 support available:

ColdFusion 10 support with Java 8 — Adobe ColdFusion Blog

Regards, Carl.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Apr 07, 2015 Apr 07, 2015

Copy link to clipboard

Copied

In a recently new install of CF11 with Java 8 we're experiencing many Metaspace errors.  Do you have any insights?

See my post here:

HTTP Error 500.0 - Metaspace

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Apr 07, 2015 Apr 07, 2015

Copy link to clipboard

Copied

The fix might be in your jvm.config. Please share the same.

Regards,

Anit Kumar

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Apr 07, 2015 Apr 07, 2015

Copy link to clipboard

Copied

JVM Config (with recently increased Metaspacesize)

Our servers all have 8GB RAM.

#

# VM configuration

#

# Where to find JVM, if {java.home}/jre exists then that JVM is used

# if not then it must be the path to the JRE itself

java.home=C:\\ColdFusion11\\jre

#

# If no java.home is specified a VM is located by looking in these places in this

# order:

#

#  1) ../runtime/jre

#  2) registry (windows only)

#  3) JAVA_HOME env var plus jre (ie $JAVA_HOME/jre)

#  4) java.exe in path

#

# Arguments to VM

java.args=-server  -Xms1024m -Xmx4096m -XX:MaxMetaspaceSize=1024m -XX:+UseParallelGC -Xbatch -Dcoldfusion.home={application.home} -Duser.language=en -Dcoldfusion.rootDir={application.home} -Dcoldfusion.libPath={application.home}/lib -Dorg.apache.coyote.USE_CUSTOM_STATUS_MSG_IN_HEADER=true -Dcoldfusion.jsafe.defaultalgo=FIPS186Random -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.JavaUtilLog -Dcoldfusion.classPath={application.home}/lib/updates,{application.home}/lib,{application.home}/lib/axis2,{application.home}/gateway/lib/,{application.home}/wwwroot/WEB-INF/flex/jars,{application.home}/wwwroot/WEB-INF/cfform/jars,C:\\ColdFusion11\\cfusion\\customjars

# Comma separated list of shared library path

java.library.path={application.home}/lib,{application.home}/jintegra/bin,{application.home}/jintegra/bin/international,{application.home}/lib/oosdk/classes/win

# Comma separated list of shared library path for non-windows

java.nixlibrary.path={application.home}/lib

java.class.path={application.home}/lib/oosdk/lib,{application.home}/lib/oosdk/classes

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Apr 07, 2015 Apr 07, 2015

Copy link to clipboard

Copied

LATEST

Rule of thumb I have noticed - if you know some values for PermGen with Java 7 that work well for your environment use those as a starting point for MetaSpace. EG:
-XX:PermSize=312m -XX:MaxPermSize=512m Java 7
-XX:MetaspaceSize=312m -XX:MaxMetaspaceSize=512m Java 8

One can do well to assign a value for initial setting to MetaSpace. See above example.

Perhaps related, how much memory is being consumed by Compressed Class Space? JMX monitoring with JDK tools like JMC or Jconsole might be helpful to check plus will also show MetaSpace use along with garbage collection information.

HTH, Carl.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines