heap expanded after young gen gc?
Ion Savin
comp_ at gmx.net
Fri Apr 27 14:57:30 PDT 2012
Hi,
From the GC log below it seems that the heap gets expanded after young
gen collection also (131008K total at 0.030 got expanded to 262080K
total at 0.184). I was under the impression that this happens only
during Full GC (which might be triggered by the need to resize).
0.030: [GC [PSYoungGen: 128K->64K(192K)] 128K->128K(131008K), 0.0005310
secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
0.184: [GC [PSYoungGen: 138K->64K(192K)] 261932K->261881K(262080K),
0.0021120 secs] [Times: user=0.01 sys=0.00, real=0.01 secs]
0.186: [Full GC [PSYoungGen: 64K->0K(192K)] [PSOldGen:
261817K->122K(130816K)] 261881K->122K(131008K) [PSPermGen:
2552K->2552K(21248K)], 0.0110530 secs] [Times: user=0.01 sys=0.01,
real=0.01 secs]
0.297: [GC [PSYoungGen: 2K->32K(192K)] 261854K->261883K(262080K),
0.0013380 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
If expansion can happen after a young gen collection how is the
-XX:MinHeapFreeRatio (and -XX:MaxHeapFreeRatio) flag interpreted given
that after young gen GC objects might get promoted to the tenured
generation filling up the heap above the min ratio?
The heap is sized like this: -Xms128m -Xmx256m -Xmn256k
And the app is just generating collectable junk in a loop.
What I would expect to happen is for the heap to fill up to 128m, a full
gc to happen and since the old gen free space is over the default 40%
min heap free before expansion no heap resize to happen.
Please advise. Thank you!
Regards,
Ion Savin
More information about the hotspot-gc-use
mailing list