Longer Young Collections with JDK7 as Compared to JDK6

If you have moved from JDK 6 to 7 and are observing some increase in the times that young collections take to do their job, then here's a remedy: -XX:+JavaObjectsInPerm.

In JDK7, class statics and interned strings were moved from PermGen to the Java Heap and that may contribute towards a little increase in the young generation collection times. There is an option JavaObjectsInPerm which when enabled reverts that change i.e. class statics and interned strings get allocated back into the PermGen.

So, if tuning PermGen is not an issue and young gen collection times are bothering you then using -XX:+JavaObjectsInPerm might give some relief. Note that this option is available in jdk7 from 7u80 and was made available as a Diagnostic VM option with this CR: JDK-8048271

Since it is a diagnostic option, it needs to be used with -XX:+UnlockDiagnosticVMOptions.

Please note that this option is not available in JDK8 since PermGen has been completely removed in JDK8. Some more details on the PermGen removal can be read here.

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

I share my work experiences as a JVM Sustaining Engineer through this blog

Search


Categories
Archives
« February 2017
SunMonTueWedThuFriSat
   
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
17
18
19
20
21
22
23
24
25
26
27
28
    
       
Today