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