Return-Path: Delivered-To: apmail-camel-users-archive@www.apache.org Received: (qmail 41501 invoked from network); 9 Dec 2010 13:07:35 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 9 Dec 2010 13:07:35 -0000 Received: (qmail 90103 invoked by uid 500); 9 Dec 2010 13:07:35 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 89744 invoked by uid 500); 9 Dec 2010 13:07:34 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 89736 invoked by uid 99); 9 Dec 2010 13:07:33 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Dec 2010 13:07:33 +0000 X-ASF-Spam-Status: No, hits=1.5 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,NORMAL_HTTP_TO_IP,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of iocanel@gmail.com designates 209.85.160.173 as permitted sender) Received: from [209.85.160.173] (HELO mail-gy0-f173.google.com) (209.85.160.173) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Dec 2010 13:07:26 +0000 Received: by gye5 with SMTP id 5so1510407gye.32 for ; Thu, 09 Dec 2010 05:07:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=xRpL/ELdbMhI6waF88zByhfgcoJJE6axz5PslyFKLLw=; b=bKCG0u6gmceB37MEWaBiseHL1mPRnsfaWFwDiAvY397Qh426QFXbnzjnhMRqZA6g3v j8jVwu2IHREwjoJ9zOQeRFnlRr/e9vl0mBdfSPXvDvBASOKdsnH1+LvvGP0fgpwRPTj7 ksCmrgMl1LCG6rCZ5kGfxvh0p60rHqsuNTbTY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=iWRh3ddGoIld9LHIY8uJyRe1veAhtmdN9LvZXnrD0VKT91PWtPs5blBFpvXyP1ge7E sPIRTp/L5w5X6Kdx7yF1z2CtIFQjof12AgCimKJq4izYlAXmfdIMX9GbVkW9j7KtQeRf 2xJ9imAqlO6LiytVANkhPJHcW8BnKbsG33VX0= MIME-Version: 1.0 Received: by 10.42.219.198 with SMTP id hv6mr913046icb.446.1291900025107; Thu, 09 Dec 2010 05:07:05 -0800 (PST) Received: by 10.231.117.86 with HTTP; Thu, 9 Dec 2010 05:07:05 -0800 (PST) In-Reply-To: References: Date: Thu, 9 Dec 2010 15:07:05 +0200 Message-ID: Subject: Re: Performance issues when using camel-activemq and transactions. From: Ioannis Canellos To: users@camel.apache.org Content-Type: multipart/alternative; boundary=20cf3054961114faf10496f9ea5f X-Virus-Checked: Checked by ClamAV on apache.org --20cf3054961114faf10496f9ea5f Content-Type: text/plain; charset=ISO-8859-1 Hi Claus, Here are the results of the tests I run: Producer Only: 10msg/sec (transacted=true) / 2800 msg/sec (transacted=false). Consumer Only: 10msg/sec transacted=true) / ~500 msg/sec (transacted=false). The results of the mixed is the ones I initially posted. The difference is so big and I have tried almost everything, but whenever I set "transacted=true" there is nothing on earth that can give me the slightest performance increase. On Thu, Dec 9, 2010 at 11:47 AM, Claus Ibsen wrote: > When using transacted=true then the commit is sync, and thus the > consumer side is impacted. > > So you should be able to send as fast as you can. But the consumer > side is slower due the begin/commit pair in the transaction is > synchronous. > > If you use camel-jms on the consumer side to consume and process the > messages, then its based on top of Spring JMS. > And all the logic and code is synchronous and thus slower. > > Maybe you can do 3 performance tests. > a - send only to the queue > b - consume only from the queue (the queue is preloaded) > c - both send and consume at the same time > > > > On Thu, Dec 9, 2010 at 10:28 AM, Ioannis Canellos > wrote: > > I think that when I set "transacted=true" then it ignores the property > > "useAsyncSend=true" set on the connection factory. > > > > I am not sure if those two properties can be used together, but they > > probably can't and this why I have performance issues. > > > > > > On Tue, Dec 7, 2010 at 3:46 PM, Ioannis Canellos > wrote: > > > >> I will do so. > >> > >> I will also check the tx scenarios described in the "Camel in Action". > >> > >> > >> > >> On Tue, Dec 7, 2010 at 3:36 PM, Claus Ibsen > wrote: > >> > >>> Check some of the TX unit tets in camel-jms and compare notes. > >>> > >>> > >>> On Tue, Dec 7, 2010 at 2:20 PM, Ioannis Canellos > >>> wrote: > >>> > Hi Claus, > >>> > > >>> > thanks for your response. > >>> > > >>> > I had the luck to watch that webinar and I also have the slides, the > do > >>> help > >>> > in increasing the overall performance. But when I set > transaction=true > >>> on > >>> > the activemq component, the performance can degrade form 2000 msg/sec > to > >>> 5 > >>> > msg/sec. > >>> > > >>> > Regarding the number of connections, even if I increase it to 10, 20 > or > >>> more > >>> > I don't see any difference at all. > >>> > > >>> > I feel that the problem is in my camel configuration (not activemq) > >>> since I > >>> > didn't have issues when I was use servicemix and activemq. > >>> > > >>> > Thanks again! > >>> > > >>> > On Tue, Dec 7, 2010 at 3:08 PM, Claus Ibsen > >>> wrote: > >>> > > >>> >> Ask at AMQ forum as its generally how to optimize and setup AMQ. > >>> >> > >>> >> Also check out maybe some of the webinars by Rob Davies on advanced > >>> >> and high performance AMQ stuff > >>> >> The webinars is avail at fusesource website. > >>> >> > >>> >> And it looks like you only got 1 connection in your pool? > >>> >> maxConnections=1 > >>> >> > >>> >> > >>> >> > >>> >> On Mon, Nov 29, 2010 at 10:38 AM, Ioannis Canellos < > iocanel@gmail.com> > >>> >> wrote: > >>> >> > I am using camel 2.5.0 and activemq 5.4.0 to create a simple route > of > >>> the > >>> >> > form dataset -> activemq:queue.in -> activemq:queue.out -> > dataset. > >>> >> > All are working fine and I the performance is more than 1K > >>> messages/sec. > >>> >> > > >>> >> > However if I set transactions=true on the activemq component > >>> >> configuration, > >>> >> > then I experience serious performance issues (5 messages/sec). > >>> >> > > >>> >> > I am testing using camel:run maven plugin. My configuration is the > >>> >> > following: > >>> >> > > >>> >> > >>> >> > xmlns="http://www.springframework.org/schema/beans" > >>> >> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > >>> >> > xmlns:amq="http://activemq.apache.org/schema/core" > >>> >> > xmlns:camel="http://camel.apache.org/schema/spring" > >>> >> > xmlns:context=" > http://www.springframework.org/schema/context" > >>> >> > xmlns:aop="http://www.springframework.org/schema/aop" > >>> >> > xsi:schemaLocation=" > >>> http://www.springframework.org/schema/beans > >>> >> > http://www.springframework.org/schema/beans/spring-beans-2.0.xsd > >>> >> > http://activemq.apache.org/schema/core > >>> >> > http://activemq.apache.org/schema/core/activemq-core.xsd > >>> >> > http://www.springframework.org/schema/context > >>> >> > > http://www.springframework.org/schema/context/spring-context-3.0.xsd > >>> >> > http://www.springframework.org/schema/aop > >>> >> > http://www.springframework.org/schema/aop/spring-aop-3.0.xsd > >>> >> > http://camel.apache.org/schema/spring > >>> >> > http://camel.apache.org/schema/spring/camel-spring.xsd"> > >>> >> > > >>> >> > > >>> >> > >>> >> > > >>> >> > >>> > class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/> > >>> >> > > >>> >> > > >>> >> > >>> >> > brokerName="localhost" dataDirectory="data" > >>> >> > useJmx="true" persistent="true" > advisorySupport="false"> > >>> >> > > >>> >> > > >>> >> > > >>> >> > producerFlowControl="false" > >>> >> > optimizedDispatch="true"> > >>> >> > > >>> >> > > >>> >> > > >>> >> > > >>> >> > > >>> >> > > >>> >> > > >>> >> > > >>> >> > > >>> >> > >>> enableIndexWriteAsync="true"/> > >>> >> > > >>> >> > > >>> >> > > >>> >> > > >>> >> > > >>> >> > > >>> >> > > >>> >> > > >>> >> > >>> >> > id="messaging" depends-on="broker"> > >>> >> > > >>> >> > > >>> >> > > >>> >> > > >>> >> > > >>> >> > > >>> >> > > >>> >> > >>> >> > class="org.apache.activemq.camel.component.ActiveMQComponent"> > >>> >> > >>> ref="pooledConnectionFactory"/> > >>> >> > > >>> >> > >>> >> value="AUTO_ACKNOWLEDGE"/> > >>> >> > > >>> >> > > >>> >> > > >>> >> > > >>> >> > >>> >> > class="org.apache.activemq.ActiveMQConnectionFactory"> > >>> >> > > >>> >> > > >>> >> > > >>> >> > > >>> >> > >>> >> > class="org.apache.activemq.pool.PooledConnectionFactory"> > >>> >> > ref="connectionFactory"/> > >>> >> > > >>> >> > > >>> >> > > >>> >> > > >>> >> > > >>> >> > >>> >> > class="org.apache.camel.component.dataset.SimpleDataSet"> > >>> >> > > >>> >> > > >>> >> > > >>> >> > > >>> >> > >>> >> > class="org.jencks.factory.TransactionManagerFactoryBean"/> > >>> >> > > >>> >> > > >>> >> > > >>> >> > -- > >>> >> > *Ioannis Canellos* > >>> >> > http://iocanel.blogspot.com > >>> >> > Integration Engineer @ Upstream S.A. < > http://www.upstreamsystems.com > >>> > > >>> >> > > >>> >> > >>> >> > >>> >> > >>> >> -- > >>> >> Claus Ibsen > >>> >> ----------------- > >>> >> FuseSource > >>> >> Email: cibsen@fusesource.com > >>> >> Web: http://fusesource.com > >>> >> Twitter: davsclaus > >>> >> Blog: http://davsclaus.blogspot.com/ > >>> >> Author of Camel in Action: http://www.manning.com/ibsen/ > >>> >> > >>> > > >>> > > >>> > > >>> > -- > >>> > *Ioannis Canellos* > >>> > http://iocanel.blogspot.com > >>> > > >>> > Integration Engineer @ Upstream S.A. > > >>> > > >>> > >>> > >>> > >>> -- > >>> Claus Ibsen > >>> ----------------- > >>> FuseSource > >>> Email: cibsen@fusesource.com > >>> Web: http://fusesource.com > >>> Twitter: davsclaus > >>> Blog: http://davsclaus.blogspot.com/ > >>> Author of Camel in Action: http://www.manning.com/ibsen/ > >>> > >> > >> > >> > >> -- > >> *Ioannis Canellos* > >> http://iocanel.blogspot.com > >> > >> Integration Engineer @ Upstream S.A. > >> > >> > >> > > > > > > -- > > *Ioannis Canellos* > > http://iocanel.blogspot.com > > > > Integration Engineer @ Upstream S.A. > > > > > > -- > Claus Ibsen > ----------------- > FuseSource > Email: cibsen@fusesource.com > Web: http://fusesource.com > Twitter: davsclaus > Blog: http://davsclaus.blogspot.com/ > Author of Camel in Action: http://www.manning.com/ibsen/ > -- *Ioannis Canellos* http://iocanel.blogspot.com Integration Engineer @ Upstream S.A. --20cf3054961114faf10496f9ea5f--