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:
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.
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