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

Pin threads to a cores #365

Merged
merged 3 commits into from Aug 5, 2020
Merged

Pin threads to a cores #365

merged 3 commits into from Aug 5, 2020

Conversation

smarr
Copy link
Owner

@smarr smarr commented Aug 5, 2020

This is hopefully a good idea in general.
We have fork/join pools sized so that each thread corresponds to a physical core, and we don't necessarily need them to wander around.
However, for instance actors are scheduled still on the fork/join pool and not bound to a thread.
So, they may still wander about.
Though, the benchmarks are not necessarily faster, just more predictable.

@daumayr this may have an impact for you in the future, and we may need to see whether this causes any regressions.
@sophie-kaleba I would recommend that we add this to the other SOMs as well, especially grSOM and TruffleSOM.

This makes quite a bit of difference in the amount of noise that benchmarks measure, I think.
Still need to do a proper analysis and write up, but I think it should make benchmarking more reliable.

Note

This doesn't support the native image variant at the moment. For native-image support, it's likely easier to use the underlying system API directly.

Signed-off-by: Stefan Marr <git@stefan-marr.de>
Signed-off-by: Stefan Marr <git@stefan-marr.de>
If available, each thread should get their own core. This isn’t conditional or sophisticated, but should help for single core benchmarking to reduce noise.

- to make this work, we need to communicate the available cores for pinning. Thus, determine core mask based on REBENCH_DENOISE_CORE_SET env var.
- also introduce a flag to disable pinning altogether

Signed-off-by: Stefan Marr <git@stefan-marr.de>
@smarr smarr added the enhancement Improves the implementation with something noteworthy label Aug 5, 2020
@smarr smarr added this to the v0.8.0 milestone Aug 5, 2020
@smarr smarr self-assigned this Aug 5, 2020
@smarr smarr merged commit 7898240 into dev Aug 5, 2020
@smarr smarr deleted the pinning branch August 5, 2020 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improves the implementation with something noteworthy
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant