a java bug, set JVM parameters explicitly

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6200091

 

 

 

Bug ID:

 

 

 

 

 

6200091

Votes 0
Synopsis RMI gcInterval is too short by default
Category java:rmi
Reported Against 5.0
Release Fixed mustang(beta)
State 10-Fix Delivered, request for enhancement
Priority: 3-Medium
Related Bugs 4403367
Submit Date 24-NOV-2004
Description
Default distributed GC intervals for RMI (set by -Dsun.rmi.dgc.server.gcInterval=.. and -Dsun.rmi.dgc.client.gcInterval=) are 60000 millis or 1 minute. In many cases customers are not aware of the fact that their environment (e.g. the JBoss container) activates RMI. In these cases, they experience poor application performance. This is particularly true in the case of large heap sizes where full GC times can easily reach 10-20 seconds. With 1 minute intervals this means that the JVM spends up to 30% of the time searching for garbage which is not there.
A default value of 10 minutes would cause no harm to applications but would bring the waste of time down to below 5% and thus increase throughput by something like 25% out-of-the-box.
Posted Date : 2005-07-28 22:11:37.0
Work Around
Use these JVM parameters explicitly:
-Dsun.rmi.dgc.server.gcInterval=600000
-Dsun.rmi.dgc.client.gcInterval=600000

In most cases you even use a value of 3600000 (1 hour) to make automatic full GC runs really rare.
  xxxxx@xxxxx   2004-11-24 18:41:13 GMT
Evaluation
Many performance problems in the field would be avoided or largely reduced
  xxxxx@xxxxx   2004-11-24 18:41:12 GMT

The default value for the GC interval should be increased for Mustang.
  xxxxx@xxxxx   2004-12-01 16:30:01 GMT

[These system properties control local GC intervals for the purpose of assisting distributed GC (i.e. GC of exported remote objects).]

Regarding "harm to applications", for the record, increasing the default value of the sun.rmi.dgc.client.gcInterval system property could adversely impact the timeliness of local unreachability (and thus local garbage collection) of a remote object-- in the worst case, causing an OutOfMemoryError in the remote object's VM-- as well as the timeliness of java.rmi.server.Unreferenced notifications.  This adverse impact would not necessarily occur, or even be likely to occur; it depends highly on the nature of the application, including what client-side GC would otherwise occur.  (The "harm" of increasing the default value of the sun.rmi.dgc.server.gcInterval is less compelling.)

That said, the described harm of the current low default values, given the current implementation (executing stop-the-world full GCs), is well appreciated-- see 4403367-- and seems like sufficient justification for increasing the default values.  More extensive external documentation regarding the precise effects of these system property settings would also be helpful.

[Note that RFE 5025281 provides a way to amelioriate the problem by providinga VM option to make full GCs execute concurrently rather than as stop-the-world.  Also, the most hoped-for solution would be RFE 4665536, which would allow more sophisticated interaction with the local GC than just being able to request a maximum interval between full GCs.]

  xxxxx@xxxxx   2004-12-02 01:50:25 GMT
Default values for
	sun.rmi.dgc.client.gcInterval
	sun.rmi.dgc.server.gcInterval
are now 3600000 (one hour).
Posted Date : 2005-07-28 22:11:37.0


--------------------------------- END --------------------------------------

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值