You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Yang <te...@gmail.com> on 2011/10/03 23:12:48 UTC

disable mysterious GC

the following source code in jdk , RMI part, forces a full gc every 1
hour , if no old gen gc has happened by then.




    /** maximum interval between complete garbage collections of local heap */
    private static final long gcInterval =              // default 1 hour
        AccessController.doPrivileged(
            new GetLongAction("sun.rmi.dgc.client.gcInterval",
                              3600000)).longValue();



so if u have a large heap, and old gen gc does not happen frequently,
you need to set

#sun.rmi.dgc.client.gcInterval
#sun.rmi.dgc.server.gcInterval

to very high levels

Re: disable mysterious GC

Posted by Yang <te...@gmail.com>.
btw the first code snippet is from openjdk 7


On Mon, Oct 3, 2011 at 2:29 PM, Yang <te...@gmail.com> wrote:
> looks doc is outdated :
>
> $ grep '\.gcInterval'
> ./j2se/src/share/classes/sun/rmi/transport/ObjectTable.java
>            new GetLongAction("sun.rmi.dgc.server.gcInterval", 3600000));
>
>
> On Mon, Oct 3, 2011 at 2:21 PM, Jonathan Ellis <jb...@gmail.com> wrote:
>> I would expect that client=nodetool and server=Cassandra.  But sun's
>> docs say that sun.rmi.dgc.server.gcInterval defaults to 60s which I am
>> definitely NOT seeing.
>>
>> On Mon, Oct 3, 2011 at 4:12 PM, Yang <te...@gmail.com> wrote:
>>> the following source code in jdk , RMI part, forces a full gc every 1
>>> hour , if no old gen gc has happened by then.
>>>
>>>
>>>
>>>
>>>    /** maximum interval between complete garbage collections of local heap */
>>>    private static final long gcInterval =              // default 1 hour
>>>        AccessController.doPrivileged(
>>>            new GetLongAction("sun.rmi.dgc.client.gcInterval",
>>>                              3600000)).longValue();
>>>
>>>
>>>
>>> so if u have a large heap, and old gen gc does not happen frequently,
>>> you need to set
>>>
>>> #sun.rmi.dgc.client.gcInterval
>>> #sun.rmi.dgc.server.gcInterval
>>>
>>> to very high levels
>>>
>>
>>
>>
>> --
>> Jonathan Ellis
>> Project Chair, Apache Cassandra
>> co-founder of DataStax, the source for professional Cassandra support
>> http://www.datastax.com
>>
>

Re: disable mysterious GC

Posted by Yang <te...@gmail.com>.
looks doc is outdated :

$ grep '\.gcInterval'
./j2se/src/share/classes/sun/rmi/transport/ObjectTable.java
            new GetLongAction("sun.rmi.dgc.server.gcInterval", 3600000));


On Mon, Oct 3, 2011 at 2:21 PM, Jonathan Ellis <jb...@gmail.com> wrote:
> I would expect that client=nodetool and server=Cassandra.  But sun's
> docs say that sun.rmi.dgc.server.gcInterval defaults to 60s which I am
> definitely NOT seeing.
>
> On Mon, Oct 3, 2011 at 4:12 PM, Yang <te...@gmail.com> wrote:
>> the following source code in jdk , RMI part, forces a full gc every 1
>> hour , if no old gen gc has happened by then.
>>
>>
>>
>>
>>    /** maximum interval between complete garbage collections of local heap */
>>    private static final long gcInterval =              // default 1 hour
>>        AccessController.doPrivileged(
>>            new GetLongAction("sun.rmi.dgc.client.gcInterval",
>>                              3600000)).longValue();
>>
>>
>>
>> so if u have a large heap, and old gen gc does not happen frequently,
>> you need to set
>>
>> #sun.rmi.dgc.client.gcInterval
>> #sun.rmi.dgc.server.gcInterval
>>
>> to very high levels
>>
>
>
>
> --
> Jonathan Ellis
> Project Chair, Apache Cassandra
> co-founder of DataStax, the source for professional Cassandra support
> http://www.datastax.com
>

Re: disable mysterious GC

Posted by Jonathan Ellis <jb...@gmail.com>.
I would expect that client=nodetool and server=Cassandra.  But sun's
docs say that sun.rmi.dgc.server.gcInterval defaults to 60s which I am
definitely NOT seeing.

On Mon, Oct 3, 2011 at 4:12 PM, Yang <te...@gmail.com> wrote:
> the following source code in jdk , RMI part, forces a full gc every 1
> hour , if no old gen gc has happened by then.
>
>
>
>
>    /** maximum interval between complete garbage collections of local heap */
>    private static final long gcInterval =              // default 1 hour
>        AccessController.doPrivileged(
>            new GetLongAction("sun.rmi.dgc.client.gcInterval",
>                              3600000)).longValue();
>
>
>
> so if u have a large heap, and old gen gc does not happen frequently,
> you need to set
>
> #sun.rmi.dgc.client.gcInterval
> #sun.rmi.dgc.server.gcInterval
>
> to very high levels
>



-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of DataStax, the source for professional Cassandra support
http://www.datastax.com