Bug 1442569 - Implement Negative lookup cache feature to improve create performance
Summary: Implement Negative lookup cache feature to improve create performance
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: unclassified
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Poornima G
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-04-15 17:33 UTC by Poornima G
Modified: 2017-09-05 17:26 UTC (History)
1 user (show)

Fixed In Version: glusterfs-3.12.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-05-30 18:50:19 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github https://github.com/gluster glusterfs issues 82 0 None None None 2020-08-14 10:45:24 UTC

Description Poornima G 2017-04-15 17:33:50 UTC
Description of problem:

Before creating any file negative lookups(1 in Fuse, 5-6 in SMB etc.) are sent to verify if the file already exists. By serving these lookup from the cache when possible, increases the create performance by multiple folds in SMB access and some percentage in Fuse/NFS access.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Worker Ant 2017-04-15 17:34:59 UTC
REVIEW: https://review.gluster.org/16952 (Implement negative lookup cache) posted (#12) for review on master by Poornima G (pgurusid)

Comment 2 Worker Ant 2017-04-15 17:51:48 UTC
REVIEW: https://review.gluster.org/16952 (Implement negative lookup cache) posted (#13) for review on master by Poornima G (pgurusid)

Comment 3 Worker Ant 2017-04-16 16:52:33 UTC
REVIEW: https://review.gluster.org/16952 (Implement negative lookup cache) posted (#14) for review on master by Poornima G (pgurusid)

Comment 4 Worker Ant 2017-04-17 06:10:46 UTC
REVIEW: https://review.gluster.org/16952 (Implement negative lookup cache) posted (#15) for review on master by Poornima G (pgurusid)

Comment 5 Worker Ant 2017-04-17 09:22:39 UTC
REVIEW: https://review.gluster.org/16952 (Implement negative lookup cache) posted (#16) for review on master by Poornima G (pgurusid)

Comment 6 Worker Ant 2017-04-17 14:09:47 UTC
REVIEW: https://review.gluster.org/16952 (Implement negative lookup cache) posted (#17) for review on master by Poornima G (pgurusid)

Comment 7 Worker Ant 2017-04-18 07:04:17 UTC
REVIEW: https://review.gluster.org/16952 (Implement negative lookup cache) posted (#18) for review on master by Poornima G (pgurusid)

Comment 8 Worker Ant 2017-04-18 08:53:47 UTC
REVIEW: https://review.gluster.org/16952 (Implement negative lookup cache) posted (#19) for review on master by Poornima G (pgurusid)

Comment 9 Worker Ant 2017-04-19 03:32:30 UTC
REVIEW: https://review.gluster.org/16952 (Implement negative lookup cache) posted (#20) for review on master by Pranith Kumar Karampuri (pkarampu)

Comment 10 Worker Ant 2017-04-20 04:18:55 UTC
COMMIT: https://review.gluster.org/16952 committed in master by Pranith Kumar Karampuri (pkarampu) 
------
commit 561766e45a323be3d5c521fdb47f68d71cea776e
Author: Poornima G <pgurusid>
Date:   Wed Apr 12 15:24:14 2017 +0530

    Implement negative lookup cache
    
    Before creating any file negative lookups(1 in Fuse, 4 in SMB etc.)
    are sent to verify if the file already exists. By serving these
    lookups from the cache when possible, increases the create
    performance by multiple folds in SMB access and some percentage
    in Fuse/NFS access.
    
    Feature page: https://review.gluster.org/#/c/16436
    
    Updates #82
    Change-Id: Ib1c0e7ac7a386f943d84f6398c27f9a03665b2a4
    BUG: 1442569
    Signed-off-by: Poornima G <pgurusid>
    Reviewed-on: https://review.gluster.org/16952
    Reviewed-by: Pranith Kumar Karampuri <pkarampu>
    Tested-by: Pranith Kumar Karampuri <pkarampu>
    Smoke: Gluster Build System <jenkins.org>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.org>

Comment 11 Worker Ant 2017-04-25 09:36:39 UTC
REVIEW: https://review.gluster.org/17110 (nl-cache: Fix the issue in refd_inode counting and prune the cache) posted (#1) for review on master by Poornima G (pgurusid)

Comment 12 Worker Ant 2017-04-25 10:29:51 UTC
REVIEW: https://review.gluster.org/17110 (nl-cache: Fix the issue in refd_inode counting and prune the cache) posted (#2) for review on master by Poornima G (pgurusid)

Comment 13 Worker Ant 2017-04-26 09:02:10 UTC
COMMIT: https://review.gluster.org/17110 committed in master by Niels de Vos (ndevos) 
------
commit 22e942dd201734761f37eaf9b10970e7da9d9a14
Author: Poornima G <pgurusid>
Date:   Tue Apr 25 15:04:34 2017 +0530

    nl-cache: Fix the issue in refd_inode counting and prune the cache
    
    Change-Id: I5b9beb8502667bc3876385900bc01b6491348716
    BUG: 1442569
    Signed-off-by: Poornima G <pgurusid>
    Reviewed-on: https://review.gluster.org/17110
    Reviewed-by: Pranith Kumar Karampuri <pkarampu>
    Tested-by: Pranith Kumar Karampuri <pkarampu>
    Smoke: Gluster Build System <jenkins.org>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.org>
    Reviewed-by: Niels de Vos <ndevos>

