summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src
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 /xlators/mgmt/glusterd/src
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 'xlators/mgmt/glusterd/src')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-op-sm.c31
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volgen.c70
-rw-r--r--xlators/mgmt/glusterd/src/glusterd.c6
3 files changed, 55 insertions, 52 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
index da1299de066..3c1baa7e62e 100644
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
@@ -252,7 +252,7 @@ glusterd_op_stage_set_volume (dict_t *dict, char **op_errstr)
int ret = 0;
char *volname = NULL;
int exists = 0;
- char *key = NULL;
+ char *key = NULL;
char *key_fixed = NULL;
char *value = NULL;
char str[100] = {0, };
@@ -279,7 +279,8 @@ glusterd_op_stage_set_volume (dict_t *dict, char **op_errstr)
ret = dict_get_int32 (dict, "count", &dict_count);
if (ret) {
- gf_log ("", GF_LOG_ERROR, "Count(dict),not set in Volume-Set");
+ gf_log (this->name, GF_LOG_ERROR,
+ "Count(dict),not set in Volume-Set");
goto out;
}
@@ -297,14 +298,14 @@ glusterd_op_stage_set_volume (dict_t *dict, char **op_errstr)
goto out;
#else
ret = -1;
- gf_log ("", GF_LOG_ERROR, "libxml not present in the"
- "system");
+ gf_log (this->name, GF_LOG_ERROR,
+ "libxml not present in the system");
*op_errstr = gf_strdup ("Error: xml libraries not "
"present to produce xml-output");
goto out;
#endif
}
- gf_log ("", GF_LOG_ERROR, "No options received ");
+ gf_log (this->name, GF_LOG_ERROR, "No options received ");
*op_errstr = gf_strdup ("Options not specified");
ret = -1;
goto out;
@@ -312,7 +313,7 @@ glusterd_op_stage_set_volume (dict_t *dict, char **op_errstr)
ret = dict_get_str (dict, "volname", &volname);
if (ret) {
- gf_log ("", GF_LOG_ERROR, "Unable to get volume name");
+ gf_log (this->name, GF_LOG_ERROR, "Unable to get volume name");
goto out;
}
@@ -320,7 +321,7 @@ glusterd_op_stage_set_volume (dict_t *dict, char **op_errstr)
if (!exists) {
snprintf (errstr, sizeof (errstr), "Volume %s does not exist",
volname);
- gf_log ("", GF_LOG_ERROR, "%s", errstr);
+ gf_log (this->name, GF_LOG_ERROR, "%s", errstr);
*op_errstr = gf_strdup (errstr);
ret = -1;
goto out;
@@ -328,7 +329,8 @@ glusterd_op_stage_set_volume (dict_t *dict, char **op_errstr)
ret = glusterd_volinfo_find (volname, &volinfo);
if (ret) {
- gf_log ("", GF_LOG_ERROR, "Unable to allocate memory");
+ gf_log (this->name, GF_LOG_ERROR,
+ "Unable to allocate memory");
goto out;
}
@@ -347,7 +349,8 @@ glusterd_op_stage_set_volume (dict_t *dict, char **op_errstr)
goto out;
}
if (!exists) {
- gf_log ("", GF_LOG_ERROR, "Option with name: %s "
+ gf_log (this->name, GF_LOG_ERROR,
+ "Option with name: %s "
"does not exist", key);
ret = snprintf (errstr, 2048,
"option : %s does not exist",
@@ -364,7 +367,7 @@ glusterd_op_stage_set_volume (dict_t *dict, char **op_errstr)
ret = dict_get_str (dict, str, &value);
if (ret) {
- gf_log ("", GF_LOG_ERROR,
+ gf_log (this->name, GF_LOG_ERROR,
"invalid key,value pair in 'volume set'");
ret = -1;
goto out;
@@ -380,7 +383,7 @@ glusterd_op_stage_set_volume (dict_t *dict, char **op_errstr)
ret = dict_set_str (val_dict, key, value);
if (ret) {
- gf_log ("", GF_LOG_ERROR,
+ gf_log (this->name, GF_LOG_ERROR,
"Unable to set the options in 'volume set'");
ret = -1;
goto out;
@@ -399,7 +402,7 @@ glusterd_op_stage_set_volume (dict_t *dict, char **op_errstr)
}
if (ret) {
- gf_log ("glusterd", GF_LOG_DEBUG, "Could not create temp "
+ gf_log (this->name, GF_LOG_DEBUG, "Could not create temp "
"volfile, some option failed: %s", *op_errstr);
goto out;
}
@@ -424,11 +427,11 @@ out:
if (ret) {
if (!(*op_errstr)) {
*op_errstr = gf_strdup ("Error, Validation Failed");
- gf_log ("glsuterd", GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_DEBUG,
"Error, Cannot Validate option :%s",
*op_errstr);
} else {
- gf_log ("glsuterd", GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_DEBUG,
"Error, Cannot Validate option");
}
}
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c
index f15f57edc22..96df8585f65 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volgen.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c
@@ -109,30 +109,30 @@ struct volopt_map_entry {
static struct volopt_map_entry glusterd_volopt_map[] = {
- {"cluster.lookup-unhashed", "cluster/distribute", NULL, NULL, NO_DOC, 0 },
- {"cluster.min-free-disk", "cluster/distribute", NULL, NULL, NO_DOC, 0 },
- {"cluster.min-free-inodes", "cluster/distribute", NULL, NULL, NO_DOC, 0 },
-
- {"cluster.entry-change-log", "cluster/replicate", NULL, NULL, NO_DOC, 0 },
- {"cluster.read-subvolume", "cluster/replicate", NULL, NULL, NO_DOC, 0 },
- {"cluster.background-self-heal-count", "cluster/replicate", NULL, NULL, NO_DOC, 0 },
- {"cluster.metadata-self-heal", "cluster/replicate", NULL, NULL, NO_DOC, 0 },
- {"cluster.data-self-heal", "cluster/replicate", NULL, NULL, NO_DOC, 0 },
- {"cluster.entry-self-heal", "cluster/replicate", NULL, NULL, NO_DOC, 0 },
- {"cluster.self-heal-daemon", "cluster/replicate", "!self-heal-daemon" , NULL, NO_DOC, 0 },
- {"cluster.strict-readdir", "cluster/replicate", NULL, NULL, NO_DOC, 0 },
- {"cluster.self-heal-window-size", "cluster/replicate", "data-self-heal-window-size", NULL, DOC, 0},
- {"cluster.data-change-log", "cluster/replicate", NULL, NULL, NO_DOC, 0 },
- {"cluster.metadata-change-log", "cluster/replicate", NULL, NULL, NO_DOC, 0 },
- {"cluster.data-self-heal-algorithm", "cluster/replicate", "data-self-heal-algorithm", NULL,DOC, 0},
+ {"cluster.lookup-unhashed", "cluster/distribute", NULL, NULL, NO_DOC, 0},
+ {"cluster.min-free-disk", "cluster/distribute", NULL, NULL, NO_DOC, 0},
+ {"cluster.min-free-inodes", "cluster/distribute", NULL, NULL, NO_DOC, 0},
+
+ {"cluster.entry-change-log", "cluster/replicate", NULL, NULL, NO_DOC, 0},
+ {"cluster.read-subvolume", "cluster/replicate", NULL, NULL, NO_DOC, 0},
+ {"cluster.background-self-heal-count", "cluster/replicate", NULL, NULL, NO_DOC, 0},
+ {"cluster.metadata-self-heal", "cluster/replicate", NULL, NULL, NO_DOC, 0},
+ {"cluster.data-self-heal", "cluster/replicate", NULL, NULL, NO_DOC, 0},
+ {"cluster.entry-self-heal", "cluster/replicate", NULL, NULL, NO_DOC, 0},
+ {"cluster.self-heal-daemon", "cluster/replicate", "!self-heal-daemon", NULL, NO_DOC, 0},
+ {"cluster.strict-readdir", "cluster/replicate", NULL, NULL, NO_DOC, 0},
+ {"cluster.self-heal-window-size", "cluster/replicate", "data-self-heal-window-size", NULL, DOC, 0},
+ {"cluster.data-change-log", "cluster/replicate", NULL, NULL, NO_DOC, 0},
+ {"cluster.metadata-change-log", "cluster/replicate", NULL, NULL, NO_DOC, 0},
+ {"cluster.data-self-heal-algorithm", "cluster/replicate", "data-self-heal-algorithm", NULL,DOC, 0},
{"cluster.quorum-type", "cluster/replicate", "quorum-type", NULL, NO_DOC, 0},
{"cluster.quorum-count", "cluster/replicate", "quorum-count", NULL, NO_DOC, 0},
- {"cluster.stripe-block-size", "cluster/stripe", "block-size", NULL, DOC, 0},
+ {"cluster.stripe-block-size", "cluster/stripe", "block-size", NULL, DOC, 0},
- {VKEY_DIAG_LAT_MEASUREMENT, "debug/io-stats", "latency-measurement", "off", NO_DOC, 0 },
- {"diagnostics.dump-fd-stats", "debug/io-stats", NULL, NULL, NO_DOC, 0 },
- {VKEY_DIAG_CNT_FOP_HITS, "debug/io-stats", "count-fop-hits", "off", NO_DOC, 0 },
+ {VKEY_DIAG_LAT_MEASUREMENT, "debug/io-stats", "latency-measurement", "off", NO_DOC, 0},
+ {"diagnostics.dump-fd-stats", "debug/io-stats", NULL, NULL, NO_DOC, 0},
+ {VKEY_DIAG_CNT_FOP_HITS, "debug/io-stats", "count-fop-hits", "off", NO_DOC, 0},
{"diagnostics.brick-log-level", "debug/io-stats", "!brick-log-level", NULL, DOC, 0},
{"diagnostics.client-log-level", "debug/io-stats", "!client-log-level", NULL, DOC, 0},
@@ -143,28 +143,26 @@ static struct volopt_map_entry glusterd_volopt_map[] = {
{"performance.cache-min-file-size", "performance/io-cache", "min-file-size", NULL, DOC, 0},
{"performance.cache-refresh-timeout", "performance/io-cache", "cache-timeout", NULL, DOC, 0},
{"performance.cache-priority", "performance/io-cache", "priority", NULL, DOC, 0},
- {"performance.cache-size", "performance/io-cache", NULL, NULL, NO_DOC, 0 },
- {"performance.cache-size", "performance/quick-read", NULL, NULL, NO_DOC, 0 },
- {"performance.flush-behind", "performance/write-behind", "flush-behind", NULL, DOC, 0},
+ {"performance.cache-size", "performance/io-cache", NULL, NULL, NO_DOC, 0 },
+ {"performance.cache-size", "performance/quick-read", NULL, NULL, NO_DOC, 0 },
+ {"performance.flush-behind", "performance/write-behind", "flush-behind", NULL, DOC, 0},
{"performance.io-thread-count", "performance/io-threads", "thread-count", DOC, 0},
-
- {"performance.disk-usage-limit", "performance/quota", NULL, NULL, NO_DOC, 0 },
- {"performance.min-free-disk-limit", "performance/quota", NULL, NULL, NO_DOC, 0 },
-
+ {"performance.disk-usage-limit", "performance/quota", NULL, NULL, NO_DOC, 0},
+ {"performance.min-free-disk-limit", "performance/quota", NULL, NULL, NO_DOC, 0},
{"performance.write-behind-window-size", "performance/write-behind", "cache-size", NULL, DOC},
+ {"performance.read-ahead-page-count", "performance/read-ahead", "page-count", NULL, DOC},
- {"performance.read-ahead-page-count", "performance/read-ahead", "page-count", NULL, DOC},
-
- {"network.frame-timeout", "protocol/client", NULL, NULL, NO_DOC, 0 },
- {"network.ping-timeout", "protocol/client", NULL, NULL, NO_DOC, 0 },
- {"network.inode-lru-limit", "protocol/server", NULL, NULL, NO_DOC, 0 },
+ {"network.frame-timeout", "protocol/client", NULL, NULL, NO_DOC, 0},
+ {"network.ping-timeout", "protocol/client", NULL, NULL, NO_DOC, 0},
+ {"network.tcp-window-size", "protocol/client", NULL, NULL, NO_DOC, 0},
+ {"network.tcp-window-size", "protocol/server", NULL, NULL, NO_DOC, 0},
+ {"network.inode-lru-limit", "protocol/server", NULL, NULL, NO_DOC, 0},
{"auth.allow", "protocol/server", "!server-auth", "*", DOC, 0},
{"auth.reject", "protocol/server", "!server-auth", NULL, DOC, 0},
-
- {"transport.keepalive", "protocol/server", "transport.socket.keepalive", NULL, NO_DOC, 0},
- {"server.allow-insecure", "protocol/server", "rpc-auth-allow-insecure", NULL, NO_DOC, 0},
+ {"transport.keepalive", "protocol/server", "transport.socket.keepalive", NULL, NO_DOC, 0},
+ {"server.allow-insecure", "protocol/server", "rpc-auth-allow-insecure", NULL, NO_DOC, 0},
{"performance.write-behind", "performance/write-behind", "!perf", "on", NO_DOC, 0},
{"performance.read-ahead", "performance/read-ahead", "!perf", "on", NO_DOC, 0},
@@ -2108,7 +2106,7 @@ volgen_graph_build_clients (volgen_graph_t *graph, glusterd_volinfo_t *volinfo,
&client_type);
if (!ret && client_type == GF_CLIENT_TRUSTED) {
-
+ str = NULL;
str = glusterd_auth_get_username (volinfo);
if (str) {
ret = xlator_set_option (xl, "username",
diff --git a/xlators/mgmt/glusterd/src/glusterd.c b/xlators/mgmt/glusterd/src/glusterd.c
index f5ec6597663..d7912c95fa9 100644
--- a/xlators/mgmt/glusterd/src/glusterd.c
+++ b/xlators/mgmt/glusterd/src/glusterd.c
@@ -952,12 +952,12 @@ init (xlator_t *this)
conf->valgrind = _gf_false;
ret = dict_get_str (this->options, "brick-with-valgrind", &valgrind_str);
if (ret < 0) {
- gf_log (THIS->name, GF_LOG_ERROR,
+ gf_log (this->name, GF_LOG_DEBUG,
"cannot get brick-with-valgrind value");
}
if (valgrind_str) {
if (gf_string2boolean (valgrind_str, &(conf->valgrind))) {
- gf_log (THIS->name, GF_LOG_WARNING,
+ gf_log (this->name, GF_LOG_WARNING,
"brick-with-valgrind value not a boolean string");
}
}
@@ -1126,8 +1126,10 @@ struct volume_options options[] = {
{ .key = {GEOREP"-log-group"},
.type = GF_OPTION_TYPE_ANY,
},
+#ifdef DEBUG
{ .key = {"brick-with-valgrind"},
.type = GF_OPTION_TYPE_BOOL,
},
+#endif
{ .key = {NULL} },
};