4 Replies Latest reply on Oct 10, 2008 9:22 AM by janbols

    Out of memory heap

    janbols

      Hi,
      I'm testing a setup of 2 gridgain nodes sharing a jbossCache that's used to store certain messages. When I run both nodes on the same JVM I notice the memory heap soon reaches it's limit.

      I tried analysing it with a profiler and found that the org.jgroups.stack.NakReceiverWindow was holding 90% of the available memory.

      Do you have any ideas what I'm doing wrong?

      You can find the configuration of the jBossCache below.

      <?xml version="1.0" encoding="UTF-8"?>
      
      <server>
       <mbean code="org.jboss.cache.jmx.CacheJmxWrapper" name="jboss.cache:service=Cache">
      
       <attribute name="TransactionManagerLookupClass">org.jboss.cache.transaction.GenericTransactionManagerLookup
       </attribute>
      
       <attribute name="IsolationLevel">REPEATABLE_READ</attribute>
      
       <attribute name="LockParentForChildInsertRemove">true</attribute>
      
       <attribute name="CacheMode">REPL_ASYNC</attribute>
      
       <attribute name="ClusterName">JBossCache-Cluster-TMS-NG</attribute>
       <attribute name="ClusterConfig">
       <config>
      
       <UDP mcast_addr="228.1.2.3" mcast_port="48866"
       ip_ttl="64" ip_mcast="true"
       mcast_send_buf_size="150000" mcast_recv_buf_size="80000"
       ucast_send_buf_size="150000" ucast_recv_buf_size="80000"
       loopback="false"/>
       <PING timeout="2000" num_initial_members="3"/>
       <MERGE2 min_interval="10000" max_interval="20000"/>
       <FD shun="true"/>
       <FD_SOCK/>
       <VERIFY_SUSPECT timeout="1500"/>
       <pbcast.NAKACK gc_lag="50" retransmit_timeout="600,1200,2400,4800"/>
       <UNICAST timeout="600,1200,2400,4800"/>
       <pbcast.STABLE desired_avg_gossip="400000"/>
       <FC max_credits="2000000" min_threshold="0.10"/>
       <FRAG2 frag_size="8192"/>
       <pbcast.GMS join_timeout="5000" shun="true" print_local_addr="true"/>
       <pbcast.STATE_TRANSFER/>
       </config>
       </attribute>
      
       <attribute name="StateRetrievalTimeout">20000</attribute>
      
       <attribute name="SyncReplTimeout">20000</attribute>
      
       <attribute name="LockAcquisitionTimeout">15000</attribute>
      
       <attribute name="ShutdownHookBehavior">DEFAULT</attribute>
      
       <attribute name="UseLazyDeserialization">true</attribute>
      
       </mbean>
      </server>
      


      I'm using jBossCache 2.2.0.GA


      I'm completely new to jBossCache or jGroups. Obviuosly.

        • 1. Re: Out of memory heap
          belaban

          Where did you copy the XML config ? The value of STABLE.desired_avg_gossip is completely off, a value of 400000 means you're garbage collecting every 400 seconds !
          I suggest a value of 50000 (every 50 seconds), but combine it with max_bytes="400000". You probably mixed the 2 properties up.

          • 2. Re: Out of memory heap
            janbols

            Hi, thanks for the reply. I found the

            <pbcast.STABLE desired_avg_gossip="400000"/>
            in the userguide of jbossCache.

            I tried changing the values like you suggested, but that didn't change a thing. Any other ideas?



            • 3. Re: Out of memory heap
              belaban

              No, it's max_bytes *not* desired_avg_gossip !

              Try one of the standard configs shipped with your version, e.g. udp.xml

              • 4. Re: Out of memory heap
                janbols

                Great! Yes! That did the trick.
                Thanks