Comment 14 Worker Ant 2017-05-01 09:27:33 UTC
REVIEW: https://review.gluster.org/17143 (nl-cache: free nlc_conf_t in fini()) posted (#1) for review on master by Niels de Vos (ndevos)

Comment 15 Worker Ant 2017-05-02 15:25:12 UTC
COMMIT: https://review.gluster.org/17143 committed in master by Jeff Darcy (jeff.us) 
------
commit d7e9dcfad228f385ad64526b1f06b55e98b06964
Author: Niels de Vos <ndevos>
Date:   Fri Apr 21 18:36:58 2017 +0200

    nl-cache: free nlc_conf_t in fini()
    
    The (xlator_t*)->private structure in negative-lookup-cache is allocated
    in the init() function of the xlator, but never free'd. Valgrind
    detected this as:
    
        656 bytes in 1 blocks are definitely lost in loss record X of Y
           at 0x..+ calloc (/builddir/build/BUILD/valgrind-3.11.0/coregrind/m_replacemalloc/vg_replace_malloc.c:711)
           by 0x.. __gf_calloc (/usr/src/debug/glusterfs-3.11dev/libglusterfs/src/mem-pool.c:117)
           by 0x.. init (/usr/src/debug/glusterfs-3.11dev/xlators/performance/nl-cache/src/nl-cache.c:669)
           by 0x.. __xlator_init (/usr/src/debug/glusterfs-3.11dev/libglusterfs/src/xlator.c:472)
           by 0x.. xlator_init (/usr/src/debug/glusterfs-3.11dev/libglusterfs/src/xlator.c:498)
           by 0x.. glusterfs_graph_init (/usr/src/debug/glusterfs-3.11dev/libglusterfs/src/graph.c:321)
           by 0x.. glusterfs_graph_activate (/usr/src/debug/glusterfs-3.11dev/libglusterfs/src/graph.c:693)
           by 0x.. glfs_process_volfp (/usr/src/debug/glusterfs-3.11dev/api/src/glfs-mgmt.c:79)
           by 0x.. glfs_volumes_init (/usr/src/debug/glusterfs-3.11dev/api/src/glfs.c:160)
           by 0x.. glfs_init_common (/usr/src/debug/glusterfs-3.11dev/api/src/glfs.c:868)
           by 0x.. glfs_init@@GFAPI_3.4.0 (/usr/src/debug/glusterfs-3.11dev/api/src/glfs.c:913)
           by 0x.. main (/root/gluster-debug/gfapi-load-volfile/gfapi-load-volfile.c:54)
    
    When the xlators is unloaded, it should free the resources it allocated.
    This can easily be done in the fini() function.
    
    Change-Id: I079e78cc207145bc542e2282fc4cf2bb4dadc28a
    BUG: 1442569
    Signed-off-by: Niels de Vos <ndevos>
    Reviewed-on: https://review.gluster.org/17143
    Smoke: Gluster Build System <jenkins.org>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.org>
    Reviewed-by: Jeff Darcy <jeff.us>

Comment 16 Worker Ant 2017-05-12 05:00:57 UTC
REVIEW: https://review.gluster.org/17261 (nl-cache: Remove the max limit for nl-cache-limit and nl-cache-timeout) posted (#1) for review on master by Poornima G (pgurusid)

Comment 17 Worker Ant 2017-05-15 12:18:12 UTC
COMMIT: https://review.gluster.org/17261 committed in master by Jeff Darcy (jeff.us) 
------
commit 64f41b962b643b966e376a10a16671c569bf6299
Author: Poornima G <pgurusid>
Date:   Fri May 12 10:27:28 2017 +0530

    nl-cache: Remove the max limit for nl-cache-limit and nl-cache-timeout
    
    The max limit is better unset when arbitrary. Otherwise in the future
    if max has to be changed, it can break backward compatility.
    
    Change-Id: I4337a3789a2d0d5cc8e2bf687a22536c97608461
    BUG: 1442569
    Signed-off-by: Poornima G <pgurusid>
    Reviewed-on: https://review.gluster.org/17261
    Smoke: Gluster Build System <jenkins.org>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.org>
    Reviewed-by: Jeff Darcy <jeff.us>

Comment 18 Shyamsundar 2017-05-30 18:50:19 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.11.0, please open a new bug report.

glusterfs-3.11.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://lists.gluster.org/pipermail/announce/2017-May/000073.html
[2] https://www.gluster.org/pipermail/gluster-users/

Comment 19 Shyamsundar 2017-09-05 17:26:58 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.12.0, please open a new bug report.

glusterfs-3.12.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://lists.gluster.org/pipermail/announce/2017-September/000082.html
[2] https://www.gluster.org/pipermail/gluster-users/


Note You need to log in before you can comment on or make changes to this bug.