Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 22891 invoked from network); 29 May 2008 06:11:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 May 2008 06:11:51 -0000 Received: (qmail 56499 invoked by uid 500); 29 May 2008 06:11:52 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 56481 invoked by uid 500); 29 May 2008 06:11:52 -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 56470 invoked by uid 99); 29 May 2008 06:11:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 May 2008 23:11:52 -0700 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of rajdavies@gmail.com designates 64.233.182.184 as permitted sender) Received: from [64.233.182.184] (HELO nf-out-0910.google.com) (64.233.182.184) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 May 2008 06:11:02 +0000 Received: by nf-out-0910.google.com with SMTP id g16so1540068nfd.16 for ; Wed, 28 May 2008 23:11:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to:in-reply-to:content-type:content-transfer-encoding:mime-version:subject:date:references:x-mailer; bh=79nT8LMu5ovlZOsUvEt7sWwExUuNR9gHk5V/QE3my9w=; b=bTFWggSp6tQxiFcIn3Wlg0W49NUUhf/pqB3QqoN4xUP/5uF9eUq8QsZaN7PNfwrJASrpmgNlE6+PBzFP6yj1wPLIziY7coy3ySs+TkN41yMC3S2R6pw8HHOzmEmYGMXVzteXWGR9lMyqf8TeXwFrBR2CwaA6TcUo1Qt97UNbwjk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:in-reply-to:content-type:content-transfer-encoding:mime-version:subject:date:references:x-mailer; b=kCv8kPJnFgBb1GUjkJXeNU2HwmDk/Fv0Zh1SuL4ZyswQlSeayNNMgbI9IIhQFwPYKRC7rWRQR+EUmI/npwkyrnIH6SinyoBAC/M/KsYneLxQRv8MeaaT3TNG2GJqBuLSTTZzbFTZ1WtvudX27AGDwI6hF5iNg4bSzb6hcu0zrVc= Received: by 10.210.59.14 with SMTP id h14mr2576002eba.13.1212041477433; Wed, 28 May 2008 23:11:17 -0700 (PDT) Received: from ?192.168.1.75? ( [86.133.81.234]) by mx.google.com with ESMTPS id 1sm422776nfv.18.2008.05.28.23.11.16 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 28 May 2008 23:11:16 -0700 (PDT) Message-Id: <8FD77796-3AF2-401B-B0EE-8FC9CEB11EAD@gmail.com> From: Rob Davies To: users@activemq.apache.org In-Reply-To: <17524607.post@talk.nabble.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v919.2) Subject: Re: Why producer to a queue or durable topic consumes a lot of CPU? Date: Thu, 29 May 2008 07:11:13 +0100 References: <17524607.post@talk.nabble.com> X-Mailer: Apple Mail (2.919.2) X-Virus-Checked: Checked by ClamAV on apache.org On 29 May 2008, at 00:57, janylj wrote: > > I had a single broker, which uses the default configuration. Then I > had a > Producer sending messages to a queue and a Consumer reading from the > queue. > At this time, the CPU usage on the broker is about 60%-70%. Because > the > broker is on a box with 2 Xeon processes each @ 1.86GHz, each > processor has > more than 50% idle. Then I added another Producer and Consumer to > the queue, > it drove the combined CPU usage over 100% and each processor only > had 30% > idle. I think mostly Producer is taking CPU resource, adding more > Consumer > doesn't seem to put much CPU load. > > Finally the message rate for one producer is about 4K message/ > second. While > the rate when having three producers simultaneously only is 1.5K > message/second each. > > The question is that whether it's expected from Activemq or > something I did > wrong. Also does it imply that adding more producer does not increase > throughput, if not decrease it? > > Thank you very much. > -- > View this message in context: http://www.nabble.com/Why-producer-to-a-queue-or-durable-topic-consumes-a-lot-of-CPU--tp17524607s2354p17524607.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. > There is a lot of work going on in the broker marshaling/unmarshaling messages, adding them to an index in store etc - you will hit a plateau where you won't increase overall throughput by adding more producers. From your example, the overall throughput has increased from 4k msg/sec to 4.5k msg/sec by using 3 producers instead of 1 - so you haven't quite reached that point yet - but your close. We will be looking at increasing throughput and reducing cpu for version 6.0 - which will be due out later this year. cheers, Rob http://open.iona.com/products/enterprise-activemq http://rajdavies.blogspot.com/