The http://review.gluster.org/#/c/12960/, fixes the above mentioned problem. But it may need to call an additional getattr for those files from the client side.
In numbers, for performing readdirp(ls -ltRr ) on dir which contains 10 sub directories , each with 1000 files with 1k size. time taken
before applying the patch:
real 0m32.070s
user 0m0.445s
sys 0m2.213s
after applying the patch:
real 0m34.403s
user 0m0.535s
sys 0m3.046s
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://rhn.redhat.com/errata/RHBA-2016-0193.html