GH-20314: [C++] Add GCS connection pool size option#49810
Open
azhu248 wants to merge 1 commit intoapache:mainfrom
Open
GH-20314: [C++] Add GCS connection pool size option#49810azhu248 wants to merge 1 commit intoapache:mainfrom
azhu248 wants to merge 1 commit intoapache:mainfrom
Conversation
This maps the Google Cloud Client ConnectionPoolSizeOption directly to Arrow's IO thread pool capacity via the io_context, increasing parallel read throughput for cloud blob systems. It also includes a test covering the fallback Thread Pool capacity mapping. Closes apache#20314
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This maps the Google Cloud Client ConnectionPoolSizeOption directly to Arrow's IO thread pool capacity via the io_context, increasing parallel read throughput for cloud blob systems. It also includes a test covering the fallback Thread Pool capacity mapping.
Closes #20314
Rationale for this change
Multithreaded read performance can be artificially bottlenecked by Google Cloud Client Library's default ConnectionPoolSize. Instead of exposing an entirely new option solely for this, we link it intrinsically to the Arrow I/O Thread Pool capacity.
What changes are included in this PR?
io_contextdown tointernal::AsGoogleCloudOptions().gcs::ConnectionPoolSizeOptionfromio_context.executor()->GetCapacity()or fell back safely to::arrow::io::GetIOThreadPoolCapacity().4utilizingstd::max. This prevents accidentally penalizing single-threaded users (e.g. users with capacity set to1)Are these changes tested?
Yes. I added the unit test
OptionsConnectionPoolSizeFallbacktogcsfs_test.ccthat validates:arrow::io::SetIOThreadPoolCapacity(...)updates the corresponding generated Google Cloud Option dynamically and perfectly.Are there any user-facing changes?
No breaking APIs.