Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 24587 invoked from network); 15 Dec 2010 15:49:37 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 15 Dec 2010 15:49:36 -0000 Received: (qmail 90126 invoked by uid 500); 15 Dec 2010 15:49:36 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 89875 invoked by uid 500); 15 Dec 2010 15:49:36 -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 89867 invoked by uid 99); 15 Dec 2010 15:49:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Dec 2010 15:49:35 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of chubrilo@gmail.com designates 209.85.215.172 as permitted sender) Received: from [209.85.215.172] (HELO mail-ey0-f172.google.com) (209.85.215.172) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Dec 2010 15:49:30 +0000 Received: by eyd10 with SMTP id 10so1292883eyd.17 for ; Wed, 15 Dec 2010 07:49:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:content-type:content-transfer-encoding; bh=j4SVvngdnrTvKYZONxJyt4ISO7b81e5nwnCH8yOLi7I=; b=TSkuZQhco3bQdXeY6nA2D9uDxwfLQ7suP1ueFJRwTKgBQiZQlZci+2+0cjticcwR1H 8PofAMYfNf9i5Jm1y1nfo4sQnKUgI8HxqDhla2Gt+67D7lv8NpL3yjbXG0Fwi5P9QnK9 g+waqfNVf8O5vVExkFTQucV3c1E6Uie6pJXWk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=VLuJSAVBd8YjL0s+en5VUNA0ivAB3YsZ+p/Eed/nJWIJKezXBm4JHmsmrXbbTOgg5o 14mwBCWh8rYI0YZU3bOm/T+1SnCqb31WcqOMI0FNGKpzKcsDt9795hMIrwD/vQwp0HoS WGC+ihfGc9MIeD7nFOo/ZX6OqnicPg4/Cz+3s= MIME-Version: 1.0 Received: by 10.213.22.71 with SMTP id m7mr566024ebb.43.1292428149745; Wed, 15 Dec 2010 07:49:09 -0800 (PST) Sender: chubrilo@gmail.com Received: by 10.213.32.65 with HTTP; Wed, 15 Dec 2010 07:49:09 -0800 (PST) In-Reply-To: References: Date: Wed, 15 Dec 2010 16:49:09 +0100 X-Google-Sender-Auth: JuQm5AmM9vKJELXegYbiUSeaMvM Message-ID: Subject: Re: ActiveMQ consumer performance and scalability From: Dejan Bosanac To: users@activemq.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Hi, you can find some additional tips for performance tuning here: http://activemq.apache.org/performance-tuning.html and http://fusesource.com/wiki/display/ProdInfo/FUSE%20Message%20Broker%20Perfo= rmance%20Tuning%20Guide Cheers -- Dejan Bosanac ----------------- FuseSource - The experts in open source integration and messaging. Email: dejanb@fusesource.com Web: http://fusesource.com Twitter: =A0http://twitter.com/dejanb ActiveMQ in Action - http://www.manning.com/snyder/ Blog - http://www.nighttale.net On Wed, Dec 15, 2010 at 3:41 PM, Stanislaw Kogut wrote= : > Hello. > > I'm currently evaluating ActiveMQ as a message broker for our service. We > need scalable, transacted, low-latency message broker, but ActiveMQ shows > not very good results to me. > > Config: ActiveMQ 5.4.2 with nio:// transport, KahaDB persistence adapter = and > data directory on tmpfs filesystem (to get rid of disk performance impact= ). > > In details: With persistence enabled and commiting every message sent to > broker we have about 2k messages/s on producer side, and similar consumin= g > speed with one producing thread. > It also has good latency - about 5 milliseconds to deliver message, but 2= k > msg/s can be slow in future, so I'm trying to commit messages after some > count of them sent, for example after every 100 messages. This shows bett= er > throughput, about 10k messages/s, but now consumer side looks slow. Also, > latency is increased because time to fill this "100 messages" cap. > > Also, consumer side is not able to consume all these messages on this rat= e > and queue length grows. > > It is very possible also, I will have more than one producer for one queu= e > because of application design. I also test this scenario and producers ar= e > relatively fast, but consumer become very slow, receiving 1-2 messages pe= r > second. With enabled producer flow-control broker can stop producers and > serve consumer better, but it has very bad impact on latency as producer > should wait for broker to acknowledge messages, preventing new data from > being sent. > > > Is there is a way to consume messages from queue faster? I'm tried both > implementing MessageListener and MessageConsumer.receive(), but both show > same result. Usage of vmCursor or prefetching in broker makes no changes = to > situation. > > Also, is there any topology for distirbuting one ActiveMQ queue to more t= han > one machine without big latency impact to increase it's throughput? > > -- > Regards, > Stanislaw Kogut > Sistyma LLC >