Bug 1427096

Summary: [RFE] [Samba] Better readdir performance with parallel readdir feature
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Poornima G <pgurusid>
Component: sambaAssignee: Poornima G <pgurusid>
Status: CLOSED ERRATA QA Contact: Vivek Das <vdas>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rhgs-3.3CC: amukherj, asrivast, pgurusid, rcyriac, rhinduja, rhs-smb, rjoseph
Target Milestone: ---Keywords: FutureFeature
Target Release: RHGS 3.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.8.4-23 Doc Type: Enhancement
Doc Text:
Find and recursive list operations on small directories from SMB clients are improved with the addition of parallel directory reads.
Story Points: ---
Clone Of:
: 1436707 (view as bug list) Environment:
Last Closed: 2017-09-21 04:33:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1424995    
Bug Blocks: 1417138, 1436707    

Description Poornima G 2017-02-27 11:09:11 UTC
Description of problem:
Currently readdirp is sequential at the dht layer. This make find and recursive listing of small directories very slow(directory whose content can be accomodated in one readdirp call, eg: ~600 entries if buf size is 128k).

With this feature, on a 2, 5, 10, 25 brick setup we saw ~5, 100, 400, 450% improvement in readdir of small directories.


The number of readdirp fops
required to fetch the ls -l -R for nested directories is:
no. of fops = (x + 1) * m * n
n = number of bricks
m = number of directories
x = number of readdirp calls required to fetch the dentries completely
(this depends on the size of the directory and the readdirp buf size)
1 = readdirp fop that is sent to just detect the end of directory.

Eg: Let's say, to list 800 directories with files ~300 each and readdirp
buf size 128K, on distribute 6:
(1+1) * 800 * 6 = 9600 fops

And all the readdirp fops are not sent in parallel to all the bricks, but
sequentially. This patch is a first step towards making readdirp parallel
With parallel readdirp, the number of fops may not decrease drastically
but since they are issued in parallel, it will increase the throughput.


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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 7 Poornima G 2017-03-20 05:11:09 UTC
Additional patches:
https://review.gluster.org/#/c/16902/

Comment 12 Vivek Das 2017-04-24 09:37:41 UTC
Basic sanity along with other tests including multiple client test cases are carried after enabling parallel-readdir. Things seems to be working for samba.

The bug below is not yet verified as per comment 6 need some more tests, but certainly not blocking the testing.
https://bugzilla.redhat.com/show_bug.cgi?id=1437960

Comment 14 Poornima G 2017-09-11 06:51:58 UTC
Ack

Comment 16 errata-xmlrpc 2017-09-21 04:33:25 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:2774

Comment 17 errata-xmlrpc 2017-09-21 04:57:48 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:2774