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 281621866C for ; Sat, 31 Oct 2015 00:29:54 +0000 (UTC) Received: (qmail 36092 invoked by uid 500); 31 Oct 2015 00:29:53 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 36047 invoked by uid 500); 31 Oct 2015 00:29:53 -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 36034 invoked by uid 99); 31 Oct 2015 00:29:53 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 31 Oct 2015 00:29:53 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 0C731C11BE for ; Sat, 31 Oct 2015 00:29:53 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.258 X-Spam-Level: *** X-Spam-Status: No, score=3.258 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, HEADER_FROM_DIFFERENT_DOMAINS=0.008, HTML_MESSAGE=3, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com header.b=O1wBNZUu; dkim=pass (2048-bit key) header.d=spinn3r_com.20150623.gappssmtp.com header.b=rwg9var9 Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id X-jWzgz3dXQg for ; Sat, 31 Oct 2015 00:29:41 +0000 (UTC) Received: from mail-vk0-f42.google.com (mail-vk0-f42.google.com [209.85.213.42]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id 8B4462384E for ; Sat, 31 Oct 2015 00:29:41 +0000 (UTC) Received: by vkgs66 with SMTP id s66so57459102vkg.1 for ; Fri, 30 Oct 2015 17:29:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=dEmBv0hIB7a/Fhms+cFLH/K+LciV+fmlQhW6836hDMU=; b=O1wBNZUu0QBRpFXvFKs3iIgl4TxSya2dSEO5dv+a6AnUj8M5peb6ZeVQJgsp5wc0aO A1lsP+YxYLComHJzHaLY8NI6VAThQ1B5BDg/UKH2dqpsMhO9YnhkVorWS9Mm9eVwRewc BOm8lOpzdFOlbtOREInRsiML2yYFeJ3v3KDBzkbgx+PJ8N8GHmuO23E0QvJckI1kwD1w 4sTzg5eMk4cyRmPXRaHvoWYav8R4yfPVJzTNyctpE7kfjDifsn1gSAs46+sqkGlNfcms Kmn5Ldq4PEl0hKB3tHKxTVAvDdvi6DLIY/szLzf3wmH+UdtM75x48i3q6wwJUTAG58Fv imiQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spinn3r_com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=dEmBv0hIB7a/Fhms+cFLH/K+LciV+fmlQhW6836hDMU=; b=rwg9var9o5atqzEF/qYegPwHdrgxREy6NhW/EbtISJisB/OEx+D4SW99pjlojBFP5j ub0q3M+J/whtE544FcWAvecayPDlz7WPEs9YjadoC0ecuUncFxdOpIWx5aZMATO797vZ Xlgwu3QXtIPsKBIenv8A8J6tgftlZBnwXfMtPKasCm8YTw510/S+18gS+hjav/pUScB0 euo+6WJDhxMKQXGu3f26DABiz41HvEdFiQwba6DfjIUgZiA/OnmzyBoZnvJ6zgZ5pnWG BkV+aOWsbE7TQ0708woY8VnUXtFQDU0eN0TE/2BpRz21pJjv+mc6KE7O8VmUXxm6zNbg t1sQ== X-Received: by 10.31.158.198 with SMTP id h189mr7388058vke.102.1446251380766; Fri, 30 Oct 2015 17:29:40 -0700 (PDT) MIME-Version: 1.0 Sender: burtonator2011@gmail.com Received: by 10.31.96.139 with HTTP; Fri, 30 Oct 2015 17:29:21 -0700 (PDT) In-Reply-To: References: From: Kevin Burton Date: Fri, 30 Oct 2015 17:29:21 -0700 X-Google-Sender-Auth: 2Ck0TCup0Uaw6W138qQvsD4fSwU Message-ID: Subject: Re: Dealing with the "over-prefetch" problem with large numbers of workers and many queue servers To: users@activemq.apache.org Content-Type: multipart/alternative; boundary=001a11425cf2ce7db005235ba318 --001a11425cf2ce7db005235ba318 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable sorry for the delay in reply. was dealing with a family issue that I needed to prioritize... On Wed, Oct 21, 2015 at 6:52 AM, Tim Bain wrote: > Right off the top, can't you use INDIVIDUAL_ACK here, rather than > committing transactions? That seems like the ideal mode to let you choos= e > which messages to ack without having to ack all the ones up to a certain > point. > > I thought about that. We had moved to sessions to avoid over-indexing because our tasks create more messages and this way I can bulk commit them as one unit. But maybe if I just deal with the "at least once" semantics while the transactions aren't combined I'll just execute a message at least once. But there might be a failure scenario where we execute the second message hundreds of times where if it was a transaction this could be avoided. > > Also, I'm curious about how a 30-second message with a prefetch size of 1 > results in a 5-minute latency; why isn't that 2 * 30 seconds =3D 1 minute= ? > > It's because I have one connection per thread per server. So if we have 10 servers, each thread has ten sessions. and if prefetch is 1 then that means I prefetch 10 total messages. If each message takes 30 seconds to execute that thread will take a while to handle all ten. This leads to significant latency. I pushed some code last week to instrument this and our average latency right now is 3-5 minutes between prefetching a message and servicing a message. Fortunately there's a timestamp added on prefetch so I can just take the current time that I am executing the message/task and then subtract the prefetch time to compute the latency. Kevin --=20 We=E2=80=99re hiring if you know of any awesome Java Devops or Linux Operat= ions Engineers! Founder/CEO Spinn3r.com Location: *San Francisco, CA* blog: http://burtonator.wordpress.com =E2=80=A6 or check out my Google+ profile --001a11425cf2ce7db005235ba318--