Return-Path: Delivered-To: apmail-incubator-qpid-users-archive@locus.apache.org Received: (qmail 87417 invoked from network); 8 Nov 2008 18:07:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Nov 2008 18:07:11 -0000 Received: (qmail 44419 invoked by uid 500); 8 Nov 2008 18:07:18 -0000 Delivered-To: apmail-incubator-qpid-users-archive@incubator.apache.org Received: (qmail 44318 invoked by uid 500); 8 Nov 2008 18:07:18 -0000 Mailing-List: contact qpid-users-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: qpid-users@incubator.apache.org Delivered-To: mailing list qpid-users@incubator.apache.org Received: (qmail 44297 invoked by uid 99); 8 Nov 2008 18:07:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 08 Nov 2008 10:07:18 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of robert.j.greig@gmail.com designates 209.85.134.190 as permitted sender) Received: from [209.85.134.190] (HELO mu-out-0910.google.com) (209.85.134.190) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 08 Nov 2008 18:06:01 +0000 Received: by mu-out-0910.google.com with SMTP id w9so2077206mue.0 for ; Sat, 08 Nov 2008 10:06:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=SlExySGObF+EkL8K8FgAgKbKKHEN8U9z49ovomx3/xs=; b=X0MrVsSFzVo6gyYR+8P4V2bZHxlTgT6PcQgeTSs975UYceD/RxGvL2RCNYNBDJ9si+ R1l8EgyXgaAdKl1GJsdEMWBBij+0FuLVdCoG0Zs100vqYnsBcowEnWrV02LljzzKHFs+ pqq/H1at5wkLFdcRXsxP2X3xxvMzKuv6kBMHw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=PoLlxLvIOsVrm4k9bh2w2tkZR1lC6lNj/jzSJItJ8YcjaIWjqUq0B0FLugfgnSfSdA 605Hzvk44HBxaEbLvwFBmSegKaW9SCtNnYCIWzE5sdziPhJOGNL/2/UfXH/RRKKLEsKV 7sc0U7CMnZHyVKKfN6/M7yIBPB/SDkTdVQGjI= Received: by 10.103.106.1 with SMTP id i1mr132701mum.47.1226167592421; Sat, 08 Nov 2008 10:06:32 -0800 (PST) Received: by 10.103.179.5 with HTTP; Sat, 8 Nov 2008 10:06:32 -0800 (PST) Message-ID: <129a14790811081006j2d2d3ad1j2a11e7801dd9fb3@mail.gmail.com> Date: Sat, 8 Nov 2008 18:06:32 +0000 From: "Robert Greig" To: qpid-users@incubator.apache.org Subject: Re: Java M3 Qpid broker memory consumption In-Reply-To: <129a14790811080544v10b2072bo2ebb63bf8bb006f7@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <129a14790811020816u401c72d9j9a7e0ac66d1a7a39@mail.gmail.com> <129a14790811031241q4e7f08ach43d0a5da8ba2f2d4@mail.gmail.com> <49102118.40901@redhat.com> <129a14790811051249y391f39cejf6f89bb70c42998c@mail.gmail.com> <49120CBE.5070709@redhat.com> <129a14790811080544v10b2072bo2ebb63bf8bb006f7@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org 2008/11/8 Robert Greig : > This is not a particularly good solution from a performance > perspective since the broker will make a lot more system calls as a > result - particularly when you have smaller messages. However with a > low rate such as 200 messages/second this should be fine I think. > > If you try this, you should see that messages do build up in the queues. I meant to mention that one reason you would want to do this is that it should lower the memory consumption of the broker. The reason for that is due to a performance optimisation that the broker does. If the broker thinks it can push a message straight out to a consumer, it just takes a slice of the heap buffer used to read from the socket - which will be 32k by default. This is to avoid the overhead of copying to another buffer. Note that the broker does think it can push the message straight out to a consumer because what MINA is doing is hidden. If the messages are kept on a queue, then it will copy them to an appropriately sized buffer to reduce memory consumption. In your case where your messages are 250 bytes this will be particuarly noticable. RG