I want to change the previous answers.
Erlang, or rather, the Erlang runtime system (erts), by default sets the number of schedulers (OS threads) and the number of rows per number of processed items on your platform. These are processor cores or hardware threads. You can change these parameters at runtime using:
erlang:system_flag(schedulers_online, NP) -> PrevNP
Erlang processes do not yet have anything to do with any scheduler. Logical balancing of processes between schedulers is performed according to two rules. 1) A hungry scheduler will steal a job from another scheduler. 2) Migration paths are configured to push processes from schedulers with a large number of processes for schedulers at lower cost. This is done to ensure fairness in the number of cuts (lead time) for each process.
However, schedulers may be blocked for certain processing elements. This is not done by default. To enable erts to use the scheduler-> core change:
erlang:system_flag(scheduler_bind_type, default_bind) -> PrevBind
You can find several other types of bindings in the documentation. Using affinity can significantly improve performance under heavy loads! Especially in situations with a high degree of blockage. In addition, the Linux kernel cannot handle hyperthreads, to say the least. If you have hypertexts on your platform, you really should use this function in erlang.
psyeugenic Apr 30 '09 at 23:49 2009-04-30 23:49
source share