Bug 1802451 - Optimize posix code to improve file creation
Summary: Optimize posix code to improve file creation
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: GlusterFS
Classification: Community
Component: posix
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Mohit Agrawal
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-02-13 07:19 UTC by Mohit Agrawal
Modified: 2020-03-12 12:28 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2020-03-12 12:28:40 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Mohit Agrawal 2020-02-13 07:19:11 UTC
Description of problem:
Problem: Before executing a fop in POSIX xlator it builds an internal
         path based on GFID.To validate the path it call's (l)stat
         system call and while .glusterfs is heavily loaded kernel takes
         time to lookup inode and due to that performance drops

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


How reproducible:
Untar kernel tar 100 times from 6 different clients on 24x3 
distribute-replicate environment and observe the time

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Mohit Agrawal 2020-02-13 07:23:23 UTC
Solution: To improve the same we followed two ways 
1) Keep open fd specific to first level directory(gfid[0]) in .glusterfs, it would force to kernel keep the inodes from all those files in the cache. In case of memory pressure kernel won't uncached first level inodes. We need to open 256 fd's per brick to access the entry faster.
2) Use at based call's(like fstatat, lstatat, readlinkat) access relative path to reduce path based lookup time.

After applying the patch https://review.gluster.org/#/c/glusterfs/+/23783/ performance is improved in 
total operation.

Comment 2 Worker Ant 2020-03-12 12:28:40 UTC
This bug is moved to https://github.com/gluster/glusterfs/issues/891, and will be tracked there from now on. Visit GitHub issues URL for further details


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