From 2da18b6724b7daf7c3a973515fc3d59e7d2c4622 Mon Sep 17 00:00:00 2001 From: Rajesh Amaravathi Date: Wed, 22 Feb 2012 14:51:53 +0530 Subject: transport/socket: configuring tcp window-size Till now, send and recieve buffer window sizes for sockets were set to a default glusterfs-specific value. Linux's default window sizes have been found to be better w.r.t performance, and hence, no more setting it to any default value. However, if one wishes, there's the new configuration option: network.tcp-window-size which takes a size value (int or human readable) and will set the window size of sockets for both clients and servers. Nfs clients will also be updated with the same. Change-Id: I841479bbaea791b01086c42f58401ed297ff16ea BUG: 795635 Signed-off-by: Rajesh Amaravathi Reviewed-on: http://review.gluster.com/2821 Tested-by: Gluster Build System Reviewed-by: Amar Tumballi Reviewed-by: Jeff Darcy Reviewed-by: Vijay Bellur --- rpc/rpc-transport/socket/src/socket.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'rpc/rpc-transport/socket/src/socket.h') diff --git a/rpc/rpc-transport/socket/src/socket.h b/rpc/rpc-transport/socket/src/socket.h index 7f0fb6bc3..082977a2a 100644 --- a/rpc/rpc-transport/socket/src/socket.h +++ b/rpc/rpc-transport/socket/src/socket.h @@ -41,19 +41,17 @@ #define RPC_MAX_FRAGMENT_SIZE 0x7fffffff -/* This is the size set through setsockopt for - * both the TCP receive window size and the - * send buffer size. - * Till the time iobuf size becomes configurable, this size is set to include - * two iobufs + the GlusterFS protocol headers. +/* The default window size will be 0, indicating not to set + * it to any size. Default size of Linux is found to be + * performance friendly. * Linux allows us to over-ride the max values for the system. * Should we over-ride them? Because if we set a value larger than the default * setsockopt will fail. Having larger values might be beneficial for * IB links. */ -#define GF_DEFAULT_SOCKET_WINDOW_SIZE (512 * GF_UNIT_KB) +#define GF_DEFAULT_SOCKET_WINDOW_SIZE (0) #define GF_MAX_SOCKET_WINDOW_SIZE (1 * GF_UNIT_MB) -#define GF_MIN_SOCKET_WINDOW_SIZE (128 * GF_UNIT_KB) +#define GF_MIN_SOCKET_WINDOW_SIZE (0) #define GF_USE_DEFAULT_KEEPALIVE (-1) typedef enum { -- cgit