Return-Path: X-Original-To: apmail-activemq-users-archive@www.apache.org Delivered-To: apmail-activemq-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C5F2110970 for ; Thu, 18 Apr 2013 01:10:21 +0000 (UTC) Received: (qmail 95220 invoked by uid 500); 18 Apr 2013 01:10:21 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 95042 invoked by uid 500); 18 Apr 2013 01:10:21 -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 95034 invoked by uid 99); 18 Apr 2013 01:10:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Apr 2013 01:10:21 +0000 X-ASF-Spam-Status: No, hits=4.9 required=5.0 tests=FS_LARGE_PERCENT2,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of suonayi2006@163.com designates 220.181.13.144 as permitted sender) Received: from [220.181.13.144] (HELO m13-144.163.com) (220.181.13.144) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Apr 2013 01:10:15 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=Received:Date:From:To:Subject:In-Reply-To: References:Content-Type:MIME-Version:Message-ID; bh=rhBR32z7GiIU huwuHp4jm22nCH15+TrXDjCleIQeihw=; b=f4d7dGBvclAcxmWhgS/u3VTWjd0G 7NE+T+ZO+R9R9bvgQdk71MohS/cimzi3FUq5lQGlNeePrB7hS7nz4RvJh3XKjjlt Jkww3m5XkHgY335dncnsxLN+/i/Dq/LCev8AuuEOmRjZYSYpf0hKjLI6X57mRMz/ 0p9vSpufKZgGLuQ= Received: from suonayi2006$163.com ( [203.119.80.8] ) by ajax-webmail-wmsvr144 (Coremail) ; Thu, 18 Apr 2013 09:09:51 +0800 (CST) X-Originating-IP: [203.119.80.8] Date: Thu, 18 Apr 2013 09:09:51 +0800 (CST) From: SuoNayi To: users@activemq.apache.org Subject: Re:Re: Re: Re: What can be reason of 460%+ memory usage limit X-Priority: 3 X-Mailer: Coremail Webmail Server Version SP_ntes V3.5 build 20130201(21528.5249.5248) Copyright (c) 2002-2013 www.mailtech.cn 163com In-Reply-To: References: <167f3ed7.fa59.13de4e2095e.Coremail.suonayi2006@163.com> <1c6ea58c.15538.13e18ca1c97.Coremail.suonayi2006@163.com> <2a71ed9a.15664.13e18d6bdcc.Coremail.suonayi2006@163.com> X-CM-CTRLDATA: zOKeE2Zvb3Rlcl9odG09ODg2MTo4MQ== Content-Type: multipart/alternative; boundary="----=_Part_38286_54673929.1366247391926" MIME-Version: 1.0 Message-ID: <5849f100.27b2.13e1ab0c2b7.Coremail.suonayi2006@163.com> X-CM-TRANSID: kMGowEB5s0bgR29R0oAkAA--.3822W X-CM-SenderInfo: xvxr0td1lsiiqw6rljoofrz/xtbBEB8DGlD+Oc35gQACs2 X-Coremail-Antispam: 1U5529EdanIXcx71UUUUU7vcSsGvfC2KfnxnUU== X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_38286_54673929.1366247391926 Content-Type: text/plain; charset=GBK Content-Transfer-Encoding: 7bit B/c we use the unique feature the VT provides so we won't uses the regular topic subscription. Anyway,when you use the VT and want to disable PFC, you have to disable PFC for the VT and all the queues that are matched in runtime. People may not be aware of this usage pattern and potentially gets into the trouble I faced. At 2013-04-18 00:56:28,"Christian Posta" wrote: >Well, I believe you can consume directly from the VT using regular topic >semantics. > > >On Wed, Apr 17, 2013 at 9:32 AM, SuoNayi wrote: > >> yes, if we do that the retroactive consumers won't be able to get passed >> messages. >> Since we can always expect that there are no consumers on the virtual >> topic, >> is it reasonable if the topic is virtual we will do that optimization ? >> >> >> >> >> At 2013-04-18 00:21:25,"Christian Posta" >> wrote: >> >that's a good point... not sure what the value of flow controlling the >> >producer if there are no consumers to a topic... maybe preserving >> >retroactive consumers? >> > >> > >> >On Wed, Apr 17, 2013 at 9:18 AM, SuoNayi wrote: >> > >> >> The message flow can not go there at the moment. >> >> In the send method it will check if the memory is full at first, if full >> >> then the thread will wait for space and the producer gets blocked. >> >> I mean before checking the memory is full or not, we can see if there >> are >> >> consumers, if none the thread just returns. >> >> So we can avoid blocking the producer. >> >> >> >> >> >> At 2013-04-18 00:08:33,"Christian Posta" >> >> wrote: >> >> >Check the dispatch method in Topic.java... we do just that: >> >> > >> >> > synchronized (consumers) { >> >> > if (consumers.isEmpty()) { >> >> > onMessageWithNoConsumers(context, message); >> >> > return; >> >> > } >> >> > } >> >> > >> >> >onMessageWithNoConsumers really just sends advisories for specific >> cases >> >> > >> >> > >> >> >On Sun, Apr 7, 2013 at 7:24 AM, SuoNayi wrote: >> >> > >> >> >> Hi,we're using the virtual topic to scatter messages to 12 >> >> >> queues/consumers. >> >> >> >> >> >> When one consumer of one queue becomes very slow since it's located >> in >> >> >> London, >> >> >> far from our data center in china, our single producer becomes very >> slow >> >> >> to publish messages. >> >> >> What phenomenon we observed is that: >> >> >> When the slow consumer located in London dequeues 200 messages the >> >> single >> >> >> producer can publish 200 messages or it will be blocked. >> >> >> It seems that PFC is working but I ensure I have disabled PFC for >> queues >> >> >> when the broker is deployed in production. >> >> >> But PFC for topics is enabled and I have make that disabled and given >> >> the >> >> >> broker a reboot. >> >> >> After that my producer can keep publishing messages regardless of the >> >> slow >> >> >> consumer but the memory usage limit keeps increasing all the time. >> >> >> Eventually I saw the 460+ memory usage limit reached which made me >> very >> >> >> surprised. >> >> >> AFAIK, the pending messages in transactions can contribute to the >> >> exceeded >> >> >> memory usage limit. >> >> >> Since we only have single producer and we send 100 messages in a >> batch >> >> >> using a transaction and every message size is less than 1kb, >> >> >> So I can not understand how the memory usage limit exceeds so much. >> >> >> >> >> >> >> >> >> Thanks, >> >> >> SuoNayi >> >> > >> >> > >> >> > >> >> > >> >> >-- >> >> >*Christian Posta* >> >> >http://www.christianposta.com/blog >> >> >twitter: @christianposta >> >> >> > >> > >> > >> >-- >> >*Christian Posta* >> >http://www.christianposta.com/blog >> >twitter: @christianposta >> > > > >-- >*Christian Posta* >http://www.christianposta.com/blog >twitter: @christianposta ------=_Part_38286_54673929.1366247391926--