activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From martyntay...@apache.org
Subject [2/3] activemq-artemis git commit: ARTEMIS-1056 Adjusting Acceptor values
Date Thu, 30 Mar 2017 08:54:39 GMT
ARTEMIS-1056 Adjusting Acceptor values

I have been doing tests with quiver at large message sizes
the tests would work really slowly without these fixes


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/9bef242b
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/9bef242b
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/9bef242b

Branch: refs/heads/master
Commit: 9bef242b74a89d652398a0dced15073dbb9d470f
Parents: 5ca514a
Author: Clebert Suconic <clebertsuconic@apache.org>
Authored: Wed Mar 29 21:41:21 2017 -0400
Committer: Martyn Taylor <mtaylor@redhat.com>
Committed: Thu Mar 30 09:54:26 2017 +0100

----------------------------------------------------------------------
 .../artemis/cli/commands/etc/amqp-acceptor.txt     |  2 +-
 .../artemis/cli/commands/etc/mqtt-acceptor.txt     |  2 +-
 .../artemis/cli/commands/etc/stomp-acceptor.txt    |  2 +-
 .../remoting/impl/netty/TransportConstants.java    |  4 ++--
 .../amqp/proton/ProtonServerReceiverContext.java   | 17 ++++++++---------
 5 files changed, 13 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/9bef242b/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/amqp-acceptor.txt
----------------------------------------------------------------------
diff --git a/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/amqp-acceptor.txt
b/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/amqp-acceptor.txt
index 71f44b7..743ba95 100644
--- a/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/amqp-acceptor.txt
+++ b/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/amqp-acceptor.txt
@@ -1,3 +1,3 @@
 
          <!-- AMQP Acceptor.  Listens on default AMQP port for AMQP traffic.-->
-         <acceptor name="amqp">tcp://${host}:${amqp.port}?protocols=AMQP;useEpoll=true;amqpCredits=1000;amqpMinCredits=300</acceptor>
+         <acceptor name="amqp">tcp://${host}:${amqp.port}?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=AMQP;useEpoll=true;amqpCredits=1000;amqpMinCredits=300</acceptor>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/9bef242b/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/mqtt-acceptor.txt
----------------------------------------------------------------------
diff --git a/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/mqtt-acceptor.txt
b/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/mqtt-acceptor.txt
index ceaf615..a307e63 100644
--- a/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/mqtt-acceptor.txt
+++ b/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/mqtt-acceptor.txt
@@ -1,3 +1,3 @@
 
          <!-- MQTT Acceptor -->
-         <acceptor name="mqtt">tcp://${host}:${mqtt.port}?protocols=MQTT;useEpoll=true</acceptor>
+         <acceptor name="mqtt">tcp://${host}:${mqtt.port}?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=MQTT;useEpoll=true</acceptor>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/9bef242b/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/stomp-acceptor.txt
----------------------------------------------------------------------
diff --git a/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/stomp-acceptor.txt
b/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/stomp-acceptor.txt
index bfe4d8b..c10ab2e 100644
--- a/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/stomp-acceptor.txt
+++ b/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/stomp-acceptor.txt
@@ -1,3 +1,3 @@
 
          <!-- STOMP Acceptor. -->
-         <acceptor name="stomp">tcp://${host}:${stomp.port}?protocols=STOMP;useEpoll=true</acceptor>
+         <acceptor name="stomp">tcp://${host}:${stomp.port}?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=STOMP;useEpoll=true</acceptor>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/9bef242b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/TransportConstants.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/TransportConstants.java
b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/TransportConstants.java
index 4293000..4317a68 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/TransportConstants.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/TransportConstants.java
@@ -179,9 +179,9 @@ public class TransportConstants {
 
    public static final boolean DEFAULT_TCP_NODELAY = true;
 
-   public static final int DEFAULT_TCP_SENDBUFFER_SIZE = 32768;
+   public static final int DEFAULT_TCP_SENDBUFFER_SIZE = 1024 * 1024;
 
-   public static final int DEFAULT_TCP_RECEIVEBUFFER_SIZE = 32768;
+   public static final int DEFAULT_TCP_RECEIVEBUFFER_SIZE = 1024 * 1024;
 
    public static final boolean DEFAULT_HTTP_ENABLED = false;
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/9bef242b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/ProtonServerReceiverContext.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/ProtonServerReceiverContext.java
b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/ProtonServerReceiverContext.java
index 76ad1ac..fcdced4 100644
--- a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/ProtonServerReceiverContext.java
+++ b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/ProtonServerReceiverContext.java
@@ -146,11 +146,14 @@ public class ProtonServerReceiverContext extends ProtonInitializable
implements
    public void onMessage(Delivery delivery) throws ActiveMQAMQPException {
       Receiver receiver;
       try {
-         receiver = ((Receiver) delivery.getLink());
 
          if (!delivery.isReadable()) {
             return;
          }
+         if (delivery.isPartial()) {
+            return;
+         }
+         receiver = ((Receiver) delivery.getLink());
 
          if (delivery.isPartial()) {
             return;
@@ -160,11 +163,9 @@ public class ProtonServerReceiverContext extends ProtonInitializable
implements
 
          byte[] data;
 
-         synchronized (connection.getLock()) {
-            data = new byte[delivery.available()];
-            receiver.recv(data, 0, data.length);
-            receiver.advance();
-         }
+         data = new byte[delivery.available()];
+         receiver.recv(data, 0, data.length);
+         receiver.advance();
 
          if (delivery.getRemoteState() instanceof TransactionalState) {
 
@@ -174,9 +175,7 @@ public class ProtonServerReceiverContext extends ProtonInitializable implements
 
          sessionSPI.serverSend(tx, receiver, delivery, address, delivery.getMessageFormat(),
data);
 
-         synchronized (connection.getLock()) {
-            flow(amqpCredits, minCreditRefresh);
-         }
+         flow(amqpCredits, minCreditRefresh);
       } catch (Exception e) {
          log.warn(e.getMessage(), e);
          Rejected rejected = new Rejected();


Mime
View raw message