-XX:+HeapDumpOnOutOfMemoryError
-XX:+HeapDumpOnCtrlBreak writes heap dump together with thread dump on CTRL+BREAK
-Xms8000M -Xmx8000M -Xmn5000M -J-Xss256K -J-XX:ThreadStackSize=256 -J-XX:StackShadowPages=8 -J-verbosegc -J-XX:+PrintGC
Details -J-XX:+PrintGCTimeStamps -XX:PermSize=128m -XX:MaxPermSize=128m -XX:+UseParallelGC -Djava.library.path=/data/web/resin/libexec:/opt/j2sdk/lib:/usr/li
b64 -Djmagick.systemclassloader=false"
-Xms8000M -Xmx8000M -Xmn5000M
-J-Xss256K -J-XX:ThreadStackSize=256 -J-XX:StackShadowPages=8
-J-verbosegc -J-XX:+PrintGC Details -J-XX:+PrintGCTimeStamps
-XX:PermSize=128m -XX:MaxPermSize=128m
jstat -gcutil 28847 2s
S0 S1 E O P YGC YGCT FGC FGCT GCT
75.77 0.00 13.35 91.49 67.96 2558 274.193 17 61.191 335.383
75.77 0.00 16.45 91.49 67.96 2558 274.193 17 61.191 335.383
75.77 0.00 19.58 91.49 67.96 2558 274.193 17 61.191 335.383
75.77 0.00 22.76 91.49 67.96 2558 274.193 17 61.191 335.383
75.77 0.00 26.06 91.49 67.96 2558 274.193 17 61.191 335.383
75.77 0.00 29.44 91.49 67.96 2558 274.193 17 61.191 335.383
75.77 0.00 33.26 91.49 67.96 2558 274.193 17 61.191 335.383
75.77 0.00 36.39 91.49 67.96 2558 274.193 17 61.191 335.383
75.77 0.00 39.74 91.49 67.96 2558 274.193 17 61.191 335.383
75.77 0.00 42.76 91.49 67.96 2558 274.193 17 61.191 335.383
75.77 0.00 46.57 91.49 67.96 2558 274.193 17 61.191 335.383
75.77 0.00 49.58 91.49 67.96 2558 274.193 17 61.191 335.383
75.77 0.00 52.69 91.49 67.96 2558 274.193 17 61.191 335.383
75.77 0.00 56.05 91.49 67.96 2558 274.193 17 61.191 335.383
75.77 0.00 58.93 91.49 67.96 2558 274.193 17 61.191 335.383
75.77 0.00 62.46 91.49 67.96 2558 274.193 17 61.191 335.383
75.77 0.00 65.44 91.49 67.96 2558 274.193 17 61.191 335.383
75.77 0.00 68.26 91.49 67.96 2558 274.193 17 61.191 335.383
75.77 0.00 71.37 91.49 67.96 2558 274.193 17 61.191 335.383
75.77 0.00 74.54 91.49 67.96 2558 274.193 17 61.191 335.383
75.77 0.00 77.80 91.49 67.96 2558 274.193 17 61.191 335.383
75.77 0.00 81.35 91.49 67.96 2558 274.193 17 61.191 335.383
75.77 0.00 84.50 91.49 67.96 2558 274.193 17 61.191 335.383
75.77 0.00 87.59 91.49 67.96 2558 274.193 17 61.191 335.383
75.77 0.00 90.70 91.49 67.96 2558 274.193 17 61.191 335.383
75.77 0.00 93.75 91.49 67.96 2558 274.193 17 61.191 335.383
75.77 0.00 97.25 91.49 67.96 2558 274.193 17 61.191 335.383
0.00 99.91 1.51 91.86 67.96 2559 274.282 17 61.191 335.473
0.00 99.91 4.72 91.86 67.96 2559 274.282 17 61.191 335.473
0.00 99.91 7.85 91.86 67.96 2559 274.282 17 61.191 335.473
0.00 99.91 11.35 91.86 67.96 2559 274.282 17 61.191 335.473
0.00 99.91 14.54 91.86 67.96 2559 274.282 17 61.191 335.473
可以看出一次minorGC耗时基本上在100毫秒左右,而且每次minor GC的时候新生代晋升到旧生代。
自己google以及问GC界的牛人,建议用psGC禁用它的动态调整策略,使用的参数是:-XX:-UseAdaptiveSizePolicy来固定Eden、S0、S1
个人总结是:应用GC优化空间很大,需要时间调整参数进行观察