[erlang-questions] How to setup Erlang to run on physical cores

Dániel Szoboszlay <>
Mon Oct 17 15:49:54 CEST 2016


If you don't mind binding the schedulers to logical cores, I think the
quickest solution is:

erl +sbt ts +SP 50:50

This will tell Erlang to lay out schedulers by first binding to the first
logical CPU in each core, then the second and so on. Then +SP tells to only
use 50% of the available logical CPU-s (e.g. 1 hyper thread per core).

You can avoid the scheduler binding and/or better deal with NUMA
architectures by passing in a custom CpuTopology that reveals only 1 hyper
thread/core for Erlang. This can be done with the +sct command line flag,
but the syntax for CpuTopologies is a bit complex.

On Mon, 17 Oct 2016 at 15:35 Tan Duong <> wrote:

> Hi everybody,
>
> I recently get to experiment an Erlang program.
> My machine is a multicore CPUs system, which contains some physical cores
> (say n), each cores features hyper threads (so the maximum CPU threads are
> 2*n)
> However, I just want to experiment the program on physical cores only (n
> cores), not with hyperthreading.
> is there any mechanism to do so?
>
> Best Regards,
> Tan
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20161017/2d5b7493/attachment-0001.html>


More information about the erlang-questions mailing list