# Any thought given to how processes interact when deciding what scheduler to assign them to?

**URL:** <https://erlangforums.com/t/any-thought-given-to-how-processes-interact-when-deciding-what-scheduler-to-assign-them-to/3325>\
**Category:** Questions / Help\
**Tags:** beam, erts, erlang\
**Created:** [February 23, 2024, 4:22am UTC](https://erlangforums.com/t/any-thought-given-to-how-processes-interact-when-deciding-what-scheduler-to-assign-them-to/3325 "2024-02-23T04:22:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nhpip](https://erlangforums.com/letter_avatar_proxy/v4/letter/n/3bc359/32.png) [@nhpip](https://erlangforums.com/u/nhpip)\
**Post date:** [February 23, 2024, 4:22am UTC](https://erlangforums.com/t/any-thought-given-to-how-processes-interact-when-deciding-what-scheduler-to-assign-them-to/3325/1 "2024-02-23T04:22:50Z")

</div>

Has there (is there) ever been any thought given to how processes interact with each other when deciding what scheduler to assign them to? Thinking of cache associativity vs maximizing concurrency etc.

---

<div class="post-metadata">

**Author:** ![garazdawi](https://erlangforums.com/user_avatar/erlangforums.com/garazdawi/32/175_2.png) [@garazdawi](https://erlangforums.com/u/garazdawi)\
**Post date:** [February 23, 2024, 8:15am UTC](https://erlangforums.com/t/any-thought-given-to-how-processes-interact-when-deciding-what-scheduler-to-assign-them-to/3325/2 "2024-02-23T08:15:13Z")

</div>

We have talked loosely about it, but I don’t recall there having been any experiments trying it out. The best thing that we could do is probably to try to place processes that interact only with eachother in the same NUMA node. You don’t want to place them on the same scheduler/core as that might limit any parallelism.

One thing that is related that we’ve also considered is to allow a process to “share” its reductions with another process. Lets say we do a `gen_server:call` to a process, then if the receiving process is sleeping it could directly start executing and possibly send a response back to the sending process allowing it to continue. But that has fairness issues to consider and it is rather complicated to do a context-switch like that in ERTS so we have not tried to implement it yet.

---

<div class="post-metadata">

**Author:** ![nhpip](https://erlangforums.com/letter_avatar_proxy/v4/letter/n/3bc359/32.png) [@nhpip](https://erlangforums.com/u/nhpip)\
**Post date:** [February 23, 2024, 11:47pm UTC](https://erlangforums.com/t/any-thought-given-to-how-processes-interact-when-deciding-what-scheduler-to-assign-them-to/3325/3 "2024-02-23T23:47:52Z")

</div>

Thank you for the reply.
