Some answers in line:
On 2 April 2010 17:47, dcheckoway <dchecko...@gmail.com> wrote:

>
> Thanks Gary.  So lemme toss some actual config numbers out there and please
> tell me if this makes any sense...or if I'm shooting myself in the foot
> somehow:
>
> Destinations:
> - 1 queue with very heavy use, say 50 million messages per day
> - 1 queue with very light use, say up to 500 messages per day
> - 2 topics with very light use, say up to 500 messages per day
>
> ACTIVEMQ_OPTS="-Xmx3072M ..."  (so 3gb heap)
>
> My attempt to account for pretty light topic use:
>                <policyEntry topic=">" producerFlowControl="false"
> memoryLimit="64mb">
>
> My attempt to account for heavier queue use:
>                <policyEntry queue=">" producerFlowControl="false"
> memoryLimit="1024mb">
>
> And then I'll uncomment the <systemUsage> section and do this...you had
> said
> 70% of heap, so if heap is 3gb, let's just say 2gb...
>
>        <systemUsage>
>            <systemUsage>
>                <memoryUsage>
>                    <memoryUsage limit="2048 mb"/>
>                </memoryUsage>
>            </systemUsage>
>        </systemUsage>
>
> What do you make of all of this?  Does it look like I have a clue?  Cuz I
> don't feel like I do...  :-)


> I'm guessing message size may be more critical to sizing the memoryLimit
> parameters, but I still don't fully understand what memoryLimit *IS*
> exactly.


Correct, the message size is important. The memory limit is really just a
number that is the running total of the accumulated messages sizes that are
held in memory at a given time. The broker keeps as many pending
messages as it can in memory and will block (the destination or producer) if
the limit is reached or can page messages to disk to free up memory, if a
file or store pending message cursor is used. see: message
cursors<http://activemq.apache.org/message-cursors.html> for
more detail on the cursor strategies.
For a destination with large queue sizes, to prevent flow control or
blocking, configuring a message cursor that can page to disk when system
usage is reached is often a good idea. In this way, the queue depth is only
limited by disk usage and producers are not inhibited.


> Is that a per-queue and/or per-topic limit of how much memory can
> be allocated to any given destination of the respective type (queue or
> topic)?
>
> Is there a way to allocate a specific memoryLimit to individual specific
> queues & topics?  That would probably be smarter in my case if such a thing
> is available.
>

Yes, they are per
destination<http://activemq.apache.org/per-destination-policies.html>,
note the ">" that you are using in the policy entry, this is the
wildcard<http://activemq.apache.org/wildcards.html>that matches all
destinations of a given type. you could reference a single
queue or topic name there to make it destination specific.



> Sorry to blast more questions at you...I'd just like to have a better
> understanding.
>
> Thanks!
> Dan
>
>
> Gary Tully wrote:
> >
> > On 2 April 2010 12:30, dcheckoway <dchecko...@gmail.com> wrote:
> >> 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:
> >>
> http://old.nabble.com/Help-understanding-memory-usage-limits-tp28118112p28118112.html
> >> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> >>
> >>
> >
> >
> > --
> > http://blog.garytully.com
> >
> > Open Source Integration
> > http://fusesource.com
> >
> >
>
> --
> View this message in context:
> http://old.nabble.com/Help-understanding-memory-usage-limits-tp28118112p28120846.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>


-- 
http://blog.garytully.com

Open Source Integration
http://fusesource.com

Reply via email to