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