activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dcheckoway <dchecko...@gmail.com>
Subject Re: Help understanding memory usage/limits
Date Fri, 02 Apr 2010 16:47:29 GMT

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.  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.

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 <dcheckoway@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.


Mime
View raw message