# Why 1 worker per core?

**URL:** <https://mediasoup.discourse.group/t/why-1-worker-per-core/3483>\
**Category:** mediasoup libraries\
**Created:** [October 26, 2021, 6:11pm UTC](https://mediasoup.discourse.group/t/why-1-worker-per-core/3483 "2021-10-26T18:11:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![johan](https://avatars.discourse-cdn.com/v4/letter/j/dec6dc/32.png) [@johan](https://mediasoup.discourse.group/u/johan)\
**Post date:** [October 26, 2021, 6:11pm UTC](https://mediasoup.discourse.group/t/why-1-worker-per-core/3483/1 "2021-10-26T18:11:15Z")

</div>

Back with another stupid question, sorry!

As I understand it, mediasoup workers run on a single thread, and threads are managed by the OS. Is mediasoup overriding this in some way? If not, why create a worker per core?

---

<div class="post-metadata">

**Author:** ![ibc](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/ibc/32/1540_2.png) [@ibc](https://mediasoup.discourse.group/u/ibc)\
**Post date:** [October 26, 2021, 6:23pm UTC](https://mediasoup.discourse.group/t/why-1-worker-per-core/3483/2 "2021-10-26T18:23:37Z")

</div>

As the documentation says somewhere, a mediasoup-worker doesn’t run in a thread but in a separate process

---

<div class="post-metadata">

**Author:** ![johan](https://avatars.discourse-cdn.com/v4/letter/j/dec6dc/32.png) [@johan](https://mediasoup.discourse.group/u/johan)\
**Post date:** [October 26, 2021, 6:28pm UTC](https://mediasoup.discourse.group/t/why-1-worker-per-core/3483/3 "2021-10-26T18:28:16Z")

</div>

Thanks for getting back, yes, it says sub process. But still, processes are also managed by the OS? So my question still seems relevant. Or am I missing something?

---

<div class="post-metadata">

**Author:** ![ibc](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/ibc/32/1540_2.png) [@ibc](https://mediasoup.discourse.group/u/ibc)\
**Post date:** [October 26, 2021, 6:34pm UTC](https://mediasoup.discourse.group/t/why-1-worker-per-core/3483/4 "2021-10-26T18:34:57Z")

</div>

Creating a worker per core is just a recommendation and mediasoup does not override process management in any way.

---

<div class="post-metadata">

**Author:** ![johan](https://avatars.discourse-cdn.com/v4/letter/j/dec6dc/32.png) [@johan](https://mediasoup.discourse.group/u/johan)\
**Post date:** [October 26, 2021, 6:39pm UTC](https://mediasoup.discourse.group/t/why-1-worker-per-core/3483/5 "2021-10-26T18:39:37Z")

</div>

That makes sense from the load tests on a MacMini that we ran the other day. The instantiated worker load did not seem to correlate to the load per CPU. But then M1 has this split between efficiency and performance cores, it was clear the OS made some decisions. Thanks for the clarification!
