summaryrefslogtreecommitdiffstats
path: root/rpc/rpc-transport/socket/src/socket.h
diff options
context:
space:
mode:
authorRajesh Amaravathi <rajesh@redhat.com>2012-02-22 14:51:53 +0530
committerVijay Bellur <vijay@gluster.com>2012-02-29 02:10:44 -0800
commit2da18b6724b7daf7c3a973515fc3d59e7d2c4622 (patch)
tree3af50b4e3040fd562a0383209a184b625a093522 /rpc/rpc-transport/socket/src/socket.h
parent5ad1c2caed743fc10a0645055a825252dfbf77ba (diff)
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 <sane_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 <rajesh@redhat.com> Reviewed-on: http://review.gluster.com/2821 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'rpc/rpc-transport/socket/src/socket.h')
-rw-r--r--rpc/rpc-transport/socket/src/socket.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/rpc/rpc-transport/socket/src/socket.h b/rpc/rpc-transport/socket/src/socket.h
index 7f0fb6bc356..082977a2ac5 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 {