开发者

Minor GC is too slow

java version "1.6.0_17"
Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
Java HotSpot(TM) 64-Bit Server VM (build 14.3-b01, mixed mode)


-server -Xmx3000m -Xms3000m -Xmn650m -XX:PermSize=256M -XX:MaxPermSize=256m 
-XX:+DisableExplicitGC -XX:+UseParNewGC -XX:ParallelGCThreads=8 
-XX:+PrintTenuringDistribution -XX:+UseConcMarkSweepGC 
-XX:+UseCMSCompactAtFullCollection -XX:+CMSParallelRemarkEnabled -XX:CMSInitiatingOccupancyFraction=70 -XX:+UseParNewGC 

58876.976: [GC 58876.976: [ParNew
Desired survivor size 34078720 bytes, new threshold 1 (max 4)
- age   1:   35092080 bytes,   35092080 total
: 599040K->55380K(599040K), 0.3054020 secs] 1594716K->1113571K(3005440K), 0.3058680 secs] [Times: user=1.85 sys=0.05, real=0.31 secs]
59109.884: [GC 59109.884: [ParNew
Desired survivor size 34078720 bytes, new threshold 4 (max 4)
- age   1:   30958856 bytes,   30958856 total
: 587860K->39545K(599040K), 0.1958710 secs] 1646051K->1131839K(3005440K), 0.1963230 secs] [Times: user=1.26 sys=0.01, real=0.19 secs]
59399.831: [GC 59399.831: [ParNew
Desired survivor size 34078720 bytes, new threshold 1 (max 4)
- age   1:   36009176 bytes,   36009176 total
- age   2:   29223424 bytes,   65232600 total
: 572025K->66560K(599040K), 0.1467870 secs] 1664319K->1162057K(3005440K), 0.1472820 secs] [Times: user=1.11 sys=0.02, real=0.15 secs]
59721.070: [GC 59721.071: [ParNew
Desired survivor size 34078720 bytes, new threshold 1 (max 4)
- age   1:   42097920 bytes,   42097920 total
: 599040K->55945K(599040K), 0.3522740 secs] 1694537K->1214361K(3005440K), 0.3527210 secs]

My server has no visit pressure, why does a minor GC cost 0.x seconds? I believe that a minor GC should cost l开发者_如何学Cess than 0.1 second.

Since the default of newRation is 8, should I change -Xmn650m to -Xmn350m? I am not sure.


I don't see why you are worried about 0.3 second minor collections.

If you really do want to reduce the minor collection time, then reducing the size of the new space would do that. However, it probably would have the side effect of increasing the rate at which objects get tenured, and result in major collections happening more often.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