0
votes

I have a problem that: Eden 100% used,Old 100% used,From Space 100% used,but not garbage collection triggered, no oom

jmap -heap [pid] result

Eden Space:    
capacity = 859045888 (819.25MB)    
used     = 859045888(819.25MB)   
free     = 0 (0.0MB)
100.0% used 
From Space:    
capacity = 107347968 (102.375MB)    
used     = 12370032(11.796981811523438MB)    
free     = 16441280 (90.57801818847656MB)
0.0% used 
To Space:    
capacity = 107347968 (102.375MB)   
used     = 0 (0.0MB)    
free     = 107347968 (102.375MB)
 0.0% used 
PS Old generation:    
capacity = 1073741824 (1024.0MB)   
used     = 1073741816 (1023.0832290649414MB)    
free     = 8 (7.62399453125E-6MB)
 99.99999925494154% used 
Perm Generation:    
capacity = 268435456 (256.0MB)    
used     = 79784056 (76.08800506591797MB)    
free     = 188651400 (179.91199493408203MB)
 29.721876978874207% used

jstat -gcutil [pid] 1000
   S0     S1     E      O      P     YGC   YGCT    FGC    FGCT     GCT
  11.52  0.00  100.00  100.00  30.28  22   5.87     3    6.136    11.723
  11.52  0.00  100.00  100.00  30.28  22   5.87     3    6.136    11.723
  11.52  0.00  100.00  100.00  30.28  22   5.87     3    6.136    11.723
  11.52  0.00  100.00  100.00  30.28  22   5.87     3    6.136    11.723
  11.52  0.00  100.00  100.00  30.28  22   5.87     3    6.136    11.723
  11.52  0.00  100.00  100.00  30.28  22   5.87     3    6.136    11.723

My vm args is

-Xmx2g -Xms2g -Xmn1g -XX:SurvivorRatio=8 -XX:PermSize=256m -XX:MaxPermSize=256m -XX:+HeapDumpOnOutOfMemoryError -XX:ReservedCodeCacheSize=128m -XX:InitialCodeCacheSize=128m -XX:+DisableExplicitGC -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+PrintHeapAtGC -XX:+PrintTenuringDistribution -XX:+UseConcMarkSweepGC -XX:+UseCMSCompactAtFullCollection -XX:CMSFullGCsBeforeCompaction=0 -XX:CMSInitiatingOccupancyFraction=80

How to solve it ?

1
Why you say there is no GC. Please add -Xloggc:/path/to/file and adds the content. Have you tried to attach visual vm for example?ssedano
Either you managed, in the above hodge-podge of options, to muck up GC, or you are allocating a lot of stuff that you never let go unreferenced. Or you're not having a storage problem at all and some other error is occurring. (You didn't list any error.)Hot Licks

1 Answers

1
votes

Why such complicated jvm parameters (you are missing -Xloggc:/path/to/file to avoid just verbose logging).

I find really hard to believe that no GC is being triggered. If I were you would start with a more easy to understand options, and from there iterate. Bear in mind that in most of the cases just setting Xms and Xmx is enough. As heap is based on ratios and the ergonomics do the rest.