Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 52736 invoked from network); 24 Nov 2010 18:23:17 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 24 Nov 2010 18:23:17 -0000 Received: (qmail 74253 invoked by uid 500); 24 Nov 2010 18:23:49 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 74227 invoked by uid 500); 24 Nov 2010 18:23:49 -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 74219 invoked by uid 99); 24 Nov 2010 18:23:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Nov 2010 18:23:49 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Nov 2010 18:23:48 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id oAOINRPZ003229 for ; Wed, 24 Nov 2010 18:23:28 GMT Message-ID: <25011870.12661290623007124.JavaMail.jira@thor> Date: Wed, 24 Nov 2010 13:23:27 -0500 (EST) From: "Adam Sussman (JIRA)" To: dev@activemq.apache.org Subject: [jira] Commented: (AMQ-3028) ActiveMQ broker processing slows with consumption from large store In-Reply-To: <949680.501289420059623.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: ae95407df07c98740808b2ef9da0087c [ https://issues.apache.org/activemq/browse/AMQ-3028?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=63516#action_63516 ] Adam Sussman commented on AMQ-3028: ----------------------------------- Are you saying their solution isn't good enough? > ActiveMQ broker processing slows with consumption from large store > ------------------------------------------------------------------ > > Key: AMQ-3028 > URL: https://issues.apache.org/activemq/browse/AMQ-3028 > Project: ActiveMQ > Issue Type: Bug > Components: Broker > Affects Versions: 5.4.1 > Environment: CentOS 5.5, Sun JDK 1.6.0_21-b06 64 bit, ActiveMQ 5.4.1, AMD Athlon(tm) II X2 B22, local disk > Reporter: Arthur Naseef > Assignee: Dejan Bosanac > Priority: Critical > Fix For: 5.5.0 > > Attachments: LRUCache.patch > > > In scalability tests, this problem occured. I have tested a workaround that appears to function. A fix will gladly be submitted - would like some guidance, though, on the most appropriate solution. > Here's the summary. Many more details are available upon request. > Root cause: > - Believed to be simultaneous access to LRUCache objects which are not thread-safe (PageFile's pageCache) > Workaround: > - Synchronize the LRUCache on all access methods (get, put, remove) > The symptoms are as follows: > 1. Message rates run fairly-constant until a point in time when they degrade rather quickly > 2. After a while (about 15 minutes), the message rates drop to the floor - with large numbers of seconds with 0 records passing > 3. Using VisualVM or JConsole, note that memory use grows continuosuly > 4. When message rates drop to the floor, the VM is spending the vast majority of its time performing garbage collection > 5. Heap dumps show that LRUCache objects (the pageCache members of PageFile's) are far exceeding their configured limits. > The default limit was used, 10000. A size of over 170,000 entries was reached. > 6. No producer flow control occurred (did not see the flow control log message) > Test scenario used to reproduce: > - Fast producers (limited to <= 1000 msgs/sec) > -- using transactions > -- 10 msg per transaction > -- message content size 177 bytes > - Slow consumers (limited to <= 10 msg/sec) > -- auto-acknowledge mode; not transacted > - 10 Queues > -- 1 producer per queue > -- 1 consumer per queue > - Producers, Consumers, and Broker all running on different systems, and on the same system (different test runs). > Note that disk space was not an issue - there was always plenty of disk space available. > One other interesting note - once a large database of records was stored in KahaDB, only running consumers, this problem still occurred. > This issue sounds like it may be related to 1764, and 2721. The root cause sounds the same as 2290 - unsynchronized access to LRUCache. > The most straight-forward solution is to modify all LRUCache objects (org.apache.kahadb.util.LRUCache, org.apache.activemq.util.LRUCache, ...) to be concurrent. Another is to create concurrent versions (perhaps ConcurrentLRUCache) and make use of those at least in PageFile.pageCache. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.