You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Gnanaprakash <re...@gmail.com> on 2007/06/26 00:44:42 UTC

Memory usage always increasing

Hi,

I am running an embedded ActiveMQ 4.1.1 on Jboss 4.0.3. I am doing a stress
test with the following configuration.

Publisher

Threads - 3
Iterations per thread - 100000
Sleep time between iterations - 500 ms

Consumer

Listener Thread - 1
Durable Topic consumer.

broker configuration:

memory limit set to 512 MB.

As the stress test is progresses, I can see the Memory percentage usage
increasing. 

The memory percentage used is 50% for 65000 messages. That means before 100%
of the memory is used only 130000 messages only can be consumed or would
ActiveMQ's GC will clean up the memory sometime. 

How does the ActiveMQ GC work?

Thanks

Gnanaprakash








-- 
View this message in context: http://www.nabble.com/Memory-usage-always-increasing-tf3979402s2354.html#a11297036
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Memory usage always increasing

Posted by Gnanaprakash <re...@gmail.com>.
Hi,

I am running an embedded ActiveMQ 4.1.1 on Jboss 4.0.3. I am doing a stress
test with the following configuration. 

Publisher 

Threads - 6 
Iterations per thread - 100000 
Sleep time between iterations - 500 ms 

Consumer 

Listener Thread - 1 
Durable Topic consumer. 

broker configuration: 
memory limit set to 512 MB. 

As the stress test is progresses, I can see the Memory percentage usage
increasing. 

I used Jprofiler to monitor the VM. I could see a number of ActiveMQ
Scheduler and ActiveMQ TCP Transport daemon threads lingering. And also when
I monitored the heap , maximum memory in heap was used by instances of
LinkedList and byte[](I think the messages themselves). 

The LinkedList and byte[] references are not garbage collected and looks
like there is a memory leak.

The publisher after sending 130000 messages in 3 Hrs just hangs.
 
Regards
Gnanaprakash




Nicky Sandhu wrote:
> 
> Try using the 
> http://java.sun.com/developer/technicalArticles/J2SE/monitoring/ tools
> from jdk6 . Like James says use jconsole and then jmap to actually see
> which objects are the culprit in holding onto the memory. 
> 
> 
> Gnanaprakash wrote:
>> 
>> Can you pls suggest something in this regards?
>> 
>> Thanks
>> GP
>> 
>> 
>> 
>> James.Strachan wrote:
>>> 
>>> The JVM does the garbage collection. I'd recommend setting a
>>> reasonable heap & keeping your app running and watching the GC work
>>> via jconsole
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Memory-usage-always-increasing-tf3979402s2354.html#a11790989
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Memory usage always increasing

Posted by Nicky Sandhu <ni...@hotmail.com>.
Try using the 
http://java.sun.com/developer/technicalArticles/J2SE/monitoring/ tools from
jdk6 . Like James says use jconsole and then jmap to actually see which
objects are the culprit in holding onto the memory. 


Gnanaprakash wrote:
> 
> Can you pls suggest something in this regards?
> 
> Thanks
> GP
> 
> 
> 
> James.Strachan wrote:
>> 
>> The JVM does the garbage collection. I'd recommend setting a
>> reasonable heap & keeping your app running and watching the GC work
>> via jconsole
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Memory-usage-always-increasing-tf3979402s2354.html#a11364189
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Memory usage always increasing

Posted by Gnanaprakash <re...@gmail.com>.
Hi,

The heap size I configured was min - 512 MB and max 1024 MB in Jboss.

My Activemq memory limit was 512 MB.

The application as such does not use more that 250 - 300 MB. 

I tried configuring GC interval to every 15 mins. The GC seems to work but
the activemq memory usage is not coming down.

Is this the right memory setting?

Can you pls suggest something in this regards?

Thanks
GP



James.Strachan wrote:
> 
> On 6/25/07, Gnanaprakash <re...@gmail.com> wrote:
>>
>> Hi,
>>
>> I am running an embedded ActiveMQ 4.1.1 on Jboss 4.0.3. I am doing a
>> stress
>> test with the following configuration.
>>
>> Publisher
>>
>> Threads - 3
>> Iterations per thread - 100000
>> Sleep time between iterations - 500 ms
>>
>> Consumer
>>
>> Listener Thread - 1
>> Durable Topic consumer.
>>
>> broker configuration:
>>
>> memory limit set to 512 MB.
>>
>> As the stress test is progresses, I can see the Memory percentage usage
>> increasing.
>>
>> The memory percentage used is 50% for 65000 messages. That means before
>> 100%
>> of the memory is used only 130000 messages only can be consumed or would
>> ActiveMQ's GC will clean up the memory sometime.
>>
>> How does the ActiveMQ GC work?
> 
> The JVM does the garbage collection. I'd recommend setting a
> reasonable heap & keeping your app running and watching the GC work
> via jconsole
> 
> -- 
> James
> -------
> http://macstrac.blogspot.com/
> 
> 

-- 
View this message in context: http://www.nabble.com/Memory-usage-always-increasing-tf3979402s2354.html#a11309775
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Memory usage always increasing

Posted by James Strachan <ja...@gmail.com>.
On 6/25/07, Gnanaprakash <re...@gmail.com> wrote:
>
> Hi,
>
> I am running an embedded ActiveMQ 4.1.1 on Jboss 4.0.3. I am doing a stress
> test with the following configuration.
>
> Publisher
>
> Threads - 3
> Iterations per thread - 100000
> Sleep time between iterations - 500 ms
>
> Consumer
>
> Listener Thread - 1
> Durable Topic consumer.
>
> broker configuration:
>
> memory limit set to 512 MB.
>
> As the stress test is progresses, I can see the Memory percentage usage
> increasing.
>
> The memory percentage used is 50% for 65000 messages. That means before 100%
> of the memory is used only 130000 messages only can be consumed or would
> ActiveMQ's GC will clean up the memory sometime.
>
> How does the ActiveMQ GC work?

The JVM does the garbage collection. I'd recommend setting a
reasonable heap & keeping your app running and watching the GC work
via jconsole

-- 
James
-------
http://macstrac.blogspot.com/