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 24A4117FDF for ; Sat, 14 Mar 2015 15:57:10 +0000 (UTC) Received: (qmail 63700 invoked by uid 500); 14 Mar 2015 15:57:09 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 63658 invoked by uid 500); 14 Mar 2015 15:57:09 -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 63646 invoked by uid 99); 14 Mar 2015 15:57:09 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 14 Mar 2015 15:57:09 +0000 X-ASF-Spam-Status: No, hits=3.1 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX,URI_TRY_3LD X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of christiangrassi@gmail.com designates 74.125.82.182 as permitted sender) Received: from [74.125.82.182] (HELO mail-we0-f182.google.com) (74.125.82.182) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 14 Mar 2015 15:56:44 +0000 Received: by wetk59 with SMTP id k59so10797307wet.3 for ; Sat, 14 Mar 2015 08:56:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:from:date:message-id:subject:to :content-type; bh=Ql95JpJ5EtGYCC5b/vzyn0bfsrqo+PaeF2Kp/W2PbLs=; b=Mufu/Int0FUUUUq9RyFqMMqzrzbG+USGBbsP9nvPvgeNOfPoT9dX0JnJXgCKNE0RSs l+WhH2OUz5Uq64qM4MyPftJhmQ9+DDWVrmDwCz1X6k/T7fdIfxlhdVu58c0j0lIwRA89 qT4MRM/g5pc9G6uUFvD8WOIGi65XDg5tg5NqLVWhLuIdUtU/nt94VAAnHAIxDPnrgqgD WC2yqnmnwBvghbUuvr967vz8zAGibKLbLhIPC+i707+dyQIr4yzr17OtivgTIdAg2YRQ AdplkV1kPRJ+25nO2M4njLc1aNFi+pWx7muzNdbxBIO8R7RccpyvX/Gy1L2BAFeDlgEj 157w== X-Received: by 10.194.11.9 with SMTP id m9mr105065171wjb.82.1426348603274; Sat, 14 Mar 2015 08:56:43 -0700 (PDT) MIME-Version: 1.0 References: <1426278627291-4693192.post@n4.nabble.com> <1426283208357-4693203.post@n4.nabble.com> From: Christian Grassi Date: Sat, 14 Mar 2015 15:56:42 +0000 Message-ID: Subject: Re: Lots of small ActiveMQ instances or one big one? To: ActiveMQ Users Content-Type: multipart/alternative; boundary=047d7b5d22b0d2fd53051141a9d8 X-Virus-Checked: Checked by ClamAV on apache.org --047d7b5d22b0d2fd53051141a9d8 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Yes Tim, this was my point, if the producer receives the ack, it should be when the message is persistet on disk. Chris Il giorno sab 14 mar 2015 15:32 Tim Bain ha scritto= : > I think the difference is that an ack packet (telling the sender that it > can discard the message because the broker now has it stored and the > sender's copy is no longer needed as a backup) is sent after a successful > write to disk, so the consequences of a failed disk write are different > than a failed Ethernet or queue write. > > So if you batch disk writes, you either batch acks (which has a negative > performance impact; I'm not sure if the loss will be greater or less than > the gain from batching writes, but at a minimum it'll decrease the expect= ed > improvement from batching writes) or you optimistically ack before the bi= ts > hit the disk (which violates the JMS contract because it allows message > loss if the server crashes before the batch is written). > On Mar 13, 2015 7:57 PM, "Kevin Burton" wrote: > > > > Regarding batching in my opinion it is right, even if is not the most > > performing solution, to have a fsync per msg as otherwise in case of > outage > > you lose more messages > > > > To clarify, you get the same mathematical / functional properties of > > messages, just in the case of smart batching, you get MUCH better > > throughput. > > > > While the packet is over the ethernet it=E2=80=99s not sync=E2=80=99d .= . while it=E2=80=99s > waiting > > in queue, it=E2=80=99s not sync=E2=80=99d. > > > > The change is that instead of taking one message at a time, and writing= , > > then syncing each one, you either read N messages at once, or the entir= e > > queue. > > > > The performance improvement can be dramatic. (100x). > > > > > > On Fri, Mar 13, 2015 at 5:59 PM, Christian Grassi < > > christiangrassi@gmail.com > > > wrote: > > > > > Hi Kevin, > > > just curios how many messages per second you are seeing? > > > Regarding batching in my opinion it is right, even if is not the most > > > performing solution, to have a fsync per msg as otherwise in case of > > outage > > > you lose more messages. Personally speaking in a persistent queue if > the > > > producer is acknowledged that a message is in the queue it should be > sent > > > and persisted. > > > Just my opinion > > > > > > Chris > > > > > > Il giorno ven 13 mar 2015 23:06 Kevin Burton ha > > > scritto: > > > > > > > Does ActiveMQ do an fsync per message? > > > > > > > > Why not do smart batching: > > > > > > > > http://mechanical-sympathy.blogspot.com/2011/10/smart-batching.html > > > > > > > > This way the messages could be elided, and one fsync called on all = of > > > them. > > > > > > > > Maybe it already does, but the comment that each messages requires = a > > sync > > > > seems to hint that this could be more efficient. > > > > > > > > On Fri, Mar 13, 2015 at 2:46 PM, artnaseef > wrote: > > > > > > > > > I think they are in-line. More producers generally mean more > > > concurrent > > > > > work > > > > > for the broker, as a single producer sends all of its messages > > serially > > > > to > > > > > the broker. Similar logic applies to consumers. > > > > > > > > > > More destinations generally forces more producers and consumers, > > > although > > > > > it > > > > > doesn't have to. > > > > > > > > > > Is there something more specific that doesn't seem to match? > > > > > > > > > > > > > > > > > > > > -- > > > > > View this message in context: > > > > > http://activemq.2283324.n4.nabble.com/Lots-of-small- > > > > ActiveMQ-instances-or-one-big-one-tp4693133p4693203.html > > > > > Sent from the ActiveMQ - User mailing list archive at Nabble.com. > > > > > > > > > > > > > > > > > > > > > -- > > > > > > > > Founder/CEO Spinn3r.com > > > > Location: *San Francisco, CA* > > > > blog: http://burtonator.wordpress.com > > > > =E2=80=A6 or check out my Google+ profile > > > > > > > > > > > > > > > > > > > > > > > -- > > > > Founder/CEO Spinn3r.com > > Location: *San Francisco, CA* > > blog: http://burtonator.wordpress.com > > =E2=80=A6 or check out my Google+ profile > > > > > > > --047d7b5d22b0d2fd53051141a9d8--