You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "yiguolei (via GitHub)" <gi...@apache.org> on 2025/12/17 10:48:44 UTC
[I] [Enhancement] Support per query TaskScheduler [doris]
yiguolei opened a new issue, #59125:
URL: https://github.com/apache/doris/issues/59125
### Search before asking
- [x] I had searched in the [issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no similar issues.
### Description
Current execution method: A thread pool is configured on the BE (Backend), with its size set to the number of CPU cores. All queries are executed in this single pool, and no query is allowed to block during execution. Once a block occurs, the thread is occupied (similar to coroutine behavior), preventing other queries from running. Therefore, a second type of pool—an IO thread pool—is required, dedicated to executing blocking operations, and this pool is configured to be large in size.
In theory, this execution model is elegant as it can reduce CPU overhead caused by thread switching in multi-threaded models. However, it has the following issues:
- High programming complexity: For example, spill-to-disk operations cannot be performed during task execution; lazy materialization also involves network IO, which requires code modifications.
- High debugging difficulty: It is impossible to use tools like pstack to identify which query is blocked, necessitating the development of numerous custom debugging tools.
- Difficult query isolation: Users sometimes want to limit the resource usage of a single query, but this is not feasible under the current model.
One feasible solution can be considered, similar to ClickHouse's approach:
- Launch an extremely large thread pool on the BE (e.g., 100 * CPU cores).
- When each query is executed, it requests a small thread pool from this large pool, where the size of the small thread pool equals the number of CPU cores.
- The current execution method is retained within each small pool.
This way, during query execution, we can set the number of threads via session variables to limit CPU utilization. Each query no longer needs to be refactored to be asynchronous—if IO operations are involved, they can be written directly in the existing code, and any blocking will only affect the current query itself.
### Solution
_No response_
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [I] [Enhancement] Support per query TaskScheduler [doris]
Posted by "wenzhenghu (via GitHub)" <gi...@apache.org>.
wenzhenghu commented on issue #59125:
URL: https://github.com/apache/doris/issues/59125#issuecomment-3698174844
I am willing to submit a PR
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [I] [Enhancement] Support per query TaskScheduler [doris]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #59125: [Enhancement] Support per query TaskScheduler
URL: https://github.com/apache/doris/issues/59125
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [I] [Enhancement] Support per query TaskScheduler [doris]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #59125:
URL: https://github.com/apache/doris/issues/59125#issuecomment-4828052415
We're closing this issue because it hasn't been updated in a while.
If you'd like to revive this issue, please reopen it and feel free a maintainer to remove the Stale tag!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org