[erlang-patches] patch to add option to set schedulers by percentage

Steve Vinoski <>
Thu Aug 22 18:55:27 CEST 2013

Hi Lukas,

Thanks for the feedback. After our IRC conversation today covering the
details of this issue, I agree it's clearer if this patch doesn't introduce
order dependencies between +S and +SP options or introduce accumulated
effects of multiple +SP options. I'll change my branch to do the following:

* ensure that later +SP options on the command line completely replace any
previous +SP options, so there's no accumulated effects between them (which
implies "+SP 100:100" can undo any previous +SP options)

* keep interactions between +S and +SP options, but remove ordering
dependencies, thus your example "+S 16:16 +SP 50:50 +S 16:16" would result
in [8:8] as you've specified, as would both "+SP 50:50 +S 16:16" and "+S
16:16 +SP 50:50"

* document and add tests for the already-existing feature that +S 0:0
undoes any prior +S options, resetting scheduler thread and scheduler
thread online counts to their defaults for the host

* document and add tests for the already-existing feature that specifying
negative numbers for +S results in the specified values being subtracted
from the scheduler thread and scheduler thread online counts

I'll send another email when the branch is ready with these changes. Any
other concerns, please let me know.


On Thu, Aug 22, 2013 at 10:11 AM, Lukas Larsson <> wrote:

>  Hello Steve,
> Have you given any thoughts on what should happen if you chain multiple
> +SP commands? i.e.
> erl +S 16:16 +SP 50:50 +SP 50:50
> Our view right now is that this should give [8:8] and not [4:4] as it
> currently does in the patch.
> Related to this we also do not think that the order to +S vs +SP commands
> should matter. i.e.
> erl +S 16:16 +SP 50:50 +S 16:16
> should give [8:8] and not [16:16].
> What do you think? These things are for sure odd cases to think about, but
> if it is possible someone will for sure do it....
> Lukas
> On 21/08/13 15:45, Steve Vinoski wrote:
>  For applications where measurements show enhanced performance from the
> use of a non-default number of emulator scheduler threads, having to
> accurately set the right number of scheduler threads across multiple hosts
> each with different numbers of logical processors is difficult because the
> erl +S option requires absolute numbers of scheduler threads and scheduler
> threads online to be specified.
>  To address this issue, this patch adds a +SP option to erl, similar to
> the existing +S option but allowing the number of scheduler threads and
> scheduler threads online to be set as percentages of logical processors
> configured and logical processors available, respectively. For example,
> "+SP 50:25" sets the number of scheduler threads to 50% of the logical
> processors configured, and the number of scheduler threads online to 25% of
> the logical processors available.
>  https://github.com/erlang/otp/pull/58
>  --steve
> _______________________________________________
> erlang-patches mailing ://erlang.org/mailman/listinfo/erlang-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-patches/attachments/20130822/490b4229/attachment.html>

More information about the erlang-patches mailing list