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