3

I wanted to start erlang while varying the number of cores in order to test the scalability of my program. I expect that running the program on more cores should be faster than running on less cores. How can I specify the core limits? In fact, I have tried with smp -disable (and I supposed that it will run on 1 core? isn't it?) But the execution time still the same as with more cores. I tried also to put +S 1:1 (assuming 1 scheduler so as to run on 1 core? as well as other scheduler numbers), but it seems nothing has changed.

Was that because of characteristic of my program or did I do something wrong on specifying the core limits? And if possible could someone give some tips on how to scale your Erlang programs.

Thank you very much.

  • Does your program make use of multiple cores? Do you see the CPU utilization go above 100% in top/htop/Activity Monitor when you start Erlang with the default (all cores)? – Dogbert Oct 04 '16 at 17:17
  • Hi Dogbert, yes, I can see the CPUs go above 100%. Actually, my machine has 4 cores in total. However, for each run, it just just go maximum to ~ 283% . – user2579326 Oct 04 '16 at 17:22
  • And with `+S 1:1`, does it go over 100%? `+S 1:1` should limit the Erlang VM to use just 1 core but portdrivers and NIFs can use more than 1. See http://stackoverflow.com/questions/13330701/limit-the-number-of-cores-used-by-erlang – Dogbert Oct 04 '16 at 17:28
  • Try adding `+A 0` since by default the async thread pool has 10 threads. – Steve Vinoski Oct 04 '16 at 19:15

0 Answers0