# Poor performance on cluster multithreading

**URL:** <https://discourse.julialang.org/t/poor-performance-on-cluster-multithreading/12248>\
**Category:** Performance\
**Tags:** performance, parallel, multithreading, cluster\
**Created:** [July 8, 2018, 1:09pm UTC](https://discourse.julialang.org/t/poor-performance-on-cluster-multithreading/12248 "2018-07-08T13:09:12Z")\
**Posts on this page:** 1\
**Showing post:** 24

<div class="post-metadata">

**Author:** ![Juser](https://avatars.discourse-cdn.com/v4/letter/j/34f0e0/32.png) [@Juser](https://discourse.julialang.org/u/Juser)\
**Post date:** [July 9, 2018, 1:40am UTC](https://discourse.julialang.org/t/poor-performance-on-cluster-multithreading/12248/24 "2018-07-09T01:40:56Z")

</div>

I’m sure others have mentioned this, but I believe that rand() is not thread-safe and causes problems if multiple threads try to use rand() unless you specify the RNG separately for each thread.

Take a look at this [thread](https://discourse.julialang.org/t/question-about-multi-threading-performance/12075/4) for an example of multi-threaded random number generation.

---

_[View the full topic](https://discourse.julialang.org/t/poor-performance-on-cluster-multithreading/12248)._
