Return-Path: X-Original-To: apmail-activemq-users-archive@www.apache.org Delivered-To: apmail-activemq-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CB69975B9 for ; Wed, 21 Dec 2011 09:51:58 +0000 (UTC) Received: (qmail 5397 invoked by uid 500); 21 Dec 2011 09:51:58 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 5362 invoked by uid 500); 21 Dec 2011 09:51:58 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 5354 invoked by uid 99); 21 Dec 2011 09:51:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Dec 2011 09:51:58 +0000 X-ASF-Spam-Status: No, hits=2.4 required=5.0 tests=NO_RDNS_DOTCOM_HELO,SPF_NEUTRAL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: 216.145.54.171 is neither permitted nor denied by domain of harishs@yahoo-inc.com) Received: from [216.145.54.171] (HELO mrout1.yahoo.com) (216.145.54.171) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Dec 2011 09:51:53 +0000 Received: from EGL-EX07CAS03.ds.corp.yahoo.com (egl-ex07cas03.eglbp.corp.yahoo.com [203.83.248.219]) by mrout1.yahoo.com (8.14.4/8.14.4/y.out) with ESMTP id pBL9pMNY008985; Wed, 21 Dec 2011 01:51:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yahoo-inc.com; s=cobra; t=1324461083; bh=31GoJI+D9Jtw/nr32IP2OMXVCNHGun9YdhyCDO4dOD4=; h=From:To:CC:Date:Subject:Message-ID:References:In-Reply-To: Content-Type:Content-Transfer-Encoding:MIME-Version; b=Cw6Bt1VK0q4Q1rMs02Zh2evGpY/zeUEJxyOzqsjCg/ldxcUPdFsq8YSJmrH5jVnHp eyzqzIySBWLGLxSwglD75Lyy3QPbchyYdCuinzVb/CWS1ncGGUpauCNmYU1b/blnsq wG93SZXXF16hYmbsRBhX0NKUTgmSx3SBTSYsll5Y= Received: from EGL-EX07VS01.ds.corp.yahoo.com ([203.83.248.205]) by EGL-EX07CAS03.ds.corp.yahoo.com ([203.83.248.219]) with mapi; Wed, 21 Dec 2011 15:21:21 +0530 From: Harish Sharma To: "users@activemq.apache.org" CC: "torsten@fusesource.com" Date: Wed, 21 Dec 2011 15:21:21 +0530 Subject: Re: Backlog data causes producer to slow down. Thread-Topic: Backlog data causes producer to slow down. Thread-Index: Acy/xhgbdAT19GvmSLWnCdqZPPmsDA== Message-ID: References: <924C8723-0E88-43C0-82CD-2870DDC7E90B@yahoo-inc.com> <9C3D04DB-9989-4134-8DB1-6B2CD369D763@fusesource.com> In-Reply-To: <9C3D04DB-9989-4134-8DB1-6B2CD369D763@fusesource.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Hi Torsten, yea i tried with optimizedDispatch=3D"false" also. And i am using queue.=20 Here is my kahaDb settings : =20 And i also tried with enableIndexWriteAsync=3D"false" but nothing changes = much. Also when i ran profiler then i found out when the consumer starts for the = first time the producer thread goes in to waiting state for the lock on the= AbstractQueuedSynchronizer ( the queue it is supposed to write in). Actually the problem is the degradation in message production rate . I can = work with low production rate but what is happening is due to consumers reg= ularly going up and down the production rate actually goes to near Zero val= ue. Right now i am using Vmconnector for both producer and consumer.Do you have= any suggestion here.What is the best choice .( I am thinking of using NIO = for producers). T&R Harish Sharma On Dec 21, 2011, at 2:43 PM, Torsten Mielke wrote: > Hard to say what exactly the problem is. In the past I got to learn the o= ptimizedDispatch=3D"true" isn't always a good choice. Can you try without i= t? >=20 > In addition I recently found that enableIndexWriteAsync=3D"true" on your = kahadb config may not bring any performance improvement. Not sure if you ha= ve set this. >=20 > Also does your test involve queue or topic messages? >=20 >=20 > Torsten Mielke > torsten@fusesource.com > tmielke@blogspot.com >=20 >=20 >=20 > On Dec 20, 2011, at 10:37 AM, Harish Sharma wrote: >=20 >> Hi, >> I tried to reply to http://activemq.2283324.n4.nabble.com/Backlog-data-c= auses-producers-to-slow-down-tt3806018.html post . Because i am facing simi= lar issue. >> Whenever my consumer goes down and there is a data back log the producti= on rate goes down significantly. >> Moreover when my consumer is up again , the production rate goes down ag= ain and this cycle repeats itself. >> Some Info : >> I am using ActiveMQ 5.5.1 , KahaDB message store, Producer flow control= =3D FALSE , AsyncSend(true) , persistence =3D true and ConcurrentQueueStor= eAndDispatch =3D true and false (tried both does not make much difference) >> As i read in this post about cursors so i am using the default store cur= sor. >>=20 >> Here is snippet from broker.xml >> destinationPolicy> >> >> >> " optimizedDispatch=3D"true" memoryLimit= =3D"1gb" producerFlowControl=3D"false" /> >> " optimizedDispatch=3D"true" memoryLimit= =3D"1gb" producerFlowControl=3D"false" /> >> >> >> >>=20 >> >> >> >> >> >> >> >> >> >> >> >> >> >>=20 >> I am using all the optimizations(i read from http://fusesource.com/docs/= broker/5.4/tuning/index.html ) >> for producer , consumer and broker. >> These optimizations are able to increase message production rate a bit b= ut the main issue is the stability of the production rate.(why it goes down= 10 times and then keep on going down with every time consumers goes down o= r goes up again). >> I am trying to figure out the cause but unable to pinpoint the code in a= ctiveMQ which is causing this issue. >> When i saw threads state in jconsole i found out that as soon as consume= r start running , producer thread goes into wait state ( State: WAITING on = java.util.concurrent.locks.AbstractQueuedSynchronizer ).I understand the qu= eue these producers write to is blocking queue.But i don't understand why = consumers are affecting producers while flow control is off and my store s= ize is 500 GB and memory is 20GB .Why not producers are producing at a cons= tant rate until my KahaDB store is full. >>=20 >> I really need help in this matter and deeply appreciate any help from yo= u guys. >>=20 >> Thanks & Regards >> Harish Sharma >=20 >=20 >=20 >=20 T&R Harish Sharma