JVM setting changes when upgrading from 4.5 to 5.x


#1

I changed my setenv.sh to

CATALINA_OPTS="-Xms1024m -Xmx2048m -XX:MaxPermSize=1024m -javaagent:lib/lucee-inst.jar”;

But my Lucee 5.1.2.24 overview page shows me:

  • Non-heap: 1181mb available and 83mb in use
  • Heap: 380mb available and 120mb in use

via @djulianm on CFML Slack


In the Lucee Dockerfiles we update the Tomcat setenv.sh to pick up environment variables that allow you to modify the JVM settings when the container spins up.

A few important points…

PermGen

Perm size is no longer a thing since JDK8; just remove any reference to it.

Lucee Agent

Loading the lucee-inst.jar javaagent is no longer necessary and should be removed from your JVM arguments if you have it in place. (This could be in your Lucee dir at tomcat/bin/setenv.sh on *nix or tomcat/bin/service.bat on Windows.)
http://docs.lucee.org/guides/lucee-5/upgrading-lucee-45.html

The agent is gone in Lucee 5. You’ll need to remove -javaagent:lib/lucee-inst.jar and the JAR file.

Tomcat Startup

You definitely want the /dev/urandom reference to improve Tomcat start-up. Not entirely sure why it isn’t a default on all installations.

-Djava.security.egd=file:/dev/./urandom

h/t https://wiki.apache.org/tomcat/HowTo/FasterStartUp