-
Notifications
You must be signed in to change notification settings - Fork 210
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
feat: make the # of CPU threads configurable and document cpu/memory patterns #2773
feat: make the # of CPU threads configurable and document cpu/memory patterns #2773
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2773 +/- ##
==========================================
+ Coverage 79.26% 79.30% +0.03%
==========================================
Files 227 227
Lines 68245 68283 +38
Branches 68245 68283 +38
==========================================
+ Hits 54096 54153 +57
+ Misses 11023 11002 -21
- Partials 3126 3128 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
rust/lance-file/src/reader.rs
Outdated
@@ -322,7 +326,7 @@ impl FileReader { | |||
.await | |||
} | |||
}) | |||
.buffered(num_cpus::get() * 4) | |||
.buffered(self.io_parallelism() as usize) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can io_parallalism
return usize
so dont need cast all of them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea. Done.
52a50c1
to
0516bd8
Compare
This gets rid of all usage of
num_cpus
(except in one spot to determine the default # of CPU threads) and instead usesObjectStore::io_parallelism
orget_num_compute_intensive_cpus
. Admittedly, many of our operations do not split out I/O and compute. For example:However, we can just pick one and clean these up as we go. For now, I made a best effort guess (most places where we were applying a multiplier to
num_cpus
I use the I/O count. Other places I use the compute count.