I'm playing with latest hbase trunk and noticed there is a
region close-then-assign looping.

I have 3 region servers and total regions are about 108, and
the avgLoad is 36.0, then this code in RegionManager.java:

      if (regionsToAssign.size() == 0) {
        // There are no regions waiting to be assigned. This is an opportunity
        // for us to check if this server is overloaded.
        double avgLoad = master.serverManager.getAverageLoad();
        if (avgLoad > 2.0 && thisServersLoad.getNumberOfRegions() > avgLoad) {

If I understand correctly, when there is no outstanding unassigned
regions, then RegionManager tries to check whether a region server
is overloaded by the # of loaded regions on this region server.
Then, it seems to me that avgLoad > 2.0 is quite unrealistic under
current calculation of "avgLoad".

Isn't the better way to consider system load or based on # of loaded
regions and # of requests?

Thanks,
Rong-En Fan

Reply via email to