我有一个问题:伊甸园100%使用,旧100%使用,从空间100%使用,但没有垃圾收集触发,没有oom
jmap -heap [pid]结果
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
我的vm args是
-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
如何解决?
答案 0 :(得分:1)
为什么会出现这种复杂的jvm parameters
(您缺少-Xloggc:/path/to/file
以避免详细记录)。
我发现很难相信没有GC
被触发。如果我是你,你会从一个更容易理解的选项开始,并从那里迭代。请记住,在大多数情况下,只需设置Xms
和Xmx
即可。由于heap
基于比率,其余的是人体工程学。