-
Notifications
You must be signed in to change notification settings - Fork 208
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(rt): support tokio-console #730
Conversation
Signed-off-by: Runji Wang <wangrunji0408@163.com>
Signed-off-by: Runji Wang <wangrunji0408@163.com>
Signed-off-by: Runji Wang <wangrunji0408@163.com>
Signed-off-by: Runji Wang <wangrunji0408@163.com>
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.
What's the rationale of spawning a tokio task for each executor? 🤔
To make executors visible in tokio-console and allow parallel execution on a multi-thread runtime. |
Are there any disadvantages to spawn too many tasks? 🤔 (BTW how does risingwave do it? |
In the future when we implement intra-operator parallelism we should spawn a tokio task for each stage instead of for each executor. |
Both streaming and batch engine spawns a task for a fragment. |
If cancellation is not handled properly, it can leave orphan tasks and leak resources. In addition, too many tasks may cause problems in scheduling, like high latency. But I think in our use case (one task per executor), the number is far less than the limit. So it should be fine. 🤔 |
This PR spawns each executor as a tokio task and adds support for debugging with tokio-console.
Running with
cargo r -- --tokio-console
and openingtokio-console
, you will have a clear view of all executors and background tasks:This will be useful in performance tuning.
This PR also upgrades dependencies and fixes issues caused by sqlparser API change.