[jira] [Updated] (HBASE-14604) Improve MoveCostFunction in StochasticLoadBalancer
[ https://issues.apache.org/jira/browse/HBASE-14604?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ted Yu updated HBASE-14604: --- Hadoop Flags: Reviewed Fix Version/s: 0.98.16 1.3.0 2.0.0 > Improve MoveCostFunction in StochasticLoadBalancer > -- > > Key: HBASE-14604 > URL: https://issues.apache.org/jira/browse/HBASE-14604 > Project: HBase > Issue Type: Bug > Components: Balancer >Affects Versions: 0.98.15 >Reporter: Guanghao Zhang >Assignee: Guanghao Zhang > Fix For: 2.0.0, 1.3.0, 0.98.16 > > Attachments: HBASE-14604-0.98.patch, HBASE-14604-0.98_v1.patch, > HBASE-14604-trunk.patch, HBASE-14604-trunk_v1.patch, HBASE-14604_98.diff, > HBASE-14604_98_with_ut.diff > > > The code in MoveCoseFunction: > {code} > return scale(0, cluster.numRegions + META_MOVE_COST_MULT, moveCost); > {code} > It uses cluster.numRegions + META_MOVE_COST_MULT as the max value when scale > moveCost to [0,1]. But this should use maxMoves as the max value when cluster > have a lot of regions. > Assume a cluster have 1 regions, maxMoves is 2500, it only scale moveCost > to [0, 0.25]. > Improve moveCost by use Math.min(cluster.numRegions, maxMoves) as the max > cost, so it can scale moveCost to [0,1]. > {code} > return scale(0, Math.min(cluster.numRegions, maxMoves) + META_MOVE_COST_MULT, > moveCost); > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HBASE-14604) Improve MoveCostFunction in StochasticLoadBalancer
[ https://issues.apache.org/jira/browse/HBASE-14604?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Guanghao Zhang updated HBASE-14604: --- Attachment: HBASE-14604_98_with_ut.diff > Improve MoveCostFunction in StochasticLoadBalancer > -- > > Key: HBASE-14604 > URL: https://issues.apache.org/jira/browse/HBASE-14604 > Project: HBase > Issue Type: Bug > Components: Balancer >Reporter: Guanghao Zhang >Assignee: Guanghao Zhang > Attachments: HBASE-14604_98.diff, HBASE-14604_98_with_ut.diff > > > The code in MoveCoseFunction: > {code} > return scale(0, cluster.numRegions + META_MOVE_COST_MULT, moveCost); > {code} > It uses cluster.numRegions + META_MOVE_COST_MULT as the max value when scale > moveCost to [0,1]. But this should use maxMoves as the max value when cluster > have a lot of regions. > Assume a cluster have 1 regions, maxMoves is 2500, it only scale moveCost > to [0, 0.25]. > Improve moveCost by use maxMoves. > {code} > return scale(0, Math.min(cluster.numRegions, maxMoves) + META_MOVE_COST_MULT, > moveCost); > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HBASE-14604) Improve MoveCostFunction in StochasticLoadBalancer
[ https://issues.apache.org/jira/browse/HBASE-14604?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Guanghao Zhang updated HBASE-14604: --- Status: Patch Available (was: In Progress) > Improve MoveCostFunction in StochasticLoadBalancer > -- > > Key: HBASE-14604 > URL: https://issues.apache.org/jira/browse/HBASE-14604 > Project: HBase > Issue Type: Bug > Components: Balancer >Affects Versions: 0.98.15 >Reporter: Guanghao Zhang >Assignee: Guanghao Zhang > Attachments: HBASE-14604_98.diff, HBASE-14604_98_with_ut.diff > > > The code in MoveCoseFunction: > {code} > return scale(0, cluster.numRegions + META_MOVE_COST_MULT, moveCost); > {code} > It uses cluster.numRegions + META_MOVE_COST_MULT as the max value when scale > moveCost to [0,1]. But this should use maxMoves as the max value when cluster > have a lot of regions. > Assume a cluster have 1 regions, maxMoves is 2500, it only scale moveCost > to [0, 0.25]. > Improve moveCost by use Math.min(cluster.numRegions, maxMoves) as the max > cost, so it can scale moveCost to [0,1]. > {code} > return scale(0, Math.min(cluster.numRegions, maxMoves) + META_MOVE_COST_MULT, > moveCost); > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HBASE-14604) Improve MoveCostFunction in StochasticLoadBalancer
[ https://issues.apache.org/jira/browse/HBASE-14604?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Guanghao Zhang updated HBASE-14604: --- Affects Version/s: 0.98.15 > Improve MoveCostFunction in StochasticLoadBalancer > -- > > Key: HBASE-14604 > URL: https://issues.apache.org/jira/browse/HBASE-14604 > Project: HBase > Issue Type: Bug > Components: Balancer >Affects Versions: 0.98.15 >Reporter: Guanghao Zhang >Assignee: Guanghao Zhang > Attachments: HBASE-14604_98.diff, HBASE-14604_98_with_ut.diff > > > The code in MoveCoseFunction: > {code} > return scale(0, cluster.numRegions + META_MOVE_COST_MULT, moveCost); > {code} > It uses cluster.numRegions + META_MOVE_COST_MULT as the max value when scale > moveCost to [0,1]. But this should use maxMoves as the max value when cluster > have a lot of regions. > Assume a cluster have 1 regions, maxMoves is 2500, it only scale moveCost > to [0, 0.25]. > Improve moveCost by use Math.min(cluster.numRegions, maxMoves) as the max > cost, so it can scale moveCost to [0,1]. > {code} > return scale(0, Math.min(cluster.numRegions, maxMoves) + META_MOVE_COST_MULT, > moveCost); > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HBASE-14604) Improve MoveCostFunction in StochasticLoadBalancer
[ https://issues.apache.org/jira/browse/HBASE-14604?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Guanghao Zhang updated HBASE-14604: --- Description: The code in MoveCoseFunction: {code} return scale(0, cluster.numRegions + META_MOVE_COST_MULT, moveCost); {code} It uses cluster.numRegions + META_MOVE_COST_MULT as the max value when scale moveCost to [0,1]. But this should use maxMoves as the max value when cluster have a lot of regions. Assume a cluster have 1 regions, maxMoves is 2500, it only scale moveCost to [0, 0.25]. Improve moveCost by use Math.min(cluster.numRegions, maxMoves) as the max cost, so it can scale moveCost to [0,1]. {code} return scale(0, Math.min(cluster.numRegions, maxMoves) + META_MOVE_COST_MULT, moveCost); {code} was: The code in MoveCoseFunction: {code} return scale(0, cluster.numRegions + META_MOVE_COST_MULT, moveCost); {code} It uses cluster.numRegions + META_MOVE_COST_MULT as the max value when scale moveCost to [0,1]. But this should use maxMoves as the max value when cluster have a lot of regions. Assume a cluster have 1 regions, maxMoves is 2500, it only scale moveCost to [0, 0.25]. Improve moveCost by use maxMoves. {code} return scale(0, Math.min(cluster.numRegions, maxMoves) + META_MOVE_COST_MULT, moveCost); {code} > Improve MoveCostFunction in StochasticLoadBalancer > -- > > Key: HBASE-14604 > URL: https://issues.apache.org/jira/browse/HBASE-14604 > Project: HBase > Issue Type: Bug > Components: Balancer >Reporter: Guanghao Zhang >Assignee: Guanghao Zhang > Attachments: HBASE-14604_98.diff, HBASE-14604_98_with_ut.diff > > > The code in MoveCoseFunction: > {code} > return scale(0, cluster.numRegions + META_MOVE_COST_MULT, moveCost); > {code} > It uses cluster.numRegions + META_MOVE_COST_MULT as the max value when scale > moveCost to [0,1]. But this should use maxMoves as the max value when cluster > have a lot of regions. > Assume a cluster have 1 regions, maxMoves is 2500, it only scale moveCost > to [0, 0.25]. > Improve moveCost by use Math.min(cluster.numRegions, maxMoves) as the max > cost, so it can scale moveCost to [0,1]. > {code} > return scale(0, Math.min(cluster.numRegions, maxMoves) + META_MOVE_COST_MULT, > moveCost); > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HBASE-14604) Improve MoveCostFunction in StochasticLoadBalancer
[ https://issues.apache.org/jira/browse/HBASE-14604?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Guanghao Zhang updated HBASE-14604: --- Attachment: HBASE-14604-trunk.patch HBASE-14604-0.98.patch > Improve MoveCostFunction in StochasticLoadBalancer > -- > > Key: HBASE-14604 > URL: https://issues.apache.org/jira/browse/HBASE-14604 > Project: HBase > Issue Type: Bug > Components: Balancer >Affects Versions: 0.98.15 >Reporter: Guanghao Zhang >Assignee: Guanghao Zhang > Attachments: HBASE-14604-0.98.patch, HBASE-14604-trunk.patch, > HBASE-14604_98.diff, HBASE-14604_98_with_ut.diff > > > The code in MoveCoseFunction: > {code} > return scale(0, cluster.numRegions + META_MOVE_COST_MULT, moveCost); > {code} > It uses cluster.numRegions + META_MOVE_COST_MULT as the max value when scale > moveCost to [0,1]. But this should use maxMoves as the max value when cluster > have a lot of regions. > Assume a cluster have 1 regions, maxMoves is 2500, it only scale moveCost > to [0, 0.25]. > Improve moveCost by use Math.min(cluster.numRegions, maxMoves) as the max > cost, so it can scale moveCost to [0,1]. > {code} > return scale(0, Math.min(cluster.numRegions, maxMoves) + META_MOVE_COST_MULT, > moveCost); > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HBASE-14604) Improve MoveCostFunction in StochasticLoadBalancer
[ https://issues.apache.org/jira/browse/HBASE-14604?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Guanghao Zhang updated HBASE-14604: --- Attachment: HBASE-14604-trunk_v1.patch HBASE-14604-0.98_v1.patch > Improve MoveCostFunction in StochasticLoadBalancer > -- > > Key: HBASE-14604 > URL: https://issues.apache.org/jira/browse/HBASE-14604 > Project: HBase > Issue Type: Bug > Components: Balancer >Affects Versions: 0.98.15 >Reporter: Guanghao Zhang >Assignee: Guanghao Zhang > Attachments: HBASE-14604-0.98.patch, HBASE-14604-0.98_v1.patch, > HBASE-14604-trunk.patch, HBASE-14604-trunk_v1.patch, HBASE-14604_98.diff, > HBASE-14604_98_with_ut.diff > > > The code in MoveCoseFunction: > {code} > return scale(0, cluster.numRegions + META_MOVE_COST_MULT, moveCost); > {code} > It uses cluster.numRegions + META_MOVE_COST_MULT as the max value when scale > moveCost to [0,1]. But this should use maxMoves as the max value when cluster > have a lot of regions. > Assume a cluster have 1 regions, maxMoves is 2500, it only scale moveCost > to [0, 0.25]. > Improve moveCost by use Math.min(cluster.numRegions, maxMoves) as the max > cost, so it can scale moveCost to [0,1]. > {code} > return scale(0, Math.min(cluster.numRegions, maxMoves) + META_MOVE_COST_MULT, > moveCost); > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HBASE-14604) Improve MoveCostFunction in StochasticLoadBalancer
[ https://issues.apache.org/jira/browse/HBASE-14604?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Guanghao Zhang updated HBASE-14604: --- Status: Open (was: Patch Available) > Improve MoveCostFunction in StochasticLoadBalancer > -- > > Key: HBASE-14604 > URL: https://issues.apache.org/jira/browse/HBASE-14604 > Project: HBase > Issue Type: Bug > Components: Balancer >Affects Versions: 0.98.15 >Reporter: Guanghao Zhang >Assignee: Guanghao Zhang > Attachments: HBASE-14604-0.98.patch, HBASE-14604-0.98_v1.patch, > HBASE-14604-trunk.patch, HBASE-14604-trunk_v1.patch, HBASE-14604_98.diff, > HBASE-14604_98_with_ut.diff > > > The code in MoveCoseFunction: > {code} > return scale(0, cluster.numRegions + META_MOVE_COST_MULT, moveCost); > {code} > It uses cluster.numRegions + META_MOVE_COST_MULT as the max value when scale > moveCost to [0,1]. But this should use maxMoves as the max value when cluster > have a lot of regions. > Assume a cluster have 1 regions, maxMoves is 2500, it only scale moveCost > to [0, 0.25]. > Improve moveCost by use Math.min(cluster.numRegions, maxMoves) as the max > cost, so it can scale moveCost to [0,1]. > {code} > return scale(0, Math.min(cluster.numRegions, maxMoves) + META_MOVE_COST_MULT, > moveCost); > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HBASE-14604) Improve MoveCostFunction in StochasticLoadBalancer
[ https://issues.apache.org/jira/browse/HBASE-14604?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Guanghao Zhang updated HBASE-14604: --- Attachment: HBASE-14604_98.diff patch for 98 > Improve MoveCostFunction in StochasticLoadBalancer > -- > > Key: HBASE-14604 > URL: https://issues.apache.org/jira/browse/HBASE-14604 > Project: HBase > Issue Type: Bug > Components: Balancer >Reporter: Guanghao Zhang >Assignee: Guanghao Zhang > Attachments: HBASE-14604_98.diff > > > The code in MoveCoseFunction: > {code} > return scale(0, cluster.numRegions + META_MOVE_COST_MULT, moveCost); > {code} > It uses cluster.numRegions + META_MOVE_COST_MULT as the max value when scale > moveCost to [0,1]. But this should use maxMoves as the max value when cluster > have a lot of regions. > Assume a cluster have 1 regions, maxMoves is 2500, it only scale moveCost > to [0, 0.25]. > Improve moveCost by use maxMoves. > {code} > return scale(0, Math.min(cluster.numRegions, maxMoves) + META_MOVE_COST_MULT, > moveCost); > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)