-
Notifications
You must be signed in to change notification settings - Fork 392
perf: Remove thread count restriction for scheduler runtime #6089
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
base: main
Are you sure you want to change the base?
Conversation
|
@colin-ho @desmondcheongzx Please take a look at the changes here when you have time. |
Greptile OverviewGreptile SummaryThis PR removes the Key Changes:
Impact:
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant App as Application
participant PR as PlanRunner
participant Runtime as get_or_init_runtime()
participant Tokio as Tokio Runtime
participant Scheduler as Scheduler Actor
participant Workers as Worker Pool
App->>PR: run_plan()
PR->>Runtime: Initialize runtime
Note over Runtime,Tokio: Before PR: worker_threads(1)<br/>After PR: Default (# of CPU cores)
Runtime->>Tokio: new_multi_thread()
Runtime->>Tokio: enable_all()
Runtime->>Tokio: thread_name_fn("Daft-Scheduler")
Tokio-->>Runtime: Runtime created
PR->>Runtime: block_on_current_thread()
Runtime->>Scheduler: spawn_scheduler_actor()
loop Task Execution
Scheduler->>Workers: Schedule tasks
Workers-->>Scheduler: Task results
Note over Scheduler,Workers: With more threads, scheduler<br/>can handle more concurrent<br/>async operations
end
Scheduler-->>PR: Results
PR-->>App: PlanResult
|
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.
No files reviewed, no comments
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6089 +/- ##
==========================================
- Coverage 72.91% 72.90% -0.02%
==========================================
Files 973 973
Lines 126184 126195 +11
==========================================
- Hits 92011 92002 -9
- Misses 34173 34193 +20
🚀 New features to boost your workflow:
|
colin-ho
left a comment
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.
Where is the high cpu coming from? Is it ray or flotilla scheduler? When you remove the worker thread restriction, do you see increased rate of scheduling?
I'm worried that simply increasing worker threads is masking an underlying problem. The reason this was 1 is because the flotilla scheduler should not be doing any meaningful compute. It also makes it much easier to debug when there's only one thread. If possible, I actually wanted to move this to the current thread runtime instead of multi thread.
|
cc @Jay-ju |
Changes Made
Related Issues