activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Leeson <>
Subject Re: Out of Memory - RC2
Date Fri, 14 Apr 2006 09:22:33 GMT

were having a similar out of memory problem with RC2 with the JVM
Hosting ActiveMQ running out of memory after 3-4 hours.

The basic configuration we have is:

  1) Embedded ActiveMQ within 1 JVM (activemq config below).
	The Maximum Memory Allocated ti JVM is 64MB.
  2) One consumer of a Queue in another JVM (does some work
	with the message and with other objects in the DB).
  3) One producer in separate JVM Posting messages to a Queue
	as fast as it can, messages have a time-to-live value
	of 60 seconds.

The performance figures I have (as part of worst-case-scenario testing)

        Sent 488,872 messages at last check before crash.
        Average throughput of 2586 1K text messages per minute.
        Minimum post time to bus 2ms.
        Maximum post time to bus 7621 ms.
        Average post time to bus 13 ms.
        Maximum consumption rate of 74 messages a minute.
        Average consumption rate of 62 messages a minute.
        Average time to consume 1 message 1054 ms.
        Minimum time to consumer 1 message 433 ms.
        Maximum time to consume 1 message 13940 ms.

The number of messages in the activemq_msgs table was on average 3730,
although this would go as low as 700 when the purging of messages when
they timed out occurred.

>>From some profiling snapshots a lot of time/memory seems to be spent in
the IndirectMessageReference class.

I hope this is helpful. 

Gary Leeson.
Senior Engineer/Architect.
Riomhaire Research Ltd.

============================== activemq.xml ============================

<beans xmlns:amq=""> 
	<amq:broker brokerName="brokerJdbcConfig" persistent="true" useShutdownHook="true" deleteAllMessagesOnStartup="false"
			<amq:usageManager id="memory-manager" limit="1048576"/>
			<amq:transportConnector uri="tcp://localhost:61616"/>
				<property name="cleanupPeriod" value="60000"/>
				<property name="dataSource" ref="postgres-ds"/>
	<!-- ==================================================================== -->
	<!-- JDBC DataSource Configurations -->
	<!-- ==================================================================== -->
	<!-- The Datasource that will be used by the Broker -->
	<!-- Postgres DataSource Sample Setup -->
	<bean id="postgres-ds" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
		<property name="driverClassName"><value>org.postgresql.Driver</value></property>
		<property name="url"><value>jdbc:postgresql://</value></property>
		<property name="username"><value>jms</value></property>
		<property name="password"><value>jms</value></property>

<!-- END SNIPPET: xbean -->

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