2

We're using an older version of ActiveMQ (5.3.2) (see: Is activemq reliable?)

We've removed persistence because we needed more speed. Our worker can keep up with the messages, but, even though the queue typically is at 0 pending, after about 45000 messages processed (a message is typically 100 chars long), the Page file is 8GB!! It doesn't stop there though, it continues until 15 GB is reached (Our server has 16gb memory)!

Stopping the ActiveMQ process doesn't clean up this pagefile, it remains this huge indefinately.

these are the settings we use:

<policyEntry queue=">" producerFlowControl="false" memoryLimit="2gb">
</policyEntry>

and

<systemUsage>
    <systemUsage>
        <memoryUsage>
            <memoryUsage limit="20 mb"/>
        </memoryUsage>
        <storeUsage>
            <storeUsage limit="1 gb"/>
        </storeUsage>
        <tempUsage>
            <tempUsage limit="100 mb"/>
        </tempUsage>
    </systemUsage>
</systemUsage>

What do we need to do to keep memory usage in 'normal' levels?

Our server: Windows 2003 (64bit). ActivemQ (5.3.2), with Java64 bit (1.6.0__22)

Community
  • 1
  • 1
Toad
  • 15,593
  • 16
  • 82
  • 128

3 Answers3

1

If the memory is not being released even after you stop ActiveMQ, I'm tempted to say it's a bug in the JDK. Have you considered downgrading to a more stable version? Also experiment with running this with a 32-bit JDK and see if you can reproduce the problem with smaller max memory setting.

Amir Afghani
  • 37,814
  • 16
  • 84
  • 124
  • afghani: I already downgraded from 5.4.1 because of continuous crashing. Would be great if it's clear which is the stable version ;^) In any case, I'll try and see if the same things happen on a 32 bit java version. Good idea. – Toad Nov 29 '10 at 20:41
  • 1
    @Toad: I think he meant downgrading the Java development kit to an earlier version and platform. – Bamieater Dec 01 '10 at 08:11
1

I didn't face any issues on a windows 7 machine, with ActiveMQ 5.3.0, jdk1.6.0_18 (64 bit) and a test setup with PHP. With some test scripts I wrote 10.000.000 messages to the queue in 585 seconds. That's about 17000 messages per second. Everything was running on the same machine (my laptop, 4 GB mem, Intel i3 CPU) and using TCP sockets to connect to the queue.

Bamieater
  • 176
  • 5
1

Can you post your full ActiveMQ configuration ? Have you set persistent = false on the ActiveMQ broker? I think what is happening is that because you've turned off flow control, and only have allowed 20mb of memory to be used by the broker - your messages are being paged to disk in temporary storage. If persistent=false this shouldn't happen - but do enable flow control - it will help ;)

Rob Davies
  • 795
  • 6
  • 6