A couple of days ago I upgraded one of our production environments from Java 7 to 8. All were tested before, so I took the challenge:
- Installation of Java 8
- Setting JAVA_HOME to new location
- Some work around RedHat JBoss EAP 6 middleware
- Restart of JBoss and Elasticsearch
Nice. JBoss and Elasticsearch started up. We're in production with Java 8!
After a couple of days CPU on production machines started to get exhausted by Java process. A heavy monitoring on JVM (using Jolokia) came up with a full JVM CodeCache. So the server started to compile just in time to serve requests.
CodeCache - if not set configured on JVM startup - comes with a default of 48 megabytes, which is too less for production environments. So a
-XX:ReservedCodeCacheSize=256M
helped to solve the problem. The new parameter was implemented in JBoss standalone.conf.bat. The CodeCache now levels around 60 megabytes.