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