From commits-return-14024-apmail-activemq-commits-archive=activemq.apache.org@activemq.apache.org Wed Jul 07 03:53:25 2010 Return-Path: Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: (qmail 36822 invoked from network); 7 Jul 2010 03:53:25 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 7 Jul 2010 03:53:25 -0000 Received: (qmail 36324 invoked by uid 500); 7 Jul 2010 03:53:25 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 36281 invoked by uid 500); 7 Jul 2010 03:53:24 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 36273 invoked by uid 99); 7 Jul 2010 03:53:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Jul 2010 03:53:23 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Jul 2010 03:53:18 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 756062388C16; Wed, 7 Jul 2010 03:52:23 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r961094 - in /activemq/sandbox/activemq-apollo-actor: activemq-broker/src/test/resources/org/apache/activemq/apollo/broker/perf/ activemq-broker/src/test/scala/org/apache/activemq/apollo/broker/perf/ activemq-tcp/src/main/java/org/apache/ac... Date: Wed, 07 Jul 2010 03:52:23 -0000 To: commits@activemq.apache.org From: chirino@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100707035223.756062388C16@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: chirino Date: Wed Jul 7 03:52:23 2010 New Revision: 961094 URL: http://svn.apache.org/viewvc?rev=961094&view=rev Log: - Better perf report - fixed tcp receive buffer array out of bounds exception. Modified: activemq/sandbox/activemq-apollo-actor/activemq-broker/src/test/resources/org/apache/activemq/apollo/broker/perf/report.html activemq/sandbox/activemq-apollo-actor/activemq-broker/src/test/scala/org/apache/activemq/apollo/broker/perf/BaseBrokerPerfSupport.scala activemq/sandbox/activemq-apollo-actor/activemq-tcp/src/main/java/org/apache/activemq/transport/tcp/TcpTransport.java Modified: activemq/sandbox/activemq-apollo-actor/activemq-broker/src/test/resources/org/apache/activemq/apollo/broker/perf/report.html URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-broker/src/test/resources/org/apache/activemq/apollo/broker/perf/report.html?rev=961094&r1=961093&r2=961094&view=diff ============================================================================== --- activemq/sandbox/activemq-apollo-actor/activemq-broker/src/test/resources/org/apache/activemq/apollo/broker/perf/report.html (original) +++ activemq/sandbox/activemq-apollo-actor/activemq-broker/src/test/resources/org/apache/activemq/apollo/broker/perf/report.html Wed Jul 7 03:52:23 2010 @@ -17,7 +17,13 @@ padding: 2em 0; } .chart-graph { - float:right; width: 66%; height: 15em; margin: 1em 0 1em 1em; + float:right; width: 66%; height: 20em; margin: 1em 0 1em 1em; + } + .med-chart { + height: 30em; + } + .big-chart { + height: 40em; } .chart-section { clear:both; margin-top: 1em; padding-left:2em; } .clear { clear:both; } @@ -26,75 +32,194 @@ @@ -137,86 +274,197 @@

Max Producer Rate

The maximum rate that a single producer can send to a broker. The producer is setup on a topic with no consumers. This rate is has a close correlation to your processor - speed. + speed. The Rate is show at 3 different message sizes.
-

Queue Performce

-

+

Queue Performance

+

+ This section examines the performance of queues also known as the point to point messaging domain. +

+
-
+

Partitioned Scaling

Compares how well the broker scales as partitioned load is increased on it. Each destination - has only one producer and one consumer attached. This should scale up on machines with many - processing cores. + has only one producer and one consumer attached using small 20 byte messages. This should + scale up on machines with many processing cores. Keep in mind that the load test is running the + load clients and the broker on one machines so about 1/2 the cpu resources are being used by + the load clients. +
+ +
+
+ +

Destination Contention

+ When there are many consumer or/and producers on one destination, it can become a bottleneck. Shown data points are the total consumer + rate for scenario.
+
-
+
-

Producer Fan In

- Total producer and consumer rates for when there are many producers on one destination - but only one consumer. The 'producer sd' is standard deviation of the message rate across the - producers. +

Fairness

+ When you have multiple homogenous consumers or producers, it's ideal if the the broker treats them all fairly + and sends or accepts the same number of messages from them. This chart shows the standard deviation of the number + of messages produced or consumed. The lower the number the better.
+
+

Topic Performance

+

+ This section examines the performance of topics also known as the publish/subscribe messaging domain. +

+ +
+
+ +

Partitioned Scaling

+ Compares how well the broker scales as partitioned load is increased on it. Each destination + has only one producer and one consumer attached using small 20 byte messages. This should + scale up on machines with many processing cores. Keep in mind that the load test is running the + load clients and the broker on one machines so about 1/2 the cpu resources are being used by + the load clients. +
+
-
+
-

