# Using more threads than actual number of CPU cores

**URL:** <https://discourse.julialang.org/t/using-more-threads-than-actual-number-of-cpu-cores/114568>\
**Category:** General Usage\
**Created:** [May 22, 2024, 1:41pm UTC](https://discourse.julialang.org/t/using-more-threads-than-actual-number-of-cpu-cores/114568 "2024-05-22T13:41:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ju\_ska](https://avatars.discourse-cdn.com/v4/letter/j/ecd19e/32.png) [@Ju\_ska](https://discourse.julialang.org/u/Ju_ska)\
**Post date:** [May 22, 2024, 1:41pm UTC](https://discourse.julialang.org/t/using-more-threads-than-actual-number-of-cpu-cores/114568/1 "2024-05-22T13:41:31Z")

</div>

Hi,

I currently run hundreds of tasks on a 10 core CPU, so I set `JULIA_NUM_THREADS` to 10.  
In my program, each task consumes only 50% of the resources of a core.  
Is there a downside to increase `JULIA_NUM_THREADS` to 20 in order to get 100% CPU usage ?

---

<div class="post-metadata">

**Author:** ![jling](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jling/32/212909_2.png) [@jling](https://discourse.julialang.org/u/jling)\
**Post date:** [May 22, 2024, 1:44pm UTC](https://discourse.julialang.org/t/using-more-threads-than-actual-number-of-cpu-cores/114568/2 "2024-05-22T13:44:44Z")

</div>

Try it and benchmark it. Sometimes oversubscribing helps
