JVM | Performance Tuning

JVM | Performance Tuning

Print production environment GC pause time

-XX:+printGCApplicationStoppedTime
If you pause too long, consider the code is not a big cycle, can not enter the security point lead GC pause too long problem

Total time for which application threads were stopped: 0.0000306 seconds, Stopping threads took: 0.0000070 seconds

Production environment is prohibited RMI (remote method invoke) call System.gc ();

  • -XX:+DisableExplictGC : Failure of a direct call gc

Real production environment configuration examples

-Dresin.home=$SERVER_ROOT
-server
-Xmx3000M
-Xms3000M
-Xmn600M
-XX:PermSize=500M
-XX:MaxPermSize=500M
-Xss256K
-XX:+DisableExplicitGC
-XX:SurvivorRatio=1
-XX:+UseConcMarkSweepGC
-XX:+UseParNewGC
-XX:+CMSParallelRemarkEnabled
-XX:+UseCMSCompactAtFullCollection
-XX:CMSFullGCsBeforeCompaction=0
-XX:+CMSClassUnloadingEnabled
-XX:LargePageSizeInBytes=128M
-XX:+UseFastAccessorMethods
-XX:+UseCMSInitiatingOccupancyOnly
-XX:CMSInitiatingOccupancyFraction=70
-XX:SoftRefLRUPolicyMSPerMB=0
-XX:+PrintClassHistogram
-XX:+PrintGCDetails
-XX:+PrintGCTimeStamps
-XX:+PrintHeapAtGC
-Xloggc:log/gc.log

ID[1]


  1. 12466927

Guess you like

Origin www.cnblogs.com/Serenity1994/p/12466927.html