tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fha...@apache.org
Subject svn commit: r382061 - in /tomcat/container/tc5.5.x/modules/groupcom: etc/ src/share/org/apache/catalina/tribes/io/ src/share/org/apache/catalina/tribes/tcp/
Date Wed, 01 Mar 2006 15:35:00 GMT
Author: fhanik
Date: Wed Mar  1 07:34:59 2006
New Revision: 382061

URL: http://svn.apache.org/viewcvs?rev=382061&view=rev
Log:
Modified the default rx and tx buf sizes, these make a huge difference in the speed of data
transport

Modified:
    tomcat/container/tc5.5.x/modules/groupcom/etc/cluster-server.xml
    tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/XByteBuffer.java
    tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/DataSender.java
    tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/ReplicationListener.java
    tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/ReplicationTransmitter.java

Modified: tomcat/container/tc5.5.x/modules/groupcom/etc/cluster-server.xml
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/etc/cluster-server.xml?rev=382061&r1=382060&r2=382061&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/etc/cluster-server.xml (original)
+++ tomcat/container/tc5.5.x/modules/groupcom/etc/cluster-server.xml Wed Mar  1 07:34:59 2006
@@ -301,16 +301,16 @@
                     tcpThreadCount="6"
                     sendAck="true"
                     synchronized="true"
-                    rxBufSize="4096"
-                    txBufSize="128"/>
+                    rxBufSize="43800"
+                    txBufSize="25188"/>
 
                 <Sender
                     className="org.apache.catalina.tribes.tcp.ReplicationTransmitter"
                     replicationMode="pooled"
                     ackTimeout="15000"
                     waitForAck="true"
-                    rxBufSize="4096"
-                    txBufSize="128"/>
+                    rxBufSize="43800"
+                    txBufSize="25188"/>
                     
                 <!--
                 <Interceptor className="org.apache.catalina.tribes.group.interceptors.GzipInterceptor"/>

Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/XByteBuffer.java
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/XByteBuffer.java?rev=382061&r1=382060&r2=382061&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/XByteBuffer.java
(original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/XByteBuffer.java
Wed Mar  1 07:34:59 2006
@@ -62,12 +62,12 @@
     /**
      * Default size on the initial byte buffer
      */
-    public static final int DEF_SIZE = 2048;
+    private static final int DEF_SIZE = 2048;
  
     /**
      * Default size to extend the buffer with
      */
-    public static final int DEF_EXT  = 1024;
+    private static final int DEF_EXT  = 1024;
     
     /**
      * Variable to hold the data

Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/DataSender.java
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/DataSender.java?rev=382061&r1=382060&r2=382061&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/DataSender.java
(original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/DataSender.java
Wed Mar  1 07:34:59 2006
@@ -213,8 +213,15 @@
      * After failure make a resend
      */
     private boolean resend = false ;
-    private int rxBufSize = 1024;
-    private int txBufSize = 4096;
+    /**
+     * @todo make this configurable
+     */
+    protected int rxBufSize = 43800;
+    /**
+     * We are only sending acks
+     */
+    protected int txBufSize = 25188;
+
 
     // ------------------------------------------------------------- Constructor
     
@@ -725,6 +732,9 @@
      */
     protected void createSocket() throws IOException, SocketException {
         socket = new Socket(getAddress(), getPort());
+//System.out.println("DEFAULT SOCKET RX="+socket.getReceiveBufferSize() +" our="+getRxBufSize());
+//System.out.println("DEFAULT CHANNEL TX="+socket.getSendBufferSize() +" our="+getTxBufSize());
+//
         socket.setSendBufferSize(getTxBufSize());
         socket.setReceiveBufferSize(getRxBufSize());
         this.socketout = socket.getOutputStream();

Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/ReplicationListener.java
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/ReplicationListener.java?rev=382061&r1=382060&r2=382061&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/ReplicationListener.java
(original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/ReplicationListener.java
Wed Mar  1 07:34:59 2006
@@ -43,11 +43,11 @@
     /**
      * @todo make this configurable
      */
-    protected int rxBufSize = XByteBuffer.DEF_SIZE;
+    protected int rxBufSize = 43800;
     /**
      * We are only sending acks
      */
-    protected int txBufSize = 128;
+    protected int txBufSize = 25188;
 
     protected static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(ReplicationListener.class);
 
@@ -197,6 +197,10 @@
                         ServerSocketChannel server =
                             (ServerSocketChannel) key.channel();
                         SocketChannel channel = server.accept();
+
+//System.out.println("DEFAULT CHANNEL RX="+channel.socket().getReceiveBufferSize() +" our="+rxBufSize);
+//System.out.println("DEFAULT CHANNEL TX="+channel.socket().getSendBufferSize() +" our="+txBufSize);
+
                         channel.socket().setReceiveBufferSize(rxBufSize);
                         channel.socket().setSendBufferSize(txBufSize);
                         Object attach = new ObjectReader(channel, selector,this);

Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/ReplicationTransmitter.java
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/ReplicationTransmitter.java?rev=382061&r1=382060&r2=382061&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/ReplicationTransmitter.java
(original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tcp/ReplicationTransmitter.java
Wed Mar  1 07:34:59 2006
@@ -58,11 +58,11 @@
     /**
      * @todo make this configurable
      */
-    protected int rxBufSize = XByteBuffer.DEF_SIZE;
+    protected int rxBufSize = 43800;
     /**
      * We are only sending acks
      */
-    protected int txBufSize = 128;
+    protected int txBufSize = 25188;
 
     public ReplicationTransmitter() {
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message