Return-Path: X-Original-To: apmail-activemq-dev-archive@www.apache.org Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B174D97B8 for ; Thu, 8 Dec 2011 23:28:06 +0000 (UTC) Received: (qmail 73572 invoked by uid 500); 8 Dec 2011 23:28:06 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 73541 invoked by uid 500); 8 Dec 2011 23:28:06 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 73533 invoked by uid 99); 8 Dec 2011 23:28:06 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Dec 2011 23:28:06 +0000 X-ASF-Spam-Status: No, hits=-2001.2 required=5.0 tests=ALL_TRUSTED,NORMAL_HTTP_TO_IP,RP_MATCHES_RCVD,WEIRD_PORT X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Dec 2011 23:28:02 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 9681C108499 for ; Thu, 8 Dec 2011 23:27:40 +0000 (UTC) Date: Thu, 8 Dec 2011 23:27:40 +0000 (UTC) From: "raghav rao (Commented) (JIRA)" To: dev@activemq.apache.org Message-ID: <108999561.55586.1323386860619.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (AMQ-2891) ActiveMQ takes longer to start with KahaDb and more than 10000 messages MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/AMQ-2891?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13165673#comment-13165673 ] raghav rao commented on AMQ-2891: --------------------------------- I am facing the same issue but the recommended solution does not work. I am embedding activeMQ in a process where producer and consumer are in the same process. The consumers can be turned off for long periods of time. When i re-start the process which has about 1.1 million persistent message( KahaDB directory around 14GB), it takes 479 seconds to bootup with fileQueueCursor and 113 seconds to bootup with storeCursor. Any ideas on how to speed up the bootup would be greatly appreciated!! Version: ActiveMQ 5.5.1 OS: CentOS 5.6 H/W: 24 core machine with 12 GB ram code snippet { BrokerService broker = new BrokerService(); brokerName = "somename"; broker.setBrokerName(brokerName); broker.setDataDirectory("/something"); brokerUrl = "vm://" + brokerName + "?marshal=false&broker.persistent=true"; broker.addConnector(brokerUrl); SystemUsage sm = broker.getSystemUsage(); sm.setSendFailIfNoSpace(true); // set broker memory and disk limits if( memoryLimit > 0 ) sm.getMemoryUsage().setLimit(memoryLimit); if( storageLimit > 0 ) sm.getStoreUsage().setLimit(storageLimit); if( tempStorageLimit > 0 ) sm.getTempUsage().setLimit(tempStorageLimit); // kahaDB settings for data recovery in case of corruption KahaDBPersistenceAdapter adapter = (KahaDBPersistenceAdapter) broker .getPersistenceAdapter(); adapter.setCheckForCorruptJournalFiles(true); adapter.setChecksumJournalFiles(true); adapter.setIgnoreMissingJournalfiles(true); PolicyMap policyMap = new PolicyMap(); PolicyEntry policy = new PolicyEntry(); StorePendingQueueMessageStoragePolicy storePolicy = new StorePendingQueueMessageStoragePolicy(); policy.setPendingQueuePolicy(storePolicy); policy.setProducerFlowControl(false); policyMap.setDefaultEntry(policy); broker.setDestinationPolicy(policyMap); // start the broker broker.start(); thanks, Raghav > ActiveMQ takes longer to start with KahaDb and more than 10000 messages > ----------------------------------------------------------------------- > > Key: AMQ-2891 > URL: https://issues.apache.org/jira/browse/AMQ-2891 > Project: ActiveMQ > Issue Type: Bug > Components: Broker > Affects Versions: 5.4.0 > Environment: Windows XP > Reporter: Dinny Mathew > Assignee: Gary Tully > > ActiveMQ takes around five minutes to start with KahaDb with more than 10000 messages. All messages are persistent queue. > With 500,000 persistent messsages, ittook around 20 minutes to start. > See the five minutes time difference between lines: > 2010-08-31 12:55:19,286 | INFO | PListStore:C:\ActiveMQ\apache-activemq-5.4.0\bin\win32\..\..\data\localhost\tmp_storage initialized | org.apache.activemq.store.kahadb.plist.PListStore | WrapperSimpleAppMain > 2010-08-31 13:03:56,983 | INFO | Listening for connections at: nio://S90356004630988:61616 | org.apache.activemq.transport.TransportServerThreadSupport | WrapperSimpleAppMain > From activemq.log with 100,000 messages > 2010-08-31 12:55:10,436 | INFO | JMX consoles can connect to service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi | org.apache.activemq.broker.jmx.ManagementContext | JMX connector > 2010-08-31 12:55:11,294 | INFO | KahaDB is version 2 | org.apache.activemq.store.kahadb.MessageDatabase | WrapperSimpleAppMain > 2010-08-31 12:55:11,435 | INFO | Recovering from the journal ... | org.apache.activemq.store.kahadb.MessageDatabase | WrapperSimpleAppMain > 2010-08-31 12:55:11,435 | INFO | Recovery replayed 1 operations from the journal in 0.063 seconds. | org.apache.activemq.store.kahadb.MessageDatabase | WrapperSimpleAppMain > 2010-08-31 12:55:12,090 | INFO | ActiveMQ 5.4.0 JMS Message Broker (localhost) is starting | org.apache.activemq.broker.BrokerService | WrapperSimpleAppMain > 2010-08-31 12:55:12,090 | INFO | For help or more information please see: http://activemq.apache.org/ | org.apache.activemq.broker.BrokerService | WrapperSimpleAppMain > 2010-08-31 12:55:12,278 | INFO | Scheduler using directory: activemq-data\scheduler | org.apache.activemq.broker.scheduler.SchedulerBroker | WrapperSimpleAppMain > 2010-08-31 12:55:19,286 | INFO | PListStore:C:\ActiveMQ\apache-activemq-5.4.0\bin\win32\..\..\data\localhost\tmp_storage initialized | org.apache.activemq.store.kahadb.plist.PListStore | WrapperSimpleAppMain > 2010-08-31 13:03:56,983 | INFO | Listening for connections at: nio://S90356004630988:61616 | org.apache.activemq.transport.TransportServerThreadSupport | WrapperSimpleAppMain > 2010-08-31 13:03:56,999 | INFO | Connector nio Started | org.apache.activemq.broker.TransportConnector | WrapperSimpleAppMain > 2010-08-31 13:03:57,045 | INFO | ActiveMQ JMS Message Broker (localhost, ID:S90356004630988-3777-1283273712137-0:0) started | org.apache.activemq.broker.BrokerService | WrapperSimpleAppMain > 2010-08-31 13:03:57,639 | INFO | Logging to org.slf4j.impl.JCLLoggerAdapter(org.eclipse.jetty.util.log) via org.eclipse.jetty.util.log.Slf4jLog | org.eclipse.jetty.util.log | WrapperSimpleAppMain > 2010-08-31 13:03:57,639 | INFO | jetty-7.0.1.v20091125 | org.eclipse.jetty.util.log | WrapperSimpleAppMain > 2010-08-31 13:03:58,451 | INFO | ActiveMQ WebConsole initialized. | org.apache.activemq.web.WebConsoleStarter | WrapperSimpleAppMain > 2010-08-31 13:03:58,857 | INFO | Initializing Spring FrameworkServlet 'dispatcher' | /admin | WrapperSimpleAppMain > 2010-08-31 13:03:59,341 | INFO | ActiveMQ Console at http://0.0.0.0:8161/admin | org.eclipse.jetty.util.log | WrapperSimpleAppMain > 2010-08-31 13:04:00,091 | INFO | Initializing Spring root WebApplicationContext | /camel | WrapperSimpleAppMain > 2010-08-31 13:04:02,668 | INFO | Connector vm://localhost Started | org.apache.activemq.broker.TransportConnector | WrapperSimpleAppMain > 2010-08-31 13:04:04,526 | INFO | Camel Console at http://0.0.0.0:8161/camel | org.eclipse.jetty.util.log | WrapperSimpleAppMain > 2010-08-31 13:04:04,589 | INFO | ActiveMQ Web Demos at http://0.0.0.0:8161/demo | org.eclipse.jetty.util.log | WrapperSimpleAppMain > 2010-08-31 13:04:04,651 | INFO | RESTful file access application at http://0.0.0.0:8161/fileserver | org.eclipse.jetty.util.log | WrapperSimpleAppMain > 2010-08-31 13:04:04,698 | INFO | Started SelectChannelConnector@0.0.0.0:8161 | org.eclipse.jetty.util.log | WrapperSimpleAppMain > 2 > With 500,000 messages, AMQ took 20 minutes to start. > 2010-08-31 15:24:31,178 | INFO | JMX consoles can connect to service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi | org.apache.activemq.broker.jmx.ManagementContext | JMX connector > 2010-08-31 15:24:31,975 | INFO | KahaDB is version 2 | org.apache.activemq.store.kahadb.MessageDatabase | WrapperSimpleAppMain > 2010-08-31 15:24:32,194 | INFO | Recovering from the journal ... | org.apache.activemq.store.kahadb.MessageDatabase | WrapperSimpleAppMain > 2010-08-31 15:24:32,194 | INFO | Recovery replayed 1 operations from the journal in 0.047 seconds. | org.apache.activemq.store.kahadb.MessageDatabase | WrapperSimpleAppMain > 2010-08-31 15:24:35,365 | INFO | ActiveMQ 5.4.0 JMS Message Broker (localhost) is starting | org.apache.activemq.broker.BrokerService | WrapperSimpleAppMain > 2010-08-31 15:24:35,365 | INFO | For help or more information please see: http://activemq.apache.org/ | org.apache.activemq.broker.BrokerService | WrapperSimpleAppMain > 2010-08-31 15:24:35,552 | INFO | Scheduler using directory: activemq-data\scheduler | org.apache.activemq.broker.scheduler.SchedulerBroker | WrapperSimpleAppMain > 2010-08-31 15:24:48,034 | INFO | PListStore:C:\ActiveMQ\apache-activemq-5.4.0\bin\win32\..\..\data\localhost\tmp_storage initialized | org.apache.activemq.store.kahadb.plist.PListStore | WrapperSimpleAppMain > 2010-08-31 15:45:09,767 | INFO | Listening for connections at: nio://S90356004630988:61616 | org.apache.activemq.transport.TransportServerThreadSupport | WrapperSimpleAppMain > 2010-08-31 15:45:09,767 | INFO | Connector nio Started | org.apache.activemq.broker.TransportConnector | WrapperSimpleAppMain > 2010-08-31 15:45:09,876 | INFO | ActiveMQ JMS Message Broker (localhost, ID:S90356004630988-3029-1283282675427-0:0) started | org.apache.activemq.broker.BrokerService | WrapperSimpleAppMain > 2010-08-31 15:45:10,923 | INFO | Logging to org.slf4j.impl.JCLLoggerAdapter(org.eclipse.jetty.util.log) via org.eclipse.jetty.util.log.Slf4jLog | org.eclipse.jetty.util.log | WrapperSimpleAppMain > 2010-08-31 15:45:10,923 | INFO | jetty-7.0.1.v20091125 | org.eclipse.jetty.util.log | WrapperSimpleAppMain > 2010-08-31 15:45:10,970 | INFO | Slow KahaDB access: cleanup took 1047 | org.apache.activemq.store.kahadb.MessageDatabase | ActiveMQ Journal Checkpoint Worker > 2010-08-31 15:45:11,829 | INFO | ActiveMQ WebConsole initialized. | org.apache.activemq.web.WebConsoleStarter | WrapperSimpleAppMain > 2010-08-31 15:45:12,235 | INFO | Initializing Spring FrameworkServlet 'dispatcher' | /admin | WrapperSimpleAppMain > 2010-08-31 15:45:12,719 | INFO | ActiveMQ Console at http://0.0.0.0:8161/admin | org.eclipse.jetty.util.log | WrapperSimpleAppMain > 2010-08-31 15:45:13,422 | INFO | Initializing Spring root WebApplicationContext | /camel | WrapperSimpleAppMain > 2010-08-31 15:45:16,390 | INFO | Connector vm://localhost Started | org.apache.activemq.broker.TransportConnector | WrapperSimpleAppMain > 2010-08-31 15:45:18,468 | INFO | Camel Console at http://0.0.0.0:8161/camel | org.eclipse.jetty.util.log | WrapperSimpleAppMain > 2010-08-31 15:45:18,561 | INFO | ActiveMQ Web Demos at http://0.0.0.0:8161/demo | org.eclipse.jetty.util.log | WrapperSimpleAppMain > 2010-08-31 15:45:18,624 | INFO | RESTful file access application at http://0.0.0.0:8161/fileserver | org.eclipse.jetty.util.log | WrapperSimpleAppMain > 2010-08-31 15:45:18,686 | INFO | Started SelectChannelConnector@0.0.0.0:8161 | org.eclipse.jetty.util.log | WrapperSimpleAppMain > Here is the config: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira