Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 40017 invoked from network); 28 Apr 2009 15:12:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 28 Apr 2009 15:12:43 -0000 Received: (qmail 70704 invoked by uid 500); 28 Apr 2009 15:12:43 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 70668 invoked by uid 500); 28 Apr 2009 15:12:43 -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 70658 invoked by uid 99); 28 Apr 2009 15:12:43 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Apr 2009 15:12:43 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of gary.tully@gmail.com designates 209.85.218.173 as permitted sender) Received: from [209.85.218.173] (HELO mail-bw0-f173.google.com) (209.85.218.173) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Apr 2009 15:12:33 +0000 Received: by bwz21 with SMTP id 21so743059bwz.38 for ; Tue, 28 Apr 2009 08:12:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=nnQGQEEmS/HAQnUoWhMhmCm/0tDICk0F/NTw7OHQlgQ=; b=bty0NWZuXBmDDTzTXS6wM9IytcmhSWeoD1BDIJ0Jq+14HN/7hCDtOpo3a9j1tC0xnL grgwgAe/ziK5h+0fSgW7vFGzJCXLfcdRbIo6jkA675CAsUBH9Iaep7GcoiIPfRzhqTq8 7H8H1nbrLVIt8GuEhyPbK/boWuYcNDyl5AQ4E= 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=cnBKqUIxXbv8pfxZRRGEx+hxGVClvCnF0E2XiQ+uxRfeOUok8ZVO3qA4hTeRBVMgEd H1HTw3xEsV1GaCTlPSLHrx5K/KU+eTs42djyPg5pojF1IQdNpq0Iq+7z2vG+UznPRq7+ A6Ml55Mu2ng8R2DHrtcO8aedsD6Kr2hel00LI= MIME-Version: 1.0 Received: by 10.103.24.11 with SMTP id b11mr4047539muj.76.1240931531745; Tue, 28 Apr 2009 08:12:11 -0700 (PDT) In-Reply-To: <74e15baa0904280607y2165fdber2776e418e5ba8138@mail.gmail.com> References: <74e15baa0904272004m4d7d39faj5710bb771eb0723b@mail.gmail.com> <74e15baa0904280607y2165fdber2776e418e5ba8138@mail.gmail.com> Date: Tue, 28 Apr 2009 16:12:11 +0100 Message-ID: <3a73c17c0904280812l6ca714e7x3b538d6842ebcc75@mail.gmail.com> Subject: Re: Performance of high number of topics or selectors From: Gary Tully To: users@activemq.apache.org Content-Type: multipart/alternative; boundary=0016e65a0dc423e9da04689ee338 X-Virus-Checked: Checked by ClamAV on apache.org --0016e65a0dc423e9da04689ee338 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit There are some hard limits in terms of fds and memory utilisation both for destinations and connections. The simplest approach to achieve scalability at these levels (100k topics) is to divide and conquer using a network of brokers and a random broker connection strategy. In this way the topics will be dispersed across the brokers in the network with cross talk and duplication happening where there producers and consumers are on separate brokers. To avoid the cross talk, you could further partition the network of brokers using exclusion filters and provide a location mechanism that can identify the broker for a particular topic. 2009/4/28 Aaron Mulder > Well, the send to everyone and manually filter turned out to be a > really bad idea -- I guess the message gets copied too many times or > whatever. It gets an OOM error with a 512 MB heap for 10,000 clients. > So I'm still looking for a better way, whether it be general approach > or tuning to handle high number of selectors or topics. > > Thanks, > Aaron > > On Mon, Apr 27, 2009 at 11:04 PM, Aaron Mulder > wrote: > > Let's say I have 100,000 stock tickers (or whatever) I want to track, > > each with a separate client. > > > > There seem to be two approaches -- putting them all in one topic and > > having each of the clients use a selector (ticker equivalent in a > > header property), or putting messages for each header on it's own > > topic and subscribing each consumer to one dedicated topic. > > > > When I try this, the performance stinks. With the selector approach > > it takes as long as like 10 minutes for 100,000 clients to connect > > (using the VM transport), I need more than 256 MB of heap (512 was > > fine but 384 might have been OK), and the message send/receive time > > seems to go up more or less linearly with the number of clients (like, > > .5 seconds for 1000 clients, 5s for 10,000 clients, 75s for 100,000 > > clients, all for 1000 messages). My actual selector used two header > > properties, but you get the idea. > > > > With the topic approach, which I assumed would perform better on > > account of eliminating the selectors, the persistent store blew out > > file handles and crashed, so I disabled persistence for the test. (Is > > there a disk-based store that doesn't keep an open file for each > > topic?). With that out of the way, it seemed OK up to 10,000 clients > > (and up to 3x as fast for message send/receive), but isn't really able > > to connect 100,000 clients each to a different topic. Like, the first > > 40K took 20 minutes, and the it pretty much hit the limit of 512 heap > > and the next 2K took 15 minutes of which at least 12 was in GC, etc. > > I'm not sure how high I'm willing to push the heap, but over 1 GB > > seems out of line when I haven't sent any messages yet. > > > > Anyway, this wasn't really what I had hoped for. Is there some good > > way to customize the configuration to either handle ~100K selectors > > really optimally, or ~100K topics really optimally? > > > > Or would it just be better to have one topic where every client gets > > every message and manually discards the ones it doesn't care about? I > > haven't tried that yet. > > > > Thanks, > > Aaron > > > -- http://blog.garytully.com Open Source SOA http://FUSESource.com --0016e65a0dc423e9da04689ee338--