hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matteo Bertozzi (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-12529) Use ThreadLocalRandom for RandomQueueBalancer
Date Wed, 19 Nov 2014 10:40:34 GMT

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

Matteo Bertozzi commented on HBASE-12529:
-----------------------------------------

attached a patch for 98 the ThreadLocal<Random> is probably good enough compared with
what was there before (see the RandomTest)

{noformat}
#threadId [ #distribution ] #time

Random with 10 threads
4[ 999704 1000114   999765   998028  1000434  1000596  1000814  1001225  1000652  998668]
time 20485
2[ 999288  999881   999381  1000100   999296  1000340  1001612   998864  1001001 1000237]
time 20792
1[ 999125 1000371  1000566  1002153  1001618   999801   999477   999954   998644  998291]
time 20838
3[1001213  998487  1001787   999244  1001494   998837   998483  1001043  1000310  999102]
time 20870
0[ 998651 1000391  1000057   998980  1001854   998017  1000166  1002317   998841 1000726]
time 20896
9[1000119 1000046  1000611   998970   999313  1001388  1000343  1000947   998077 1000186]
time 20891
8[ 998982 1000488  1001040  1001141   999592  1000447   999284   998895   999706 1000425]
time 20901
6[ 999270  999654   999056  1001046  1000398  1000642  1000405  1000525   999977  999027]
time 20916
5[ 999905  999293   998908   999612   999778   999762  1000451   999766  1000366 1002159]
time 20919
7[ 999355  998668  1002233  1000987  1000195  1000012   998565  1001572   999989  998424]
time 20914

ThreadLocalRandom with 10 threads
2[ 999405  999806  1000033  1000446   999368   999636  1000624   999784  1000161 1000737]
time 204
1[1001876  999712  1000384   999411   999139   999210   999709   999235  1000026 1001298]
time 208
7[ 998383 1000379  1001579  1000611   998066   999539   999861  1000250  1001622  999710]
time 209
4[ 999751  999360   999987  1000412   998773   998454  1002118  1000389  1001025  999731]
time 210
0[ 999830 1001159  1000151  1001600  1000539   999356   998167   999599  1000652  998947]
time 211
3[ 000553  998186   999984   999025  1001416   999396  1001011  1000951   998675 1000803]
time 212
5[ 999025 1001039   998066  1000585   999958  1001476   998990   999766  1000478 1000617]
time 213
8[ 999604  999893  1000388  1002748   997180  1000562   997591  1000215  1001002 1000817]
time 199
6[1000654  999660   999590   998480   999547  1000924  1000921  1001984   998402  999838]
time 214
9[1000614  998997  1001502  1000113   999398  1000529  1000441  1000216   998574  999616]
time 205

ThreadLocal<Random> with 10 threads
5[1000763 1000190  1001990  1001534   998429   999888  1000276   999415   998488  999027]
time 337
7[ 999155 1000851   999237  1001077   999979   999698   999991   998073  1001693 1000246]
time 337
3[1000241 1000288   999260   999745   999260  1000377  1000135  1000982  1000998  998714]
time 340
9[ 999109  999947  1000781   999946  1001335   999319   997880  1000301  1000904 1000478]
time 331
6[1000217 1001076  1000677   998441   999550   999291  1000330  1000138   999141 1001139]
time 342
2[ 999253 1000411  1000383  1000612  1000754   999804  1000456   999144   999163 1000020]
time 344
1[ 999640  998994  1001377  1001255   999724  1000206  1000259   999782   998997  999766]
time 344
0[ 998073  999640   999735  1001348  1000081   998673  1000735  1000365  1001249 1000101]
time 344
8[1000510 1000444   999805   998874  1000165  1000569  1000459   999686   999178 1000310]
time 338
4[1001040  999468  1001355  1001486   999909  1000115   998970   997450   998746 1001461]
time 359
{noformat}

> Use ThreadLocalRandom for RandomQueueBalancer
> ---------------------------------------------
>
>                 Key: HBASE-12529
>                 URL: https://issues.apache.org/jira/browse/HBASE-12529
>             Project: HBase
>          Issue Type: Improvement
>          Components: IPC/RPC
>    Affects Versions: 2.0.0, 0.99.1, 0.98.6.1
>            Reporter: Matteo Bertozzi
>            Assignee: Matteo Bertozzi
>            Priority: Minor
>             Fix For: 2.0.0, 0.98.9, 0.99.2
>
>         Attachments: HBASE-12529-0.98-v1.patch, HBASE-12529-v0.patch, HBASE-12529-v1.patch,
RandTest.java
>
>
> looks like the Random in RandomQueueBalancer is now the main cause of contention in the
rpc queue insertion. we should replace that Random with  a ThreadLocalRandom.



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

Mime
View raw message