-1

JVM 版本
java 版本 "1.8.0_111"
Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode)
JVM 内存使用如:
Heap
def new generation total 33216K, used 4K [0x00000000fa000000, 0x00000000fc400000, 0x00000000fc400000)
eden space 29568K, 0% used [0x00000000fa000000, 0x00000000fa001080, 0x00000000fbce0000)
from space 3648K, 0% used [0x00000000fc070000, 0x00000000fc070000, 0x00000000fc400000)
to space 3648K, 0% used [ 0x00000000fbce0000, 0x00000000fbce0000, 0x00000000fc070000)
终身代总数 61440K, 已使用 34490K [0x00000000fc400000, 0x0000000100000000, 0x00000000000000000000000000000
空间 61440K, 56% 已使用 [0x00000000fc400000, 0x00000000fe5aeaa8, 0x00000000fe5aec00, 0x0000000100000000)
已使用元空间 51022K, 容量 51693K, 承诺 57344K, 保留 57344K

JVM 参数是:
JAVA_OPTS="$JAVA_OPTS "-server" "-XX:+UseSerialGC" "-XX:+UseAdaptiveSizePolicy
JAVA_OPTS="$JAVA_OPTS "-Dcom.sun.management.jmxremote.port=31345" "-Djava.rmi .server.hostname=0.0.0.0" "-Dcom.sun.management.jmxremote.authenticate=false" "-Dcom.sun.management.jmxremote.ssl=false" "-Dcom.sun.management.jmxremote.ssl.need .client.auth=false" "-XX:+UnlockCommercialFeatures" "-XX:+FlightRecorder
JAVA_OPTS="$JAVA_OPTS"-XX:-UseCompressedClassPointers
JAVA_OPTS="$JAVA_OPTS"-XX:MaxMetaspaceSize=56m" "-XX:MarkStackSize= 32768" "-XX:MarkStackSizeMax=4194304" "-XX:SharedReadWriteSize=12582912" "-XX:StackShadowPages=3" "-XX:VMThreadStackSize=512
JAVA_OPTS="$JAVA_OPTS"-XX:InitialCodeCacheSize=48m""-XX:ReservedCodeCacheSize=48m""-XX:CompileThreshold=3000""-XX:+UseCodeCacheFlushing
JAVA_OPTS="$JAVA_OPTS"-Xms96m""-Xmx96m""- XX:NewRatio=2
JAVA_OPTS="$JAVA_OPTS -Xss256k -Xmn36m"

当前 gc 日志为:
23636.561:[Full GC (Last ditch collection) 23636.561:[Tenured:34568K->34568K(61440K),0.1815189 秒]34568K->34568K(94656K),[元空间:511117344K->51111K)] , 0.1816524 secs] [Times: user=0.17 sys=0.00, real=0.18 secs]
23636.744: [Full GC (Metadata GC Threshold) 23636.744: [Tenured: 34568K->34609K(61440K), 0.18111110 secs] 09K>7(347) 94656K),[元空间:51111K->51111K(57344K)],0.1813034 秒] [时间:用户 = 0.18 系统 = 0.00,实际 = 0.18 秒]
23636.926:[完整 GC(最后一次沟渠收集)23636.926:[终身:34609K- >34609K(61440K), 0.1731652 秒] 34609K->34609K(94656K), [元空间: 51111K->51111K(57344K)], 0.1734136 秒] [时间: user=0.17 sys=0.00, real=0.18 secs]
23637.100:[Full GC(元数据 GC 阈值)23637.101:[Tenured:34609K->34567K(61440K),0.1757107 秒] 34667K->34567K(94656K),[元空间:51111K->2)51111K(7539 秒] 40。时间:user=0.16 sys=0.00, real=0.17 secs]
23637.276: [Full GC (Last ditch collection) 23637.276: [Tenured: 34567K->34567K(61440K), 0.1675901 secs] 34567K->34567K(94656K),Metaspace : 51111K->51111K(57344K)], 0.1677021 secs] [Times: user=0.16 sys=0.00, real=0.17 secs]
23637.447: [Full GC (Metadata GC Threshold) 23637.447: [Tenured: 34567K->34667K(6) , 0.1613939 秒] 35383K->34667K(94656K), [元空间: 51117K->51117K(57344K)], 0.1615529 秒] [时间: user=0.16 sys=0.00, real=0.16 secs]
23637.609:[完整 GC(最后一次 ditch 收集)23637.609:[终身:34667K->34667K(61440K),0.1629309 秒] 34667K->34667K(94656K),[元空间:51117K->51117K(57334K)] 3 秒] [16316K]。时间:user=0.15 sys=0.00, real=0.17 secs]

Jstat status check is:
1)./jdk1.8.0_111/bin/jstat -gc 3013 1000 5
S0C S1C S0U S1U EC EU OC OU MC MU CCSC CCSU YGC YGCT FGC FGCT GCT
3648.0 3648.0 0.0 0.0 29568.0 41.8 61440.0 35100.7 57344.0 51127.3 0.0 0.0 391 2.904 105988 17121.850 17124.755
3648.0 3648.0 0.0 0.0 29568.0 562.5 61440.0 35049.7 57344.0 51127.3 0.0 0.0 391 2.904 105994 17122.837 17125.742
3648.0 3648.0 0.0 0.0 29568.0 155.8 61440.0 35539.3 57344.0 51123.7 0.0 0.0 391 2.904 106000 17123.893 17126.797
3648.0 3648.0 0.0 0.0 29568.0 0.0 61440.0 35272.7 57344.0 51123.7 0.0 0.0 391 2.904 106005 17124.776 17127.681
3648.0 3648.0 0.0 0.0 29568.0 0.0 61440.0 35269.9 57344.0 51123.7 0.0 0.0 391 2.904 106011 17125.791 17128.696
2)./jdk1.8.0_111/bin/jstat -class 3013 1000 5
Loaded Bytes Unloaded Bytes Time
23996 38866.6 15278 22602.0 2294.53
23996 38866.6 15278 22602.0 2294.53
23997 38868.1 15279 22603.6 2294.53
23997 38868.1 15279 22603.6 2294.53
23997 38868.1 15279 22603.6 2294.53

4

1 回答 1

0

元空间占用率为 98%,这超过了 MinMetaspaceFreeRatio。

于 2017-02-23T07:27:12.073 回答