Return-Path: X-Original-To: apmail-qpid-users-archive@www.apache.org Delivered-To: apmail-qpid-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 C0A849040 for ; Wed, 14 Mar 2012 18:56:14 +0000 (UTC) Received: (qmail 34023 invoked by uid 500); 14 Mar 2012 18:56:14 -0000 Delivered-To: apmail-qpid-users-archive@qpid.apache.org Received: (qmail 33991 invoked by uid 500); 14 Mar 2012 18:56:14 -0000 Mailing-List: contact users-help@qpid.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@qpid.apache.org Delivered-To: mailing list users@qpid.apache.org Received: (qmail 33982 invoked by uid 99); 14 Mar 2012 18:56:14 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Mar 2012 18:56:14 +0000 X-ASF-Spam-Status: No, hits=-5.0 required=5.0 tests=RCVD_IN_DNSWL_HI,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of gsim@redhat.com designates 209.132.183.28 as permitted sender) Received: from [209.132.183.28] (HELO mx1.redhat.com) (209.132.183.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Mar 2012 18:56:08 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q2EItkTh018690 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 14 Mar 2012 14:55:46 -0400 Received: from [10.3.238.183] (vpn-238-183.phx2.redhat.com [10.3.238.183]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q2EIticm028751 for ; Wed, 14 Mar 2012 14:55:45 -0400 Message-ID: <4F60E9A8.3070400@redhat.com> Date: Wed, 14 Mar 2012 18:55:36 +0000 From: Gordon Sim Organization: Red Hat UK Ltd, Registered in England and Wales under Company Registration No. 3798903, Directors: Michael Cunningham (USA), Mark Hegarty (Ireland), Matt Parsons (USA), Charlie Peters (USA) User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.15) Gecko/20101027 Fedora/3.0.10-1.fc12 Lightning/1.0b1 Thunderbird/3.0.10 MIME-Version: 1.0 To: users@qpid.apache.org Subject: Re: Major slowdown on Qpid broker References: <77F42B4A75C8E94597470241D340426DC2301457@air.MATTER.LOCAL>,<4F607559.5080703@redhat.com> <77F42B4A75C8E94597470241D340426DC2301459@air.MATTER.LOCAL>,<4F60B9AD.4070105@redhat.com> <77F42B4A75C8E94597470241D340426DC230145A@air.MATTER.LOCAL> In-Reply-To: <77F42B4A75C8E94597470241D340426DC230145A@air.MATTER.LOCAL> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Virus-Checked: Checked by ClamAV on apache.org On 03/14/2012 06:13 PM, Jeff Armstrong wrote: > Jeff: What happens if a session has unacked messages, the client dies > (blade goes down), and then the client on the other blade becomes > active and creates a session before the broker realizes that the old > session should be gone? I'm assuming there is some sort of session > timeout and this could occur. If so, I would expect the new session > not to immediately get the redeliveries until AFTER the broker times > out the old session - is there a mechanism to handle this case? Yes, that is the case. You need the broker to discover the old session has failed before the client subscribed on a new session gives up waiting for new messages. You can control the time to detect a failed connection using heartbeats (see ConnectionSettings). > Also, > When I examined the queue in RingQueuePolicy (member 'queue') and the > one in SemanticState (member 'unacked'), both appeared to have the > same messages - the ones that should have been redelivered but > weren't. Which sessions unacked messages were you examining? If the old ones, that would certainly imply the broker has not detected it has failed (as once it does so that list of unacked deliveries will no longer exist). > Jeff: But, if a message is deleted due to the ring queue size being exceeded, shouldn't that message be fully deleted and removed from all lists? Otherwise the message never truly gets deleted. It is deleted in the sense that it is removed from the store and will never get redelivered. The subscribers session tracks all the messages it has delivered. Those records are still needed, though once the message is deleted from the queue there would be no need for them to reference the actual message data. Doing that would require some messy code and to my mind is not a critical issue. As I say there have been some changes to the queue code that with a little extra work would allow a much more efficient implementation of ring queues. > Jeff: I basically copied the same options/setup. > 1) I create an exchange: > qpid-config add exchange direct EXCHANGENAME > 2) I start 2 clients that each create a queue and bind to the same binding and then subscribe to it: > QueueOptions queueOptions; > queueOptions.setSizePolicy(RING, 524288000, 0); // 500 MB > session.queueDeclare(arg::queue = queueName, arg::arguments = queueOptions); > session.exchangeBind(queueName, exchangeName, bindingName); > SubscriptionSettings subSettings; > subSettings.autoAck = 0; > subSettings.acceptMode = ACCEPT_MODE_EXPLICIT; > subSettings.completionMode = COMPLETE_ON_ACCEPT; > subscriptions.subscribe(localQueue, queueName, subSettings); > 3) I start a sender client that continuously sends messages to the binding that I set up: > Message msg; > msg.setData(msgStr); > msg.getDeliveryProperties().setRoutingKey(bindingName); > msg.getDeliveryProperties().setDeliveryMode(qpid::framing::PERSISTENT); > uint32_t messageCount = 0; > while (true) { > session.messageTransfer(qpid::client::arg::content=msg, qpid::client::arg::destination=exchangeName); > ++messageCount; > } > 4) The 2 receiver clients will acquire 100k messages each and never accept them. Then they will enter a loop where they acquire 200k messages, then ack them all. > 5) In gdb, I examine the queue during the accept() on the broker, and it does not have a policy, so it doesn't call RingQueuePolicy::dequeued(). Only thing I can think of there is that perhaps a queue of that name already exists. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org For additional commands, e-mail: users-help@qpid.apache.org