# Parallel Good Practice

**URL:** <https://discourse.julialang.org/t/parallel-good-practice/17486>\
**Category:** Julia at Scale\
**Created:** [November 13, 2018, 5:45pm UTC](https://discourse.julialang.org/t/parallel-good-practice/17486 "2018-11-13T17:45:19Z")\
**Posts on this page:** 3\
**Page:** 2

<div class="post-metadata">

**Author:** ![js135005](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/js135005/32/8219_2.png) [@js135005](https://discourse.julialang.org/u/js135005)\
**Post date:** [November 29, 2018, 4:44pm UTC](https://discourse.julialang.org/t/parallel-good-practice/17486/21 "2018-11-29T16:44:08Z")

</div>

Generally I would say you have an 8 socket server, all of which are populated. Each socket has 18 cores hyperthreaded for a total of 36 virtual processors (and 18 actual cores). The total capacity in virtual processors is 8x36 or 8x18 cores…

It is definitely 2 threads per core.

---

<div class="post-metadata">

**Author:** ![johnh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/johnh/32/3615_2.png) [@johnh](https://discourse.julialang.org/u/johnh)\
**Post date:** [November 30, 2018, 5:14am UTC](https://discourse.julialang.org/t/parallel-good-practice/17486/22 "2018-11-30T05:14:28Z")

</div>

@Tamas_Papp you mention CPU utilisation. The htop utility is well worth getting to know [htop - an interactive process viewer](https://hisham.hm/htop/)

Regarding threads per core, the output from lstopo is useful!

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [November 30, 2018, 2:10pm UTC](https://discourse.julialang.org/t/parallel-good-practice/17486/23 "2018-11-30T14:10:24Z")

</div>

Don’t naively count threads to pick the amount of parallelism. It’s a good guideline, but not the gospel truth.

> **[Optimal Number of Workers for Parallel Julia - Stochastic Lifestyle](http://www.stochasticlifestyle.com/236-2/)**
>
> How many workers do you choose when running a parallel job in Julia? The answer is easy right? The number of physical cores. We always default to that number. For my Core i7 4770K, that means it’s 4, not 8 since that would include the hyperthreads....

[Previous page](https://discourse.julialang.org/t/parallel-good-practice/17486.md?page=1)
