Is the Erlang scheduler NUMA aware?

I know erl has command line options like +sbt to bind schedulers to specific CPUs, and that by default, the VM delegates binding those schedulers to the operating system (e.g. on Linux, the Linux Kernel Scheduler.)

I also know that Erlang attempts to automatically determine the CPU topology, and that the user can manually specify a CPU topology with +sct. The docs for +sct seem focused on how specifying a CPU topology affects the scheduler bind flags.

I had three main questions:

  1. Does any other part of the BEAM VM use the CPU topology specified by +sct if the scheduler binding is set to +sbt u (unbound)?

  2. Aside from what CPU to bind a scheduler on, does the VM’s scheduling algorithm have any awareness of a CPU’s NUMA design? And if so, does the scheduler use that information to schedule Erlang processes more efficiently?

  3. If the VM does use a CPU’s NUMA design to make more efficient scheduling decisions, can the VM be configured to do the same with awareness of a CPU’s “sub-NUMA” or “last level cache” features?

  1. no
  2. not yet
  3. no

We have tought about doing numa aware taskstealing and memory allocation for a very long time, but so far we have not gotten around to that. If we do, I would imagine it would look similar to how the linux scheduler does things.

3 Likes