diff options
author | Steve Vinoski <[email protected]> | 2013-08-20 21:09:47 -0400 |
---|---|---|
committer | Steve Vinoski <[email protected]> | 2013-08-29 10:50:15 -0400 |
commit | 69e01c0f5d332d34b95575203ae9d7829b9a45fa (patch) | |
tree | 4fd4fbb08fada536f9ff334d81356f03f0aa68bf /erts/doc/src/erl.xml | |
parent | 6fc94ba0b93488e46429dd4e71d11ebfe3b62792 (diff) | |
download | otp-69e01c0f5d332d34b95575203ae9d7829b9a45fa.tar.gz otp-69e01c0f5d332d34b95575203ae9d7829b9a45fa.tar.bz2 otp-69e01c0f5d332d34b95575203ae9d7829b9a45fa.zip |
add erl option to set schedulers by percentages
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, add 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. The +SP option also interacts with any
settings specified with the +S option, such that the combination of options
"+S 4:4 +SP 50:50" (in either order) results in 2 scheduler threads and 2
scheduler threads online.
Add documentation for the +SP option.
Add tests for the +SP option to scheduler_SUITE.
Add tests and documentation for two existing features of the +S option: +S
0:0 resets the scheduler thread count and scheduler threads online count to
their defaults, and specifying negative numbers for +S results in those
values being subtracted from the default values for the host.
Diffstat (limited to 'erts/doc/src/erl.xml')
-rw-r--r-- | erts/doc/src/erl.xml | 50 |
1 files changed, 39 insertions, 11 deletions
diff --git a/erts/doc/src/erl.xml b/erts/doc/src/erl.xml index 70569b1c6c..c16b45856d 100644 --- a/erts/doc/src/erl.xml +++ b/erts/doc/src/erl.xml @@ -748,19 +748,47 @@ </item> <tag><marker id="+S"><c><![CDATA[+S Schedulers:SchedulerOnline]]></c></marker></tag> <item> - <p>Sets the amount of scheduler threads to create and scheduler - threads to set online when SMP support has been enabled. - Valid range for both values are 1-1024. If the - Erlang runtime system is able to determine the amount - of logical processors configured and logical processors available, - <c>Schedulers</c> will default to logical processors configured, - and <c>SchedulersOnline</c> will default to logical processors - available; otherwise, the default values will be 1. <c>Schedulers</c> - may be omitted if <c>:SchedulerOnline</c> is not and vice versa. The - amount of schedulers online can be changed at run time via + <p>Sets the number of scheduler threads to create and scheduler + threads to set online when SMP support has been enabled. The maximum for + both values is 1024. If the Erlang runtime system is able to determine the + amount of logical processors configured and logical processors available, + <c>Schedulers</c> will default to logical processors configured, and + <c>SchedulersOnline</c> will default to logical processors available; + otherwise, the default values will be 1. <c>Schedulers</c> may be omitted + if <c>:SchedulerOnline</c> is not and vice versa. The number of schedulers + online can be changed at run time via <seealso marker="erlang#system_flag_schedulers_online">erlang:system_flag(schedulers_online, SchedulersOnline)</seealso>. </p> - <p>This flag will be ignored if the emulator doesn't have + <p>If <c>Schedulers</c> or <c>SchedulersOnline</c> is specified as a + negative number, the value is subtracted from the default number of + logical processors configured or logical processors available, respectively. + </p> + <p>Specifying the value 0 for <c>Schedulers</c> or <c>SchedulersOnline</c> + resets the number of scheduler threads or scheduler threads online respectively + to its default value. + </p> + <p>This option is ignored if the emulator doesn't have + SMP support enabled (see the <seealso marker="#smp">-smp</seealso> + flag).</p> + </item> + <tag><marker id="+SP"><c><![CDATA[+SP SchedulersPercentage:SchedulersOnlinePercentage]]></c></marker></tag> + <item> + <p>Similar to <seealso marker="#+S">+S</seealso> but uses percentages to set the + number of scheduler threads to create, based on logical processors configured, + and scheduler threads to set online, based on logical processors available, when + SMP support has been enabled. Specified values must be greater than 0. For example, + <c>+SP 50:25</c> 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. + <c>SchedulersPercentage</c> may be omitted if <c>:SchedulersOnlinePercentage</c> is + not and vice versa. The number of schedulers online can be changed at run time via + <seealso marker="erlang#system_flag_schedulers_online">erlang:system_flag(schedulers_online, SchedulersOnline)</seealso>. + </p> + <p>This option interacts with <seealso marker="#+S">+S</seealso> settings. + For example, on a system with 8 logical cores configured and 8 logical cores + available, the combination of the options <c>+S 4:4 +SP 50:25</c> (in either order) + results in 2 scheduler threads (50% of 4) and 1 scheduler thread online (25% of 4). + </p> + <p>This option is ignored if the emulator doesn't have SMP support enabled (see the <seealso marker="#smp">-smp</seealso> flag).</p> </item> |