I noticed that every young garbage collection with java 7 takes on average 10 more milliseconds than with java 6. I use 1.6.0_31 and 1.7.0_21 . The configuration has not changed; there are also no JVM hardware arguments:
-server -XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+TieredCompilation -XX:+AggressiveOpts -Xms1g -Xmx1g -XX:MaxNewSize=256m -XX:NewSize=256m
S0C S1C S0U S1U EC EU OC OU PC PU YGC YGCT FGC FGCT GCT
26176.0 26176.0 3531.6 0.0 209792.0 21648.8 786432.0 86777.6 49472.0 49350.1 82 1.830 0 0.000 1.
S0C S1C S0U S1U EC EU OC OU PC PU YGC YGCT FGC FGCT GCT
26176.0 26176.0 0.0 1210.5 209792.0 95873.4 786432.0 65327.1 35968.0 35891.2 83 0.620 0 0.000 0.620
I also looked at each individual time, and using java 6 each YGC takes ~ 10 ms versus java 7 is 20 ms. Has something changed between versions 6 and 7 that could explain this behavior?
EDIT: I noticed that java 7 runs in 64-bit mode, while java 6 uses a 32-bit JVM, can this explain the difference?
thanks
java garbage-collection java-7 java-6
punx120
source share