You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by SuoNayi <su...@163.com> on 2013/05/06 07:50:53 UTC

Why the same amount of messages with transactional and non-transactional send consumes different memory usage?

Hi, 
I have just done two tests, one test is to send 20,000 messages to one queue with non-transaction, 
since the memory usage limit for the queue is 2MB and every message is 1KB so the memory usage will 
reach the highwater mark, that's 70% memory usage.The other test is to send the same amount of messages
to the other empty queue with transaction(2000 messages each commit), the memory usage percent is only 
19 while I expect it's the same with the non-transaction case.Does someone have the same experience?
Is it a expected behavior?
My broker version  is 5.5.0.




Thanks,
SuoNayi




Re:Why the same amount of messages with transactional and non-transactional send consumes different memory usage?

Posted by SuoNayi <su...@163.com>.
The preceding messages in transactions can succeed in occupying the message cursor memory/cache 
but the subsequent messages in pending transactions increase the memory usage at first to exceed
the memory usage limit so they are unable to put into the cursor cache anymore when committing 
transaction.When all transactions are complete, only part of messages is in the cursor cache.


So smaller number of messages in a transaction can use the cursor cache more reasonably.


At 2013-05-06 13:50:53,SuoNayi <su...@163.com> wrote:
>
>Hi, 
>I have just done two tests, one test is to send 20,000 messages to one queue with non-transaction, 
>since the memory usage limit for the queue is 2MB and every message is 1KB so the memory usage will 
>reach the highwater mark, that's 70% memory usage.The other test is to send the same amount of messages
>to the other empty queue with transaction(2000 messages each commit), the memory usage percent is only 
>19 while I expect it's the same with the non-transaction case.Does someone have the same experience?
>Is it a expected behavior?
>My broker version  is 5.5.0.
>
>
>
>
>Thanks,
>SuoNayi
>
>
>