Consumer Fan Out

- Total producer and consumer rates for when there are many consumers on one destination - but only one producer. The 'consumer sd' is standard deviation of the message rate across the - consumers. +

Destination Contention

+ When there are many consumer or/and producers on one destination, it can become a bottleneck. Shown data points are the total consumer + rate for scenario. When looking at the numbers, keep in mind that topics replicate/broadcast every messages to every consumer so there is much + much higher message load when you have many consumers attached.
-
+
-

Producer Fan In and Consumer Fan Out

- Total producer and consumer rates for when there are many producers and many consumers on one destination. The 'consumer sd' and 'producer sd' - are the standard deviation numbers of the producers and consumers. +

Fairness

+ When you have multiple homogenous consumers or producers, it's ideal if the the broker treats them all fairly + and sends or accepts the same number of messages from them. This chart shows the standard deviation of the number + of messages produced or consumed. The lower the number the better.
+
Modified: activemq/sandbox/activemq-apollo-actor/activemq-broker/src/test/scala/org/apache/activemq/apollo/broker/perf/BaseBrokerPerfSupport.scala URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-broker/src/test/scala/org/apache/activemq/apollo/broker/perf/BaseBrokerPerfSupport.scala?rev=961094&r1=961093&r2=961094&view=diff ============================================================================== --- activemq/sandbox/activemq-apollo-actor/activemq-broker/src/test/scala/org/apache/activemq/apollo/broker/perf/BaseBrokerPerfSupport.scala (original) +++ activemq/sandbox/activemq-apollo-actor/activemq-broker/src/test/scala/org/apache/activemq/apollo/broker/perf/BaseBrokerPerfSupport.scala Wed Jul 7 03:52:23 2010 @@ -160,7 +160,7 @@ abstract class BaseBrokerPerfSupport ext // Test all the combinations for( PTP<- List(true,false) ; PERSISTENT <- List(false); DURABLE <- List(false) ; size <- List(20,1024,1024*256)) { - val prefix = (if( PTP ) "queue " else "topic ") +(if( PERSISTENT ) "persistent " else "")+(if((size%1024)==0) (size/1024)+"k" else size.toString)+" " + val prefix = (if( PTP ) "queue " else "topic ") +(if( PERSISTENT ) "persistent " else "")+(if((size%1024)==0) (size/1024)+"k" else size+"b" )+" " val suffix = (if( DURABLE ) " durable" else "") if( PTP && DURABLE ) { Modified: activemq/sandbox/activemq-apollo-actor/activemq-tcp/src/main/java/org/apache/activemq/transport/tcp/TcpTransport.java URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-tcp/src/main/java/org/apache/activemq/transport/tcp/TcpTransport.java?rev=961094&r1=961093&r2=961094&view=diff ============================================================================== --- activemq/sandbox/activemq-apollo-actor/activemq-tcp/src/main/java/org/apache/activemq/transport/tcp/TcpTransport.java (original) +++ activemq/sandbox/activemq-apollo-actor/activemq-tcp/src/main/java/org/apache/activemq/transport/tcp/TcpTransport.java Wed Jul 7 03:52:23 2010 @@ -458,12 +458,12 @@ public class TcpTransport extends BaseSe // do we need a new data buffer to read data into?? if (readBuffer.remaining() == 0) { - // double the capacity size if needed... - int new_capacity = this.wireformat.unmarshalStartPos() != 0 ? bufferSize : readBuffer.capacity() << 2; + // How much data is still not consumed by the wireformat + int size = this.wireformat.unmarshalEndPos() - this.wireformat.unmarshalStartPos(); + + int new_capacity = this.wireformat.unmarshalStartPos() == 0 ? size+bufferSize : (size > bufferSize ? size+bufferSize : bufferSize); byte[] new_buffer = new byte[new_capacity]; - // If there was un-consummed data.. move it to the start of the new buffer. - int size = this.wireformat.unmarshalEndPos() - this.wireformat.unmarshalStartPos(); if (size > 0) { System.arraycopy(readBuffer.array(), this.wireformat.unmarshalStartPos(), new_buffer, 0, size); } @@ -485,6 +485,11 @@ public class TcpTransport extends BaseSe } Object command = this.wireformat.unmarshalNB(readBuffer); + + // Sanity checks to make sure the wireformat is behaving as expected. + assert wireformat.unmarshalStartPos() <= wireformat.unmarshalEndPos(); + assert wireformat.unmarshalEndPos() <= readBuffer.position(); + if (command != null) { listener.onTransportCommand(command);