# How to deal with more threads than requested?

**URL:** https://discourse.julialang.org/t/how-to-deal-with-more-threads-than-requested/69655
**Category:** Performance
**Tags:** multithreading
**Created:** [October 13, 2021, 2:10am UTC](https://discourse.julialang.org/t/how-to-deal-with-more-threads-than-requested/69655 "2021-10-13T02:10:33Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Joris\_Pinkse](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joris_pinkse/32/216398_2.png) [@Joris\_Pinkse](https://discourse.julialang.org/u/Joris_Pinkse)
#### Post date: [October 13, 2021, 2:10am UTC](https://discourse.julialang.org/t/how-to-deal-with-more-threads-than-requested/69655/1 "2021-10-13T02:10:34Z")

</div>

I have a program that I instruct to use the 32 physical cores on a machine. But the program typically uses 37 or 38, presumably due to BLAS being used by one of the loaded packages.

As a general rule, would it be faster to reduce the number of physical cores down from 32 or to leave things as they are?

(Obviously, I can time things for this particular program, but this is going to be a recurring issue for other programs, also.)

---

<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: [October 13, 2021, 2:17am UTC](https://discourse.julialang.org/t/how-to-deal-with-more-threads-than-requested/69655/2 "2021-10-13T02:17:36Z")

</div>

IMO slightly over-subscribing (and sporadically) thought out the execution of the whole program is usually fine, and may even improve performance depending on the task.
