我们在 Centos 6.4 上运行了一个 Java 应用程序,我们注意到 RES 值超过 400m,超过了分配的最大堆 256m。根据下面的 jstat 结果,没有发生 GC,这是令人担忧的情况吗?可以采取哪些主动措施?我还通过 MAT 运行了堆分析。
Timestamp S0 S1 E O P YGC YGCT FGC FGCT GCT
2331438.3 56.95 0.00 62.79 82.79 80.37 1362 54.337 0 0.000 54.337
2331443.3 56.95 0.00 62.79 82.79 80.37 1362 54.337 0 0.000 54.337
2331448.4 56.95 0.00 62.79 82.79 80.37 1362 54.337 0 0.000 54.337
2331453.4 56.95 0.00 62.79 82.79 80.37 1362 54.337 0 0.000 54.337
2331458.4 56.95 0.00 62.79 82.79 80.37 1362 54.337 0 0.000 54.337
2331463.4 56.95 0.00 62.79 82.79 80.37 1362 54.337 0 0.000 54.337
2331468.4 56.95 0.00 62.79 82.79 80.37 1362 54.337 0 0.000 54.337
2331473.4 56.95 0.00 63.24 82.79 80.37 1362 54.337 0 0.000 54.337
2331478.4 56.95 0.00 63.24 82.79 80.37 1362 54.337 0 0.000 54.337
2331483.4 56.95 0.00 63.78 82.79 80.37 1362 54.337 0 0.000 54.337
2331488.4 56.95 0.00 63.78 82.79 80.37 1362 54.337 0 0.000 54.337
2331493.4 56.95 0.00 63.79 82.79 80.37 1362 54.337 0 0.000 54.337
2331498.4 56.95 0.00 63.79 82.79 80.37 1362 54.337 0 0.000 54.337
MAT results.
Problem Suspect 1
One instance of "org.jboss.netty.channel.socket.oio.OioWorker" loaded by "org.rzo.yajsw.boot.WrapperClassLoader @ 0xf0002a50" occupies 49,451,672 (75.12%) bytes.
Keywords
org.rzo.yajsw.boot.WrapperClassLoader @ 0xf0002a50
org.jboss.netty.channel.socket.oio.OioWorker
Problem Suspect 2
The class "java.lang.ref.Finalizer", loaded by "<system class loader>", occupies 10,408,112 (15.81%) bytes.
Keywords
java.lang.ref.Finalizer
答案1
RES 内存与堆内存不匹配是正常的,因为堆只是 jvm 进程内存的一部分。请参阅JVM内存结构。这是唯一的问题吗?