我在第一个内核中使用hazelcast,264 machine.Next machine.Next是我的开始脚本。
nohup java -Djava.rmi.server.hostname=172.19.141.2 -server -Xms40G -Xmx40G -XX:+PrintGCDateStamps -XX:+PrintGCDetails -Xloggc:./logs/gc.log -Xss256k -XX:PermSize=128M -XX:MaxPermSize=512M -Djava.util.Arrays.useLegacyMergeSort=true -XX:+UseG1GC -XX:G1HeapRegionSize=32 -XX:MaxGCPauseMillis=600 -XX:InitiatingHeapOccupancyPercent=70 -XX:+HeapDumpOnOutOfMemoryError -Dhazelcast.jmx=true -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=2222 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.net.preferIPv4Stack=true -Djava.ext.dirs=../lib:../lib-business:../lib-other com.hazelcast.core.server.StartServer &我的问题是整个gc大约需要12秒,这是不可接受的,我尝试过设置-XX:MaxGCPauseMillis=600 param.But --不是useful.This是gc日志。
2017-04-28T21:38:17.795+0800: 9237.910: [Full GC (Allocation Failure) 27G->7361M(40G), 15.6893722 secs]
[Eden: 1024.0K(2010.0M)->0.0B(2048.0M) Survivors: 38.0M->0.0B Heap: 27.5G(40.0G)->7361.6M(40.0G)], [Metaspace: 17817K->17726K(18432K)]
[Times: user=23.49 sys=0.16, real=15.69 secs] 希望你能帮忙。
发布于 2017-05-10 05:48:22
经过一些测试,我发现是大对象使gc更多的time.When,我删除了大对象,年轻的gc小于500 is,而且还没有完整的gc。
https://stackoverflow.com/questions/43682401
复制相似问题