Also, increasing the heap isn't necessarily a desperate measure for
desperate times. Rather, it's right-sizing the compute resources allocated
to the broker, so long as the heap usage is normal and expected.

>From your question, clearly your initial assumption is that this heap usage
is not normal or expected. But there are definitely many people who have
found that the right-size heap utilization of their broker was well above 2
GB based on the load and usage patterns they subjected the broker to, so my
initial assumption is that this is normal/correct and that you need to
adjust your configuration (and your expectations) accordingly.

As you can see from the email I just wrote, clearly I'm happy to help you
explore whether perhaps there is a memory leak or some other problem
causing the memory usage, because it's always possible that there is a bug,
and if so then we're grateful for the help identifying it. But you also
need to understand that there is no expectation that a heavily-used broker
would never use more heap than an empty on straight out of the box, so
"increase the heap" may turn out to be the solution, not a hack.

Tim

On Tue, Apr 14, 2020, 5:40 AM Tim Bain <tb...@alumni.duke.edu> wrote:

> Do you have a significant number of unconsumed persistent messages?
> Especially on many queues/topics? That would produce an increase in the
> amount of RAM relative to an empty broker, because the broker will pull a
> certain number of the messages into memory to be ready to dispatch them to
> consumers without a disk read.
>
> Also, I've never used embedded Camel routes, so I'm not sure what to
> expect from them in terms of memory usage.
>
> One other technique you could use is to capture a CPU sample via JVisualVM
> during the time period when the memory usage is increasing, to determine
> which broker activities are likely causing the increase.
>
> Tim
>
> On Tue, Apr 14, 2020, 2:33 AM hfridhi <haythem.fri...@gmail.com> wrote:
>
>> Hello Tim,
>> Thank you for your quick reply.
>> I agree with that increasing JVM's heap is a desperate measures in
>> desperate
>> times but my question is why even after a restart memory is quickly
>> consumed
>> (a window of 2 minutes).
>> <
>> http://activemq.2283324.n4.nabble.com/file/t379890/VisualVM_ActiveMQ_20200414.jpg>
>>
>>
>> PS: yesterday I was passing around 508K message through the broker. But
>> why
>> is possible that after restarting, JVM's heap is reached within 2 minutes
>> without any activity?
>>
>>
>>
>> --
>> Sent from:
>> http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
>>
>

Reply via email to