You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Li Li <fa...@gmail.com> on 2016/11/13 04:47:38 UTC

how to use StochasticLoadBalancer

I have many tables. some are heavily used and some others are not. But
the default load balancer is balanced by region numbers. Thus some
machines are very busy and other machines have no requests. So I want
to try StochasticLoadBalancer. But I can't find any document tell me
how to config it in hbase-site.xml.

Re: how to use StochasticLoadBalancer

Posted by Ted Yu <yu...@gmail.com>.
If you look at the source code, you would see ReadRequestCostFunction:

    private static final String READ_REQUEST_COST_KEY =

        "hbase.master.balancer.stochastic.readRequestCost";

    private static final float DEFAULT_READ_REQUEST_COST = 5;

and WriteRequestCostFunction :

    private static final String WRITE_REQUEST_COST_KEY =

        "hbase.master.balancer.stochastic.writeRequestCost";

    private static final float DEFAULT_WRITE_REQUEST_COST = 5;

The default weights for these two methods are low (
DEFAULT_REGION_COUNT_SKEW_COST = 500).

Depending on your use case, you can increase one or both the above weights.


Cheers

On Sat, Nov 12, 2016 at 8:47 PM, Li Li <fa...@gmail.com> wrote:

> I have many tables. some are heavily used and some others are not. But
> the default load balancer is balanced by region numbers. Thus some
> machines are very busy and other machines have no requests. So I want
> to try StochasticLoadBalancer. But I can't find any document tell me
> how to config it in hbase-site.xml.
>