Red Hat Bugzilla – Bug 802513
AFR does not distribute reads well enough
Last modified: 2013-07-24 13:18:44 EDT
After Ben England found that reads were all going to a single subvolume in 3.2.5, I looked into this area of the code. The earlier "first to respond" approach seems to have been abandoned, but the "round robin" approach used in 3.3 does an inadequate job of avoiding hot spots. Consider an application where each client opens a hundred files in the same sequence. Because of the way the round-robin works, these two clients have a 50% chance of their read_child_rr values being in sync and *staying in sync* throughout the entire set of opens.
A better solution would be to have the selection of a read child be random. Better still, it could be based on a hash of the gfid (to distribute reads among files but ensure consistent reads for a single file) or of the gfid plus some client identifier (to provide full distribution even for a single file). The patch will be forthcoming as soon as I have a bug number.
Avati: here's the explanation of option 2, already referenced from http://review.gluster.com/#change,2926,patchset=1 which you rejected without checking.
http://review.gluster.com/2926 is commited to master branch