[erlang-questions] About Erlang SMP scheduler

"Siyao Zheng(郑思遥)" <>
Fri Apr 27 13:23:26 CEST 2012


In SMP version of Erlang, every scheduler periodically call "check_balance()" to check load balance among all schedulers, then it might migrate some processes to balance load, or shut down some schedulers with low load. Does anyone know why scheduler should do this? check_balance() is quite a big one, and it has to lock every run queue when it checks the run queue. I think it's quite a big cost here. The work stealing at each schedule step afterwards actually does work load balance very well. Actually after I comment out the check_balance() step and run BigBang and Hackbench benchmarks, they are really faster! 

So, I wonder what is the purpose of check_balance() step here, if it is related to scalability on many core processors or something, and if there is any other benchmark I can run to prove its usefulness. 



More information about the erlang-questions mailing list