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

perf: Increase default async thread count for low core count systems #19829

Merged
merged 1 commit into from
Nov 17, 2024

Conversation

nameexhaustion
Copy link
Collaborator

@nameexhaustion nameexhaustion commented Nov 17, 2024

Removes the division by 4 before clamping when calculating the async thread pool size.

This may benefit low core count systems, specifically those with less than 16 cores. Any potential performance gains may be observed particularly in systems with up to 7 cores, as the difference between having 1 vs 2 async threads is the most substantial.

rayon threadpool size old async thread count new async thread count
1 1 1
2 1 2
3 1 3
4 1 4
5 1 4
6 1 4
7 1 4
8 2 4
9 2 4
10 2 4
11 2 4
12 3 4
13 3 4
14 3 4
15 3 4

@github-actions github-actions bot added performance Performance issues or improvements python Related to Python Polars rust Related to Rust Polars labels Nov 17, 2024
@nameexhaustion nameexhaustion marked this pull request as ready for review November 17, 2024 09:27
@nameexhaustion nameexhaustion changed the title perf: Increase default async thread count for low thread count environments perf: Increase default async thread count for low core count systems Nov 17, 2024
@ritchie46 ritchie46 merged commit 2a0d79b into pola-rs:main Nov 17, 2024
22 checks passed
Copy link

codecov bot commented Nov 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.34%. Comparing base (245d549) to head (841e5ff).
Report is 8 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #19829   +/-   ##
=======================================
  Coverage   79.33%   79.34%           
=======================================
  Files        1548     1548           
  Lines      214193   214193           
  Branches     2460     2460           
=======================================
+ Hits       169937   169945    +8     
+ Misses      43698    43690    -8     
  Partials      558      558           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nameexhaustion nameexhaustion deleted the async-thread-count branch November 18, 2024 08:20
@c-peters c-peters added the accepted Ready for implementation label Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted Ready for implementation performance Performance issues or improvements python Related to Python Polars rust Related to Rust Polars
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants