diff options
author | Krutika Dhananjay <kdhananj@redhat.com> | 2017-09-07 18:48:34 +0530 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2017-09-24 06:22:07 +0000 |
commit | 956d43d6e89d40ee683547003b876f1f456f03b6 (patch) | |
tree | 55a2289be12d67edba0e6a3b4d9b7341ce46532a /glusterfsd | |
parent | f449e53df7c07301b495b4ff688d165026dfd2d0 (diff) |
mount/fuse: Make event-history feature configurable
... and disable it by default.
This is because having it disabled seems to improve performance.
This could be due to the lock contention by the different epoll threads
on the circular buff lock in the fop cbks just before writing their response
to /dev/fuse.
Just to provide some data - wrt ovirt-gluster hyperconverged
environment, I saw an increase in IOPs by 12K with event-history
disabled for randrom read workload.
Usage:
mount -t glusterfs -o event-history=on $HOSTNAME:$VOLNAME $MOUNTPOINT
OR
glusterfs --event-history=on --volfile-server=$HOSTNAME --volfile-id=$VOLNAME $MOUNTPOINT
Change-Id: Ia533788d309c78688a315dc8cd04d30fad9e9485
BUG: 1467614
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Diffstat (limited to 'glusterfsd')
-rw-r--r-- | glusterfsd/src/glusterfsd.c | 28 | ||||
-rw-r--r-- | glusterfsd/src/glusterfsd.h | 1 |
2 files changed, 29 insertions, 0 deletions
diff --git a/glusterfsd/src/glusterfsd.c b/glusterfsd/src/glusterfsd.c index 31a9bf71688..76e57d9c165 100644 --- a/glusterfsd/src/glusterfsd.c +++ b/glusterfsd/src/glusterfsd.c @@ -246,6 +246,8 @@ static struct argp_option gf_options[] = { "Enable localtime logging"}, {"process-name", ARGP_PROCESS_NAME_KEY, "PROCESS-NAME", OPTION_HIDDEN, "option to specify the process type" }, + {"event-history", ARGP_FUSE_EVENT_HISTORY_KEY, "BOOL", + OPTION_ARG_OPTIONAL, "disable/enable fuse event-history"}, {0, 0, 0, 0, "Miscellaneous Options:"}, {0, } }; @@ -556,6 +558,15 @@ set_fuse_mount_options (glusterfs_ctx_t *ctx, dict_t *options) goto err; } } + if (cmd_args->event_history) { + ret = dict_set_str (options, "event-history", + cmd_args->event_history); + if (ret < 0) { + gf_msg ("glusterfsd", GF_LOG_ERROR, 0, glusterfsd_msg_4, + "event-history"); + goto err; + } + } ret = 0; err: return ret; @@ -1292,6 +1303,23 @@ no_oom_api: } cmd_args->subdir_mount = gf_strdup (arg); break; + case ARGP_FUSE_EVENT_HISTORY_KEY: + if (!arg) + arg = "no"; + + if (gf_string2boolean (arg, &b) == 0) { + if (b) { + cmd_args->event_history = "yes"; + } else { + cmd_args->event_history = "no"; + } + + break; + } + + argp_failure (state, -1, 0, + "unknown event-history setting \"%s\"", arg); + break; } return 0; diff --git a/glusterfsd/src/glusterfsd.h b/glusterfsd/src/glusterfsd.h index 99d9ec4e258..058a43fd385 100644 --- a/glusterfsd/src/glusterfsd.h +++ b/glusterfsd/src/glusterfsd.h @@ -99,6 +99,7 @@ enum argp_option_keys { ARGP_LOCALTIME_LOGGING_KEY = 177, ARGP_SUBDIR_MOUNT_KEY = 178, ARGP_PROCESS_NAME_KEY = 179, + ARGP_FUSE_EVENT_HISTORY_KEY = 180, }; struct _gfd_vol_top_priv { |