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