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/client/src | |
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/client/src')
-rw-r--r-- | xlators/protocol/client/src/client.c | 5 | ||||
-rw-r--r-- | xlators/protocol/client/src/client.h | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/xlators/protocol/client/src/client.c b/xlators/protocol/client/src/client.c index d93a99cff..8fadc0400 100644 --- a/xlators/protocol/client/src/client.c +++ b/xlators/protocol/client/src/client.c @@ -2586,5 +2586,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/client/src/client.h b/xlators/protocol/client/src/client.h index f7267b44a..f5f3aa1fe 100644 --- a/xlators/protocol/client/src/client.h +++ b/xlators/protocol/client/src/client.h @@ -35,6 +35,8 @@ #define CLIENT_CMD_CONNECT "trusted.glusterfs.client-connect" #define CLIENT_CMD_DISCONNECT "trusted.glusterfs.client-disconnect" #define CLIENT_DUMP_LOCKS "trusted.glusterfs.clientlk-dump" +#define GF_MAX_SOCKET_WINDOW_SIZE (1 * GF_UNIT_MB) +#define GF_MIN_SOCKET_WINDOW_SIZE (0) #define CLIENT_GET_REMOTE_FD(conf, fd, remote_fd, op_errno, label) \ do { \ |