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