[ 
https://issues.apache.org/jira/browse/HBASE-14215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14709750#comment-14709750
 ] 

Biju Nair commented on HBASE-14215:
-----------------------------------

The following are the distributions of primary replication with different 
primary replication skew cost multipliers. The two sets of data are before and 
after execution of balancer for each cost multiplier. For this case the test 
shows that the primary will be uniformly distributed when the 
{{primaryRegionCountCost}} multiplier is somewhere in between 2000 & 4000 which 
is higher than all other multiplier except {{regionReplicaRackCostKey}} and 
{{regionReplicaHostCostKey}}. So what is the drawback of setting 
{{primaryRegionCountCost}} equals {{regionReplicaRackCostKey}} if some one is 
targetting to get uniform query distribution which inturn helps with 
performance.

============================    
Cost multiplier of 500  
============================    
|Host  |Cnt |
|------|----|   
|r1n10 |103 |
|r2n11 |102 |
|r3n10 |140 |
|r3n9 |134 |
|r3n11 |136 |
|r2n10 |103 |
|r2n9 |103 |
|r1n11 |103 |
|r1n9 |103 |    

|Host  |Cnt |
|------|----|   
|r1n10 |103 |
|r2n11 |102 |
|r3n10 |140 |
|r3n9 |134 |
|r3n11 |136 |
|r2n10 |103 |
|r2n9 |103 |
|r1n11 |103 |
|r1n9 |103 |
============================    
Cost multiplier of 1000 
============================    
|Host  |Cnt |   
|------|----|
|r1n9 |114 |
|r2n11 |113 |
|r3n9 |115 |
|r3n11 |115 |
|r2n10 |113 |
|r3n10 |132 |
|r1n11 |114 |
|r2n9 |113 |
|r1n10 |98 |    
        
|Host  |Cnt |
|------|----|
|r1n9 |114 |
|r2n11 |113 |
|r3n9 |115 |
|r3n11 |115 |
|r2n10 |113 |
|r3n10 |132 |
|r1n11 |114 |
|r2n9 |113 |
|r1n10 |98 |
============================    
Cost multiplier of 2000 
============================    
|Host  |Cnt |
|------|----|   
|r1n11 |112 |
|r2n10 |115 |
|r3n9 |111 |
|r3n11 |113 |
|r3n10 |124 |
|r2n11 |115 |
|r2n9 |135 |
|r1n9 |88 |
|r1n10 |114 |
        
|Host  |Cnt |
|------|----|           
|r1n10 |114 |
|r2n10 |117 |
|r3n9 |115 |
|r3n11 |115 |
|r1n9 |113 |
|r2n11 |115 |
|r1n11 |107 |
|r2n9 |116 |
|r3n10 |115 |
============================    
Cost multiplier of 4000 
============================    
|Host  |Cnt |
|------|----|           
|r3n11 |114 |
|r2n11 |176 |
|r3n9 |114 |
|r3n10 |120 |
|r2n10 |161 |
|r1n10 |114 |
|r1n9 |114 |
|r1n11 |114 |   

|Host  |Cnt |
|------|----|           
|r3n11 |114 |
|r2n11 |113 |
|r3n9 |114 |
|r3n10 |114 |
|r2n10 |114 |
|r2n9 |114 |
|r1n10 |115 |
|r1n11 |114 |
|r1n9 |115 |

> Default cost used for PrimaryRegionCountSkewCostFunction is not sufficient 
> ---------------------------------------------------------------------------
>
>                 Key: HBASE-14215
>                 URL: https://issues.apache.org/jira/browse/HBASE-14215
>             Project: HBase
>          Issue Type: Bug
>          Components: Balancer
>            Reporter: Biju Nair
>            Priority: Minor
>         Attachments: 14215-v1.txt
>
>
> Current multiplier of 500 used in the stochastic balancer cost function 
> {{PrimaryRegionCountSkewCostFunction}} to calculate the cost of  total 
> primary replication skew doesn't seem to be sufficient to prevent the skews 
> (Refer HBASE-14110). We would want the default cost to be a higher value so 
> that skews in primary region replica has higher cost. The following is the 
> test result by setting the multiplier value to 10000 (same as the region 
> replica rack cost multiplier) on a 3 Rack 9 RS node cluster which seems to 
> get the balancer distribute the primaries uniformly.
> *Initial Primary replica distribution - using the current multiplier* 
>  r1n10  102
>  r1n11  85
>  r1n9    88
>  r2n10  120
>  r2n11  120
>  r2n9   124
>  r3n10  135
>  r3n11  124
>  r3n9    129
> *After long duration of read & writes - using current multiplier*     
>  r1n10  102
>  r1n11  85
>  r1n9    88
>  r2n10  120
>  r2n11  120
>  r2n9    124
>  r3n10  135
>  r3n11  124
>  r3n9    129
> *After manual balancing*      
>  r1n10  102
>  r1n11  85
>  r1n9    88
>  r2n10  120
>  r2n11  120
>  r2n9    124
>  r3n10  135
>  r3n11  124
>  r3n9    129
> *Increased multiplier for primaryRegionCountSkewCost to 10000*        
>  r1n10  114
>  r1n11  113
>  r1n9    114
>  r2n10  114
>  r2n11  114
>  r2n9    113
>  r3n10  115
>  r3n11  115
>  r3n9    115 
> Setting the {{PrimaryRegionCountSkewCostFunction}} multiplier value to 10000 
> should help HBase general use.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to