happy programmer
happy programmer

Reputation: 110

G1 full gc time much time

I am using hazelcast in a eigth core and 264G memeory linux machine.Next is my start script.

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 &

My problem is that the full gc takes about 12 seconds,which is unacceptable.I have tried to set -XX:MaxGCPauseMillis=600 param.But it is not useful.This is the gc log.

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] 

Wish for your help.

Upvotes: 1

Views: 428

Answers (1)

happy programmer
happy programmer

Reputation: 110

After some test,I find that it is the big object which makes the gc much time.When I remove the big object, the young gc is less than 500ms and there is no full gc so long.

Upvotes: 1

Related Questions