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