You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gluten.apache.org by "FelixYBW (via GitHub)" <gi...@apache.org> on 2026/03/23 04:44:20 UTC
[PR] [VL] Use CPUThreadPoolExecutor as DBI executors [gluten]
FelixYBW opened a new pull request, #11811:
URL: https://github.com/apache/gluten/pull/11811
The main difference of IOThreadPoolExecutor and CPUThreadPoolExecutor is the scheduling:
*folly::IOThreadPoolExecutor is built on top of EventBase, and each thread in this executor runs a single‑threaded event loop. When you call executor_->add() from inside one of its own threads, the task is enqueued back into the same thread’s EventBase, so it executes sequentially on that same thread.*
Executor Type | Thread Model | Adding from same thread | Parallel?
-- | -- | -- | --
IOThreadPoolExecutor | 1 EventBase per thread | Runs sequentially on same thread | ❌
CPUThreadPoolExecutor | Worker threads + shared queue | May run on any thread | ✅
In case of Parquet scan, the load are usually column chunk based. Like below. Each pread is a column chunk. If we use IOThreadPoolExecutor, all the columns are loaded sequentially in one thread, which will block the main thread until the used columns data returns. It's not what we expected.
<img width="2170" height="210" alt="image" src="https://github.com/user-attachments/assets/53464ff8-4a1a-4ea6-8a97-264f55739e7a" />
If we switch to CPUThreadPoolExecutor, The column chunks will be fetched in parallel. Like below. Then the data may be returned quicker.
<img width="677" height="430" alt="image" src="https://github.com/user-attachments/assets/08d94082-b1a2-476c-b26f-901e9268ad7d" />
Here is the elapsed time of two typical IO bound queries performance:
| |IOPool|CPUPool|
|-|-|-|
|Q88|50s|42s|
|Q4|68s|59s|
Note Velox parquet scan is still far away from optimal. The throughput is only about 1/4 of S3 benchmark can get. Currently the async fetch is through rowgroup prefetch and split prefetch. All requests are send to S3 without priorities no matter it's prefetched or ondemand. We should list all the requests as a queue and fetch in priority categories.
--
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@gluten.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org
Re: [PR] [VL] Use CPUThreadPoolExecutor as DBI executors [gluten]
Posted by "FelixYBW (via GitHub)" <gi...@apache.org>.
FelixYBW commented on PR #11811:
URL: https://github.com/apache/gluten/pull/11811#issuecomment-4115027424
@zhli1142015 FYI
--
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@gluten.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org
Re: [PR] [VL] Use CPUThreadPoolExecutor as DBI executors [gluten]
Posted by "FelixYBW (via GitHub)" <gi...@apache.org>.
FelixYBW merged PR #11811:
URL: https://github.com/apache/gluten/pull/11811
--
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@gluten.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org