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

Nishkam Ravi commented on HADOOP-11152:
---------------------------------------

Unlike Random, round-robin isn't stateless and gets complicated in the presence 
of node failures. The code change would be significant as well. A variant of 
power-of-two: pick a random node, if the load is higher than a threshold, try 
again until a good DN is found, with a limit on the number of trials. This 
should provide good probabilistic guarantees on the worst-case performance.

> Better random number generator
> ------------------------------
>
>                 Key: HADOOP-11152
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11152
>             Project: Hadoop Common
>          Issue Type: Improvement
>            Reporter: Luke Lu
>              Labels: newbie++
>
> HDFS-7122 showed that naive ThreadLocal usage of simple LCG based j.u.Random 
> creates unacceptable distribution of random numbers for block placement. 
> Similarly, ThreadLocalRandom in java 7 (same static thread local with 
> synchronized methods overridden) has the same problem. 
> "Better" is defined as better quality and faster than j.u.Random (which is 
> already much faster (20x) than SecureRandom).
> People (e.g. Numerical Recipes) have shown that by combining LCG and XORShift 
> we can have a better fast RNG. It'd be worthwhile to investigate a thread 
> local version of these "better" RNG.



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

Reply via email to