17b94a
From 6d2e12a53ef0bcbeea274c47537a0c707a3f7b1e Mon Sep 17 00:00:00 2001
17b94a
From: N Balachandran <nbalacha@redhat.com>
17b94a
Date: Fri, 20 Sep 2019 13:30:42 +0530
17b94a
Subject: [PATCH 338/344] glusterfs/fuse: Reduce the default lru-limit value
17b94a
17b94a
The current lru-limit value still uses memory for
17b94a
upto 128K inodes.
17b94a
Reduce the default value of lru-limit to 64K.
17b94a
17b94a
> Upstream https://review.gluster.org/23461
17b94a
> Change-Id: Ica2dd4f8f5fde45cb5180d8f02c3d86114ac52b3
17b94a
> Fixes: bz#1753880
17b94a
> Signed-off-by: N Balachandran <nbalacha@redhat.com>
17b94a
> Signed-off-by: Csaba Henk <csaba@redhat.com>
17b94a
17b94a
BUG: 1763208
17b94a
Change-Id: I04ab39b5278e702aacdceebfa5b63702b9f9703b
17b94a
Signed-off-by: Csaba Henk <csaba@redhat.com>
17b94a
Reviewed-on: https://code.engineering.redhat.com/gerrit/187535
17b94a
Tested-by: RHGS Build Bot <nigelb@redhat.com>
17b94a
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
17b94a
---
17b94a
 doc/mount.glusterfs.8                | 2 +-
17b94a
 glusterfsd/src/glusterfsd.c          | 2 +-
17b94a
 xlators/mount/fuse/src/fuse-bridge.c | 2 +-
17b94a
 xlators/mount/fuse/src/fuse-bridge.h | 2 +-
17b94a
 4 files changed, 4 insertions(+), 4 deletions(-)
17b94a
17b94a
diff --git a/doc/mount.glusterfs.8 b/doc/mount.glusterfs.8
17b94a
index b35b362..87a5669 100644
17b94a
--- a/doc/mount.glusterfs.8
17b94a
+++ b/doc/mount.glusterfs.8
17b94a
@@ -123,7 +123,7 @@ Provide list of backup volfile servers in the following format [default: None]
17b94a
 .TP
17b94a
 .TP
17b94a
 \fBlru-limit=\fRN
17b94a
-Set fuse module's limit for number of inodes kept in LRU list to N [default: 131072]
17b94a
+Set fuse module's limit for number of inodes kept in LRU list to N [default: 65536]
17b94a
 .TP
17b94a
 .TP
17b94a
 \fBinvalidate-limit=\fRN
17b94a
diff --git a/glusterfsd/src/glusterfsd.c b/glusterfsd/src/glusterfsd.c
17b94a
index 0856471..974fb88 100644
17b94a
--- a/glusterfsd/src/glusterfsd.c
17b94a
+++ b/glusterfsd/src/glusterfsd.c
17b94a
@@ -211,7 +211,7 @@ static struct argp_option gf_options[] = {
17b94a
      "Resolve all auxiliary groups in fuse translator (max 32 otherwise)"},
17b94a
     {"lru-limit", ARGP_FUSE_LRU_LIMIT_KEY, "N", 0,
17b94a
      "Set fuse module's limit for number of inodes kept in LRU list to N "
17b94a
-     "[default: 131072]"},
17b94a
+     "[default: 65536]"},
17b94a
     {"invalidate-limit", ARGP_FUSE_INVALIDATE_LIMIT_KEY, "N", 0,
17b94a
      "Suspend inode invalidations implied by 'lru-limit' if the number of "
17b94a
      "outstanding invalidations reaches N"},
17b94a
diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c
17b94a
index 8b2e7f0..ebe5c28 100644
17b94a
--- a/xlators/mount/fuse/src/fuse-bridge.c
17b94a
+++ b/xlators/mount/fuse/src/fuse-bridge.c
17b94a
@@ -6972,7 +6972,7 @@ struct volume_options options[] = {
17b94a
     {
17b94a
         .key = {"lru-limit"},
17b94a
         .type = GF_OPTION_TYPE_INT,
17b94a
-        .default_value = "131072",
17b94a
+        .default_value = "65536",
17b94a
         .min = 0,
17b94a
         .description = "makes glusterfs invalidate kernel inodes after "
17b94a
                        "reaching this limit (0 means 'unlimited')",
17b94a
diff --git a/xlators/mount/fuse/src/fuse-bridge.h b/xlators/mount/fuse/src/fuse-bridge.h
17b94a
index 2311582..cf4479c 100644
17b94a
--- a/xlators/mount/fuse/src/fuse-bridge.h
17b94a
+++ b/xlators/mount/fuse/src/fuse-bridge.h
17b94a
@@ -189,7 +189,7 @@ struct fuse_private {
17b94a
     gf_boolean_t flush_handle_interrupt;
17b94a
     gf_boolean_t fuse_auto_inval;
17b94a
 
17b94a
-    /* LRU Limit, if not set, default is 128k for now */
17b94a
+    /* LRU Limit, if not set, default is 64k for now */
17b94a
     uint32_t lru_limit;
17b94a
     uint32_t invalidate_limit;
17b94a
 };
17b94a
-- 
17b94a
1.8.3.1
17b94a