diff options
author | Rajesh Amaravathi <rajesh@redhat.com> | 2012-02-22 14:51:53 +0530 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2012-02-29 02:10:44 -0800 |
commit | 2da18b6724b7daf7c3a973515fc3d59e7d2c4622 (patch) | |
tree | 3af50b4e3040fd562a0383209a184b625a093522 /xlators/protocol/server | |
parent | 5ad1c2caed743fc10a0645055a825252dfbf77ba (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 'xlators/protocol/server')
-rw-r--r-- | xlators/protocol/server/src/server.c | 5 | ||||
-rw-r--r-- | xlators/protocol/server/src/server.h | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/xlators/protocol/server/src/server.c b/xlators/protocol/server/src/server.c index 0f9195f9e66..bfac42a2799 100644 --- a/xlators/protocol/server/src/server.c +++ b/xlators/protocol/server/src/server.c @@ -1100,5 +1100,10 @@ struct volume_options options[] = { {.key = {"grace-timeout"}, .type = GF_OPTION_TYPE_INT, }, + {.key = {"tcp-window-size"}, + .type = GF_OPTION_TYPE_SIZET, + .min = GF_MIN_SOCKET_WINDOW_SIZE, + .max = GF_MAX_SOCKET_WINDOW_SIZE + }, { .key = {NULL} }, }; diff --git a/xlators/protocol/server/src/server.h b/xlators/protocol/server/src/server.h index 091a02ccba2..4c38c19719d 100644 --- a/xlators/protocol/server/src/server.h +++ b/xlators/protocol/server/src/server.h @@ -32,6 +32,8 @@ #define DEFAULT_BLOCK_SIZE 4194304 /* 4MB */ #define DEFAULT_VOLUME_FILE_PATH CONFDIR "/glusterfs.vol" +#define GF_MAX_SOCKET_WINDOW_SIZE (1 * GF_UNIT_MB) +#define GF_MIN_SOCKET_WINDOW_SIZE (0) typedef struct _server_state server_state_t; |