我在 CentOS 64 位 linux 机器上使用 jdk 1.7.0_09。
gc 相关的 vm args 是
-Xmx4g -Xmn2g -XX:SurvivorRatio=4 -XX:PermSize=128m -XX:MaxPermSize=128m -XX:InitialTenuringThreshold=15 -XX:CMSWaitDuration=50 -XX:MaxTenuringThreshold=15 -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:CMSInitiatingOccupancyFraction=80 -XX:+CMSParallelRemarkEnabled -XX:ReservedCodeCacheSize=128m
但它一直在做完整的 gc
jstat -gcutil pid 1000
S0 S1 E O P YGC YGCT FGC FGCT GCT
0.00 0.00 15.62 57.52 19.90 11 2.081 11109 7454.686 7456.767
0.00 0.00 15.81 57.52 19.90 11 2.081 11109 7454.686 7456.767
0.00 0.00 15.81 57.51 19.90 11 2.081 11111 7454.892 7456.973
0.00 0.00 16.06 57.51 19.90 11 2.081 11111 7455.115 7457.196
0.00 0.00 16.06 57.51 19.90 11 2.081 11111 7455.115 7457.196
0.00 0.00 16.27 57.51 19.90 11 2.081 11111 7455.115 7457.196
0.00 0.00 16.27 57.51 19.90 11 2.081 11111 7455.115 7457.196
0.00 0.00 16.29 57.51 19.90 11 2.081 11111 7455.115 7457.196
0.00 0.00 16.29 57.51 19.90 11 2.081 11111 7455.115 7457.196
0.00 0.00 16.29 57.47 19.90 11 2.081 11113 7455.549 7457.629
0.00 0.00 16.29 57.47 19.90 11 2.081 11113 7455.549 7457.629
0.00 0.00 16.34 57.47 19.90 11 2.081 11113 7455.549 7457.629
0.00 0.00 16.34 57.47 19.90 11 2.081 11113 7455.549 7457.629
0.00 0.00 16.34 57.47 19.90 11 2.081 11113 7455.549 7457.629
0.00 0.00 16.42 57.47 19.90 11 2.081 11114 7455.549 7457.629
0.00 0.00 16.42 57.44 19.90 11 2.081 11115 7455.986 7458.067