diff options
author | Raghavendra Gowdappa <rgowdapp@redhat.com> | 2019-02-08 09:51:17 +0530 |
---|---|---|
committer | Raghavendra G <rgowdapp@redhat.com> | 2019-02-11 11:15:40 +0000 |
commit | 2b5aa4489de2017a03bcb6ec8986286f0c76a670 (patch) | |
tree | d35a31c9e0e0d25bbdd7a244c9d5868c3f22316b /xlators/mgmt | |
parent | 59ce06a73f15897acf5c712ac5073650c1b505bf (diff) |
performance/md-cache: introduce an option to control invalidation of inodes
Explicit invalidation by calling inode_invalidate is necessary when
same (meta)data is shared/access across multiple mounts. Without an
explicit inode_invalidate call, caches in the mount which didn't
witness writes wouldn't be aware of changes as writes wouldn't have
passed through them. However, if (meta)data is not shared, all
relevant I/O goes through the cache of single mount and hence is
coherent with (meta)data on bricks always. So, explicit inode
invalidation can be disabled for this case which gives a huge
performance boost for workloads that write data and then immediately
read the data they just wrote. Note that otherwise, local writes
(which pass through the cache) will change ctime and cause unnecessary
invalidations.
The name of the option that controls this behavior is
"performance.global-cache-invalidation". This option is global and it
purges caches both in glusterfs and kernel stack for native FUSE
mounts. For non-native FUSE mounts, it purges cache only from
glusterfs stack. This option is effective only when
performance.stat-prefetch is on.
Note that there is a similar option "performance.cache-invalidation",
but the scope of that option is limited to quick-read and md-cache.
Change-Id: I462bb4b65ff9aae1f6ba76f50b1f2f94fb10323b
Signed-off-by: Raghavendra Gowdappa <rgowdapp@redhat.com>
updates: bz#1664934
Diffstat (limited to 'xlators/mgmt')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-volume-set.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-set.c b/xlators/mgmt/glusterd/src/glusterd-volume-set.c index 7340fa07fca..46eda9379ac 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volume-set.c +++ b/xlators/mgmt/glusterd/src/glusterd-volume-set.c @@ -1795,6 +1795,12 @@ struct volopt_map_entry glusterd_volopt_map[] = { .op_version = GD_OP_VERSION_3_9_0, .flags = VOLOPT_FLAG_CLIENT_OPT}, + {.key = "performance.global-cache-invalidation", + .voltype = "performance/md-cache", + .option = "global-cache-invalidation", + .op_version = GD_OP_VERSION_7_0, + .flags = VOLOPT_FLAG_CLIENT_OPT}, + /* Feature translators */ {.key = "features.uss", .voltype = "features/snapview-server", |