Hi,
I have the following problem. I run Tomcat 8 with Oracle Java 8 and put it under some HTTP load (JMeter). Then I run the same configuration, same load and everything, but start Tomcat with -javaagent: and my instrumentation agent. In both cases I gather java stats with jstat in 1 second intervals. I calculate Java Heap as S0U+S1U+EU+OU. The first run (42 minutes load) shows me an average 780.84 MB (min 96.11 MB, max 1516.21 MB), the second run 600.60 MB (min 93.48 MB, max 1301.75 MB).
Is it possible that an instrumented code needs less memory, or am I reading the metrics wrong / am I missing something?
If I run the same scenario on Weblogic + Java 6, everything works as expected (instrumented code uses more memory).
Thank you for your help.