buffer network stack to avoid inefficient small TCP messages while

avoiding the nagle/delayed ack problem.  Patch by Tsiki Rosenmann,
brandonwilliams and jbellis, reviewed by brandonwilliams for
CASSANDRA-1896

git-svn-id: https://svn.apache.org/repos/asf/cassandra/branches/cassandra-0.6@1055213 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brandon Williams 2011-01-04 22:22:08 +00:00
parent 8f2c8bd3a6
commit 5be7169fbf
3 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,7 @@
0.6.10
* buffer network stack to avoid inefficient small TCP messages while avoiding
the nagle/delayed ack problem (CASSANDRA-1896)
0.6.9
* add clustertool, config-converter, sstablekeys, and schematool
Windows .bat files (CASSANDRA-1723)

View File

@ -41,7 +41,7 @@ public class IncomingTcpConnection extends Thread
this.socket = socket;
try
{
input = new DataInputStream(socket.getInputStream());
input = new DataInputStream(new BufferedInputStream(socket.getInputStream(), 4096));
}
catch (IOException e)
{

View File

@ -21,6 +21,7 @@ package org.apache.cassandra.net;
*/
import java.io.BufferedOutputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.net.InetAddress;
@ -150,7 +151,7 @@ public class OutboundTcpConnection extends Thread
socket = new Socket(endpoint, DatabaseDescriptor.getStoragePort(), FBUtilities.getLocalAddress(), 0);
socket.setKeepAlive(true);
socket.setTcpNoDelay(true);
output = new DataOutputStream(socket.getOutputStream());
output = new DataOutputStream(new BufferedOutputStream(socket.getOutputStream(), 4096));
return true;
}
catch (IOException e)