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

Check WorkerThread ownership before scheduling #2254

Merged
merged 10 commits into from
Aug 23, 2021
Merged

Check WorkerThread ownership before scheduling #2254

merged 10 commits into from
Aug 23, 2021

Conversation

vasilmkd
Copy link
Member

This covers the interleaving between two instances of WorkStealingThreadPool. I did not have a chance to test the performance impact thoroughly, but in the quick benchmark run I did, the new code was faster, which, I'm not sure whether to trust. I will repeat the run when I have the time.

series/3.x:

Benchmark                          (size)   Mode  Cnt   Score   Error    Units
WorkStealingBenchmark.scheduling  1000000  thrpt   10  13.270 ± 1.109  ops/min

This PR:

Benchmark                          (size)   Mode  Cnt   Score   Error    Units
WorkStealingBenchmark.scheduling  1000000  thrpt   10  13.981 ± 1.537  ops/min

@vasilmkd
Copy link
Member Author

Here's another run:

series/3.x:

Benchmark                          (size)   Mode  Cnt   Score   Error    Units
WorkStealingBenchmark.scheduling  1000000  thrpt   20  15.228 ± 0.285  ops/min

This PR:

Benchmark                          (size)   Mode  Cnt   Score   Error    Units
WorkStealingBenchmark.scheduling  1000000  thrpt   20  14.966 ± 0.491  ops/min

@vasilmkd
Copy link
Member Author

A new run of the scheduling benchmark:

Benchmark                          (size)   Mode  Cnt   Score   Error    Units
WorkStealingBenchmark.scheduling  1000000  thrpt   20  14.884 ± 0.635  ops/min

@vasilmkd vasilmkd requested a review from djspiewak August 22, 2021 22:35
Co-authored-by: Daniel Spiewak <djspiewak@gmail.com>
@vasilmkd vasilmkd requested a review from djspiewak August 22, 2021 23:07
@vasilmkd
Copy link
Member Author

Another run, but thermal throttling might have kicked in. The second fork was down in terms of the score.

Benchmark                          (size)   Mode  Cnt   Score   Error    Units
WorkStealingBenchmark.scheduling  1000000  thrpt   20  14.218 ± 0.894  ops/min

@djspiewak djspiewak merged commit 9bf070b into typelevel:series/3.x Aug 23, 2021
@vasilmkd vasilmkd deleted the wstp-check-threads branch August 23, 2021 07:25
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