0 Replies Latest reply on Jan 6, 2011 12:40 PM by John Muhlestein

    Strange memory usage pattern

    John Muhlestein Newbie

      I have what seems to be a strange memory usage pattern.

       

      First, I am running HornetQ in standalone mode using 64 bit JDK

       

      • run.sh has the following memory setting -Xms5120M -Xmx5120M

          The following is in my hornetq-configuration.xml

           <address-setting match="jms.topic.Replication.out">

              <max-size-bytes>1048576000</max-size-bytes>

              <page-size-bytes>10485760</page-size-bytes>

              <address-full-policy>PAGE</address-full-policy>

            </address-setting>

       

      As you can see from above we have set the queue to page a 1GB of memory used.  As we load messages, through jconsole, we are seeing the memory usage climbing to 92% of allocated memory (all 5gb of memory have been allocated at this point) before our queue goes to paging. This is the only queue that messages are processing on, and roughly equates to 24000 messages.

       

      I was hoping for a better understanding of what is included in the calculation of the memory used on a queue (is it only the payload of the message?) and what types of other objects might be generated due to using a large number of JMS properties on a message (say 50 String properties per message all less than 40 characters). This is a very odd behavior, and has caused HornetQ to crash on us in the past. It seems like a 5:1 ratio of allocated JVM memory to the max size in bytes for a queue should be more than sufficient to prevent memory related problems.

       

      thanks,

      John

      <address-setting match="jms.topic.Replication.out">
              <max-size-bytes>1048576000</max-size-bytes>
              <page-size-bytes>10485760</page-size-bytes>
              <address-full-policy>PAGE</address-full-policy>
            </address-setting>