Related question: Garbage collector usage when upgrade from Java 6 + Tomcat 6 to Java 8 + Tomcat 8
I have a set of webapps, compiled with Java 8. If I run them in Tomcat 8, I get a lot of minor GC collections with a random memory allocation. In Tomcat 6 memory allocation is more linear and stable (idle in both cases, no traffic).
Eden Space Tomcat 8:
Eden Space Tomcat 6:
Do you know why that happens?
EDIT 1:
These are the data from production environment with jdk 1.8 and Tomcat 8. CPU is really high almost always due to GC cycles. Any comments about that?
EDIT 2:
This is a heapdump analisis (1.8GB dump):