I have a recurring situation where the JVM is subjected to a heavy GC load. When I request JVM statistics with jmap -heap, I get the information below (this is from Oracle JDK 1.7.0_25 from linux)
Please note that although he says it MaxPermSizeis 256 m, he also says that PermGen sits at 136 MB, but with a capacity of 99.9%.
This may explain the failure of the GC, but my question is, why does the JVM not extend PermGen to the full available 256m? Is there any parameter that can prevent the expansion of the pool and stop the JVM from taking full advantage of this 256 m?
Note that the Tenured pool is also slightly compressed, but no closer to it than to permgen.
using thread-local object allocation.
Mark Sweep Compact GC
Heap Configuration:
MinHeapFreeRatio = 5
MaxHeapFreeRatio = 10
MaxHeapSize = 805306368 (768.0MB)
NewSize = 1048576 (1.0MB)
MaxNewSize = 4294901760 (4095.9375MB)
OldSize = 4194304 (4.0MB)
NewRatio = 8
SurvivorRatio = 8
PermSize = 50331648 (48.0MB)
MaxPermSize = 268435456 (256.0MB)
G1HeapRegionSize = 0 (0.0MB)
Heap Usage:
New Generation (Eden + 1 Survivor Space):
capacity = 43909120 (41.875MB)
used = 495240 (0.47229766845703125MB)
free = 43413880 (41.40270233154297MB)
1.1278750291511195% used
Eden Space:
capacity = 39059456 (37.25MB)
used = 495240 (0.47229766845703125MB)
free = 38564216 (36.77770233154297MB)
1.2679132039114933% used
From Space:
capacity = 4849664 (4.625MB)
used = 0 (0.0MB)
free = 4849664 (4.625MB)
0.0% used
To Space:
capacity = 4849664 (4.625MB)
used = 0 (0.0MB)
free = 4849664 (4.625MB)
0.0% used
tenured generation:
capacity = 389492736 (371.44921875MB)
used = 350542912 (334.30377197265625MB)
free = 38949824 (37.14544677734375MB)
89.99985868799361% used
Perm Generation:
capacity = 143392768 (136.75MB)
used = 143338624 (136.6983642578125MB)
free = 54144 (0.0516357421875MB)
99.96224077353747% used
174149 interned Strings occupying 19526656 bytes.