activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Tully <>
Subject Re: Help understanding memory usage/limits
Date Fri, 02 Apr 2010 13:01:42 GMT
On 2 April 2010 12:30, dcheckoway <> wrote:

> I could use some help understanding memory usage & limits in activemq.
>  5.3.1
> is what I'm running, fwiw.
> 1. Out of the box, <systemUsage> in activemq.xml is commented out.  I'm
> passing ACTIVEMQ_OPTS="-Xmx2048M ...".  What is the default behavior in
> that
> case?  Does that mean activemq will take advantage of the 2gb heap by
> default, or do I need to configure <memoryUsage> explicitly?  If it needs
> to
> be explicit, can I safely set <memoryUsage limit="2 gb"/> ?  If not, what's
> a recommended setting given -Xmx2048M?
> No, there are some hardcoded defaults for systemUsage think default for
memory is 64MB.
You need to take into account the expected number of destinations and
connections and producers/consumers as these will require memory.
Something like 70% of available heap is a reasonable initial gestimate.

> 2. On <policyEntry>, what exactly does "memoryLimit" do?  I have
> producerFlowControl="false", and I wasn't sure if memoryLimit only applies
> when producer flow control is enabled, or what?

That limits the amount of memory consumed by messages on that destination.
When that limit is reached, enqueues block unless systemUsage limits are
reached and message are spooled to disk. With producerFlowControl, the
producer is blocked rather than the destination in the broker.

> 3. What happens if you set the <policyEntry> elements' memoryLimit to the
> same size as your heap and/or <memoryUsage limit>?

that destination can block all other destinations by consuming all of the
memory resources.

> I'd like to understand the interaction of all of these factors.  Any info
> you can provide would be MUCH appreciated!!!
> Thanks,
> Dan
> --
> View this message in context:
> Sent from the ActiveMQ - User mailing list archive at


Open Source Integration

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message