[erlang-questions] Erlang/OTP R13A has been released
Rickard Green
rickard.s.green@REDACTED
Wed Mar 18 13:17:46 CET 2009
Ulf Wiger wrote:
> Zvi wrote:
>> Hi,
>>
>> "Erlang R13A (erts-5.7) [smp:2:2] [rq:2] [async-threads:0]
>>
>> Eshell V5.7 (abort with ^G)
>> 1>"
>>
>>
>> what's the meaning of "[smp:2:2]" and "[rq:2]" ?
>> Does "[smp:2:2]" means two schedulers and two corresponding run queues?
>> I guess "rq" is for "run queues" ?
>
> I believe I have figured out that it's
> [smp:Schedulers:SchedulersOnline], and "rq" indeed stands
> for run-queues (well, I'm guessing. Can't find it documented.)
>
Correct.
> So with the +S Schedulers:SchedulersOnline, you can set
> how many schedulers you want to be able to play with.
> You can change the number of active schedulers, using
> erlang:system_flag(schedulers_online, N), setting it to
> a value between 1 and Schedulers (which can only be set
> at boot time.)
>
> Reading about this, I was a bit confused by one thing:
> On erlang:system_flag(scheduler_bind_type, T), it says
>
> "How schedulers are bound matters. For example, in low
> load situations, the runtime system tries to migrate
> processes to schedulers with low scheduler identifiers.
> The more the schedulers are spread over the hardware,
> the more resources will be available to the runtime
> system in low load situations. "
>
> Forgive me for being glib, but why does it matter at
> all how I can optimize CPU usage at low load? (:
> Ok, from an energy consumption POV, I guess it can make
> a difference, but I've mainly come to think that as
> long as there is excess CPU capacity, there is very
> little reason to optimize things.
>
> I would be much more interested in hearing how this
> can make a different during high load, or hear a
> more detailed explanation of why low-load optimizations
> are important to me.
>
What is meant by low load situations here is maybe not clear. Low load
situations here are situations with fewer running processes than
schedulers, and high load situations here are situations with more
runnable and running processes than schedulers. The external load on the
system might be high even in internal low load situations.
In a high load situation the bind order currently doesn't matter.
However, this might change in the future. But it does matter in low load
situations, also from a performance point of view.
An example from a performance point of view: If you have two running
processes, it is better if they execute on different cores than on
different hyperthreads of the same core.
> BR,
> Ulf W
> --
> Ulf Wiger
> CTO, Erlang Training & Consulting Ltd
> http://www.erlang-consulting.com
Regards,
Rickard
--
Rickard Green, Erlang/OTP, Ericsson AB.
More information about the erlang-questions
mailing list