activemq-users mailing list archives

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

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)
are:

Producer:
        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.
        
Consumer:
        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="http://activemq.org/config/1.0"> 
	
	<amq:broker brokerName="brokerJdbcConfig" persistent="true" useShutdownHook="true" deleteAllMessagesOnStartup="false"
useJmx="false">
		
		<amq:memoryManager>  
			<amq:usageManager id="memory-manager" limit="1048576"/>
		</amq:memoryManager> 		
		
		<amq:transportConnectors>
			<amq:transportConnector uri="tcp://localhost:61616"/>
		</amq:transportConnectors>
		
		<amq:persistenceAdapter>
			<amq:jdbcPersistenceAdapter>
				<property name="cleanupPeriod" value="60000"/>
				<property name="dataSource" ref="postgres-ds"/>
			</amq:jdbcPersistenceAdapter>
		</amq:persistenceAdapter>
	</amq:broker>
	
	<!-- ==================================================================== -->
	<!-- 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://127.0.0.1/jms</value></property>
		<property name="username"><value>jms</value></property>
		<property name="password"><value>jms</value></property>
	</bean>
</beans>

<!-- END SNIPPET: xbean -->


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