You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by JoBe <Jo...@freenet.de> on 2016/05/17 06:06:11 UTC

ActiveMQ memory usage, persistent messaging, cursor usage and PFC

Hi,
I'm relatively new to ActiveMQ and currently I try to understand the various
information about persintence,  Memory limit, Cursor memory limit, Cursur
percent usage and  Producer Flow Control. (I' m sure I read almost all
available information, especially 
http://blog.christianposta.com/activemq/activemq-understanding-memory-usage/
<http://blog.christianposta.com/activemq/activemq-understanding-memory-usage/> 
)
I've built up a small test system and I see that the system behaviour is not
as I would expect.

Here is my configuration:

-ActiveMQ version 5.13.3
-broker persistence  using KahaDB
-testing with persistent messages

-SystemUsage:
          <systemUsage>
            <systemUsage>
                <memoryUsage>
                    <memoryUsage limit="256 mb" />
                </memoryUsage>
                <storeUsage>
                    <storeUsage limit="5 gb"/>
                </storeUsage>
                <tempUsage>
                    <tempUsage limit="64 mb"/>
                </tempUsage>
            </systemUsage>
        </systemUsage>

-DestinationPolicy:
        <destinationPolicy>
            <policyMap>
              <policyEntries>
	         <policyEntry queue=">" producerFlowControl="true"
cursorMemoryHighWaterMark="70" memoryLimit="10MB"/>
                    <policyEntry topic=">" >
                             <pendingMessageLimitStrategy>
                                      <constantPendingMessageLimitStrategy
limit="1000"/>
                             </pendingMessageLimitStrategy>
                </policyEntry>
              </policyEntries>
            </policyMap>
        </destinationPolicy>


For testing, I have only one queue : queue://TEST
I produce 100 messages  with size 1MB each.
>activemq producer --messageCount 100 --messageSize 1048576

As a result I would expect that the Cursors memory limit remains under 70%
of the destination memory limit (10MB)  
because I use persistent messages and hence the store cursor per default.  
But I see the following:

Cursor memory usage: 104960000
Cursor percent usage :1000
Memory Limit: 10485760
Memory percent usage: 1000
Memory usage byte count:104960000
Memory usage portion: 0
Store message size: 104887192

Broker Memory percent usage :39

Also from my understanding the PDC should never kicks in (as long as the
store memory limit is not reached). But after producing  another 100
messages the PFC kicks in. 
 
I don't understand why the cursor exceeds  the memory limit of 10 MB for the
destination. 
What is the base value of the CursorHighWaterMark?

Another observation:
If I first send 7 messages the Cursur usage percent value is 70%. 
After that I' m able to  send any amount  without the PDC kicks in. The
Cursor usage percent remains at 70%

What do I missunderstand ?  Any help is appreciated
Many Thanks
Joerg




--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-memory-usage-persistent-messaging-cursor-usage-and-PFC-tp4712042.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ memory usage, persistent messaging, cursor usage and PFC

Posted by JoRo <jo...@zf.com>.
Hello Joerg,

your questions are also interesting to me.
Is there already new knowledge?

Thank you so much!

Regards,
JoRo



--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-memory-usage-persistent-messaging-cursor-usage-and-PFC-tp4712042p4712923.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.