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:
Patches to be backported: https://review.gluster.org/#/q/status:merged+project:glusterfs+branch:master+topic:bug-1423410 https://review.gluster.org/#/q/project:glusterfs+branch:master+topic:bug-1401812
Additional patches: https://review.gluster.org/#/c/16902/
(In reply to Poornima G from comment #6) Patches to be backported: https://review.gluster.org/#/q/status:merged+project:glusterfs+branch:master+topic:bug-1423410 https://review.gluster.org/#/q/project:glusterfs+branch:master+topic:bug-1401812 https://review.gluster.org/#/c/16902/ https://review.gluster.org/#/c/16948/ https://review.gluster.org/#/c/16950/ https://review.gluster.org/#/c/16953/
Few more downstream patches: https://code.engineering.redhat.com/gerrit/#/c/102516/ https://code.engineering.redhat.com/gerrit/#/c/102518/ https://code.engineering.redhat.com/gerrit/#/c/102612/ https://code.engineering.redhat.com/gerrit/#/c/102614/
https://code.engineering.redhat.com/gerrit/#/c/103635/
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
Ack
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