Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add erl option to set schedulers by percentages #58

Merged
merged 1 commit into from
Sep 2, 2013

Conversation

vinoski
Copy link
Contributor

@vinoski vinoski commented Aug 21, 2013

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. For ease of scripting, the +SP option also
takes into account any settings from +S options preceding it on the command
line.

Add documentation for the +SP option.

Add tests for the +SP option to scheduler_SUITE.

@rimmius
Copy link
Contributor

rimmius commented Aug 21, 2013

Patch has passed first testings and has been assigned to be reviewed

1 similar comment
@rimmius
Copy link
Contributor

rimmius commented Aug 22, 2013

Patch has passed first testings and has been assigned to be reviewed

@vinoski
Copy link
Contributor Author

vinoski commented Aug 22, 2013

I've amended the commit on this branch to address issues raised here on the erlang-patches mailing list. Please refetch.

@vinoski
Copy link
Contributor Author

vinoski commented Aug 28, 2013

I've amended the commit on this branch to ensure that the +SP option is handled properly when SMP is disabled or absent. Please refetch. Thanks to @garazdawi for catching this issue.

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.
@vinoski
Copy link
Contributor Author

vinoski commented Aug 29, 2013

I've amended the commit on this branch to address a test failure for non-SMP emulators. Please refetch. Thanks to @garazdawi for catching this issue.

@rimmius rimmius merged commit 69e01c0 into erlang:maint Sep 2, 2013
sverker pushed a commit to sverker/otp that referenced this pull request Aug 11, 2020
uabboli pushed a commit to uabboli/otp that referenced this pull request Dec 1, 2020
Permit caller to "prime" PropEr's typeserver and random generator prior to testing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants