-
Notifications
You must be signed in to change notification settings - Fork 147
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] Compute pool for native executor #2986
base: main
Are you sure you want to change the base?
Conversation
CodSpeed Performance ReportMerging #2986 will not alter performanceComparing Summary
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2986 +/- ##
==========================================
+ Coverage 78.14% 78.48% +0.33%
==========================================
Files 610 610
Lines 72146 71837 -309
==========================================
- Hits 56381 56379 -2
+ Misses 15765 15458 -307
|
@@ -28,11 +35,11 @@ pub trait IntermediateOperator: Send + Sync { | |||
&self, | |||
idx: usize, | |||
input: &PipelineResultType, | |||
state: Option<&mut Box<dyn IntermediateOperatorState>>, | |||
state: &mut dyn IntermediateOperatorState, |
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.
Didn't like the Option<&mut Box<dyn IntermediateOperatorState>>
parameter, instead changing it to just &mut dyn IntermediateOperatorState
static ATOMIC_ID: AtomicUsize = AtomicUsize::new(0); | ||
let id = ATOMIC_ID.fetch_add(1, Ordering::SeqCst); | ||
format!("Executor-Worker-{}", id) | ||
}) |
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.
Todo: look into thread priority: https://docs.rs/thread-priority/latest/thread_priority/, we could potentially set priorities for compute and io pool.
Would do it on https://docs.rs/tokio/latest/tokio/runtime/struct.Builder.html#method.on_thread_start
Create a multithreaded compute runtime for swordfish compute tasks. Switch query runtime to be single threaded, and use IO pool for scan task streams.
Additionally, adds in a
tokio_select
together with thetokio::signal::ctrlc
and main async execution loop so that queries can be cancelled.If you run this script you can see that the number of threads increases by only 1 per dataframe.