On Sun, Jun 8, 2008 at 11:19 AM, Bryan Duxbury <[EMAIL PROTECTED]> wrote: > We have an issue open tracking the fact that the rebalancing code has a > tendency to oscillate. I haven't had the time to look at it for a while. It > definitely needs some attention. > > The point of checking whether the avgLoad is > 2.0 is to ensure that no > rebalancing occurs before there are more regions than there are servers. It > doesn't do anything in that case.
Aha, yes.... I mis-read the code... I will watch HBASE-71. Sorry for the noise. Regards, Rong-En Fan > > -Bryan > > On Jun 7, 2008, at 7:55 PM, Rong-en Fan wrote: > >> On Sun, Jun 8, 2008 at 10:53 AM, Rong-en Fan <[EMAIL PROTECTED]> wrote: >>> >>> 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". >> >> Forget to mention, under my situation, all 3 boxes are kicking regions >> among them as all loaded regions > avgLoad... even after assign >> some to others. >> >> Regards, >> Rong-En Fan >> >>> Isn't the better way to consider system load or based on # of loaded >>> regions and # of requests? >>> >>> Thanks, >>> Rong-En Fan >>> > >