17b94a
From d45c64e17e1eb8003ac1086cbd3abea32414c7f9 Mon Sep 17 00:00:00 2001
17b94a
From: Raghavendra Gowdappa <rgowdapp@redhat.com>
17b94a
Date: Tue, 12 Feb 2019 18:33:44 +0530
17b94a
Subject: [PATCH 345/346] read-ahead/io-cache: turn off by default
17b94a
17b94a
We've found perf xlators io-cache and read-ahead not adding any
17b94a
performance improvement. At best read-ahead is redundant due to kernel
17b94a
read-ahead and at worst io-cache is degrading the performance for
17b94a
workloads that doesn't involve re-read. Given that VFS already have
17b94a
both these functionalities, this patch makes these two
17b94a
translators turned off by default for native fuse mounts.
17b94a
17b94a
For non-native fuse mounts like gfapi (NFS-ganesha/samba) we can have
17b94a
these xlators on by having custom profiles.
17b94a
17b94a
>Change-Id: Ie7535788909d4c741844473696f001274dc0bb60
17b94a
>Signed-off-by: Raghavendra Gowdappa <rgowdapp@redhat.com>
17b94a
>fixes: bz#1676479
17b94a
Upstream fix link: https://review.gluster.org/#/c/glusterfs/+/22203/
17b94a
17b94a
BUG: 1788656
17b94a
Change-Id: Ie7535788909d4c741844473696f001274dc0bb60
17b94a
Signed-off-by: Sunil Kumar Acharya <sheggodu@redhat.com>
17b94a
Reviewed-on: https://code.engineering.redhat.com/gerrit/188967
17b94a
Tested-by: RHGS Build Bot <nigelb@redhat.com>
17b94a
---
17b94a
 tests/basic/ec/self-heal.t                      | 2 ++
17b94a
 tests/basic/glusterd/volfile_server_switch.t    | 2 +-
17b94a
 xlators/mgmt/glusterd/src/glusterd-volume-set.c | 4 ++--
17b94a
 3 files changed, 5 insertions(+), 3 deletions(-)
17b94a
17b94a
diff --git a/tests/basic/ec/self-heal.t b/tests/basic/ec/self-heal.t
17b94a
index d217559..6329bb6 100644
17b94a
--- a/tests/basic/ec/self-heal.t
17b94a
+++ b/tests/basic/ec/self-heal.t
17b94a
@@ -131,6 +131,8 @@ TEST $CLI volume create $V0 redundancy 2 $H0:$B0/${V0}{0..5}
17b94a
 TEST $CLI volume set $V0 client-log-level DEBUG
17b94a
 #Write-behind has a bug where lookup can race over write which leads to size mismatch on the mount after a 'cp'
17b94a
 TEST $CLI volume set $V0 performance.write-behind off
17b94a
+#md-cache can return stale stat due to default timeout being 1 sec
17b94a
+TEST $CLI volume set $V0 performance.stat-prefetch off
17b94a
 EXPECT "Created" volinfo_field $V0 'Status'
17b94a
 TEST $CLI volume start $V0
17b94a
 EXPECT_WITHIN $PROCESS_UP_TIMEOUT "Started" volinfo_field $V0 'Status'
17b94a
diff --git a/tests/basic/glusterd/volfile_server_switch.t b/tests/basic/glusterd/volfile_server_switch.t
17b94a
index 3090609..e11cfed 100644
17b94a
--- a/tests/basic/glusterd/volfile_server_switch.t
17b94a
+++ b/tests/basic/glusterd/volfile_server_switch.t
17b94a
@@ -34,7 +34,7 @@ TEST glusterfs --volfile-id=/$V0 --volfile-server=$H1 --volfile-server=$H2 --vol
17b94a
 
17b94a
 TEST kill_glusterd 1
17b94a
 
17b94a
-TEST $CLI_2 volume set $V0 performance.io-cache off
17b94a
+TEST $CLI_2 volume set $V0 performance.write-behind off
17b94a
 
17b94a
 # make sure by this time directory will be created
17b94a
 # TODO: suggest ideal time to wait
17b94a
diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-set.c b/xlators/mgmt/glusterd/src/glusterd-volume-set.c
17b94a
index 16601a2..9001b88 100644
17b94a
--- a/xlators/mgmt/glusterd/src/glusterd-volume-set.c
17b94a
+++ b/xlators/mgmt/glusterd/src/glusterd-volume-set.c
17b94a
@@ -2235,7 +2235,7 @@ struct volopt_map_entry glusterd_volopt_map[] = {
17b94a
     {.key = "performance.read-ahead",
17b94a
      .voltype = "performance/read-ahead",
17b94a
      .option = "!perf",
17b94a
-     .value = "on",
17b94a
+     .value = "off",
17b94a
      .op_version = 1,
17b94a
      .description = "enable/disable read-ahead translator in the volume.",
17b94a
      .flags = VOLOPT_FLAG_CLIENT_OPT | VOLOPT_FLAG_XLATOR_OPT},
17b94a
@@ -2249,7 +2249,7 @@ struct volopt_map_entry glusterd_volopt_map[] = {
17b94a
     {.key = "performance.io-cache",
17b94a
      .voltype = "performance/io-cache",
17b94a
      .option = "!perf",
17b94a
-     .value = "on",
17b94a
+     .value = "off",
17b94a
      .op_version = 1,
17b94a
      .description = "enable/disable io-cache translator in the volume.",
17b94a
      .flags = VOLOPT_FLAG_CLIENT_OPT},
17b94a
-- 
17b94a
1.8.3.1
17b94a