aboutsummaryrefslogtreecommitdiffstats
path: root/erts/etc
diff options
context:
space:
mode:
authorSteve Vinoski <[email protected]>2013-08-20 21:09:47 -0400
committerSteve Vinoski <[email protected]>2013-08-29 10:50:15 -0400
commit69e01c0f5d332d34b95575203ae9d7829b9a45fa (patch)
tree4fd4fbb08fada536f9ff334d81356f03f0aa68bf /erts/etc
parent6fc94ba0b93488e46429dd4e71d11ebfe3b62792 (diff)
downloadotp-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/etc')
-rw-r--r--erts/etc/common/erlexec.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/erts/etc/common/erlexec.c b/erts/etc/common/erlexec.c
index e61ebe15f5..552afe295d 100644
--- a/erts/etc/common/erlexec.c
+++ b/erts/etc/common/erlexec.c
@@ -803,7 +803,6 @@ int main(int argc, char **argv)
case 'n':
case 'P':
case 'Q':
- case 'S':
case 't':
case 'T':
case 'R':
@@ -818,6 +817,19 @@ int main(int argc, char **argv)
add_Eargs(argv[i+1]);
i++;
break;
+ case 'S':
+ if (argv[i][2] == 'P') {
+ if (argv[i][3] != '\0')
+ goto the_default;
+ } else if (argv[i][2] != '\0')
+ goto the_default;
+ if (i+1 >= argc)
+ usage(argv[i]);
+ argv[i][0] = '-';
+ add_Eargs(argv[i]);
+ add_Eargs(argv[i+1]);
+ i++;
+ break;
case 'B':
argv[i][0] = '-';
if (argv[i][2] != '\0') {
@@ -1119,7 +1131,9 @@ usage_aux(void)
"[+l] [+M<SUBSWITCH> <ARGUMENT>] [+P MAX_PROCS] [+Q MAX_PORTS] "
"[+R COMPAT_REL] "
"[+r] [+rg READER_GROUPS_LIMIT] [+s SCHEDULER_OPTION] "
- "[+S NO_SCHEDULERS:NO_SCHEDULERS_ONLINE] [+T LEVEL] [+V] [+v] "
+ "[+S NO_SCHEDULERS:NO_SCHEDULERS_ONLINE] "
+ "[+SP PERCENTAGE_SCHEDULERS:PERCENTAGE_SCHEDULERS_ONLINE] "
+ "[+T LEVEL] [+V] [+v] "
"[+W<i|w>] [+z MISC_OPTION] [args ...]\n");
exit(1);
}