java - PermGen thrashing at 99%, but nowhere near MaxPermSize -
i have repeatable situation jvm undergoing heavy gc load. when request jvm stats using jmap -heap
, info below (this oracle jdk 1.7.0_25 on linux)
note while says maxpermsize
256m, says permgen sitting @ 136mb @ 99.9% capacity.
that explain gc thrashing, question why isn't jvm expanding permgen full available 256m? there parameter can prevent pool expansion happening, , stopping jvm making full use of 256m?
note tenured pool getting bit tight, near as 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 space: capacity = 4849664 (4.625mb) used = 0 (0.0mb) free = 4849664 (4.625mb) 0.0% used 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.
one possible reason computer has no more available memory, hence jvm can't allocate more space permgen (you need ~ +30% of available memory 1 configured).
other reason (and i'm more one) weird behaviour of java ergonomics. may possible jvm decide permgen "best size" 136mb failed in increasing @ point. maybe because of memory leaks caused permgen. can try use -xx:+cmsclassunloadingenabled -xx:+cmspermgensweepingenabled
if use concurrent mark , sweep gc.
Comments
Post a Comment