Return-Path: X-Original-To: apmail-directory-dev-archive@www.apache.org Delivered-To: apmail-directory-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 CF61A8417 for ; Wed, 10 Aug 2011 04:47:07 +0000 (UTC) Received: (qmail 99192 invoked by uid 500); 10 Aug 2011 04:47:04 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 98927 invoked by uid 500); 10 Aug 2011 04:46:47 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 98881 invoked by uid 99); 10 Aug 2011 04:46:42 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Aug 2011 04:46:42 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of elecharny@gmail.com designates 74.125.82.52 as permitted sender) Received: from [74.125.82.52] (HELO mail-ww0-f52.google.com) (74.125.82.52) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Aug 2011 04:46:35 +0000 Received: by wwe6 with SMTP id 6so570531wwe.33 for ; Tue, 09 Aug 2011 21:46:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=qjfgUXgWkEi9lII9lBMpqbnp1C22+GO1kCGzaOemAD0=; b=kMyThgZOrnKT5G/aXlBNOliev/0vvUCwiBpgpGNk1wtft2okEoh/t1AuYFWx/hDH2r sufjVeiPcUU8Z06jmiHVVrKNME1k/ZzSfltYDBuJcVjBJDIKAydsK/cmJNs/cA4A2n/U xPNOZDW+MW7U3tC1hBrfi4hKK6vv+QsvWFY7k= Received: by 10.216.167.66 with SMTP id h44mr342323wel.21.1312951573863; Tue, 09 Aug 2011 21:46:13 -0700 (PDT) Received: from emmanuel-lecharnys-MacBook-Pro.local (ran75-1-78-192-106-184.fbxo.proxad.net [78.192.106.184]) by mx.google.com with ESMTPS id w48sm334102wec.25.2011.08.09.21.46.12 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 09 Aug 2011 21:46:12 -0700 (PDT) Message-ID: <4E420D13.2000608@gmail.com> Date: Wed, 10 Aug 2011 06:46:11 +0200 From: Emmanuel Lecharny Reply-To: elecharny@apache.org User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: Apache Directory Developers List Subject: Re: Replication tests : memory leak References: <4E416E32.60407@gmail.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 8/9/11 9:57 PM, Kiran Ayyagari wrote: > On Tue, Aug 9, 2011 at 10:58 PM, Emmanuel Lecharny wrote: >> Hi, >> >> I tried to launch a test with 10000 modifications (modDn test) to see what >> could happen, but the test fails after a few thousands loops (around 4000). >> I started a profiling session, and I saw that the memory is quickly consumed >> and never released. >> >> I tested with 128M, 256M and 512M, the only difference is the number of >> loops we can do. >> >> When we reach the memory limit, the GC start to kick hard and so does the >> CPU. I have beautiful curves on VisualVM ! >> >> We do have a memory leak somewhere, we now have to find where ! IMO, it >> seems that the ActiveMQ queues are storing refs in memory, and aren't >> cleaned when we pick a message. To be checked. >> > I think this is quite likely the scenario cause we use in-vm transport > for communicating with queues I tried to configure ActiveMQ to use what they call File Based Cursor, with no success (http://activemq.apache.org/how-do-i-configure-activemq-to-hold-100s-of-millions-of-queue-messages-.html) Here is the code I added : ... // Create the system responsible for transmitting the requests when // the direct connection to the consumer is closed. brokerService = new BrokerService(); brokerService.setUseJmx( false ); brokerService.setPersistent( true ); brokerService.setDataDirectory( path ); PolicyMap policyMap = new PolicyMap(); // The Topic policyEntry PolicyEntry topicPolicyEntry = new PolicyEntry(); topicPolicyEntry.setTopic( ">" ); topicPolicyEntry.setProducerFlowControl( true ); // Limit memory used to 1M topicPolicyEntry.setMemoryLimit( 1000000L ); PendingSubscriberMessageStoragePolicy pendingSubscriberPolicy = new FilePendingSubscriberMessageStoragePolicy(); topicPolicyEntry.setPendingSubscriberPolicy( pendingSubscriberPolicy ); policyMap.put( topicPolicyEntry.getDestination(), topicPolicyEntry ); // The Queue policyEntry PolicyEntry queuePolicyEntry = new PolicyEntry(); queuePolicyEntry.setTopic( ">" ); queuePolicyEntry.setProducerFlowControl( true ); // Limit memory used to 1M queuePolicyEntry.setMemoryLimit( 1000000L ); PendingQueueMessageStoragePolicy pendingQueuePolicy = new FilePendingQueueMessageStoragePolicy(); queuePolicyEntry.setPendingQueuePolicy( pendingQueuePolicy ); policyMap.put( queuePolicyEntry.getDestination(), queuePolicyEntry ); brokerService.setDestinationPolicy( policyMap ); ... Didn't changed anything. My understanding of ActiveMQ configuration is *very* limited, so it needs some more love from someone who knows how this configuration works. -- Regards, Cordialement, Emmanuel Lécharny www.iktek.com