[GOBBLIN-2262] Bump default thread counts for spec catalog listener and DAG processing engine#4189
Open
DaisyModi wants to merge 1 commit intoapache:masterfrom
Open
[GOBBLIN-2262] Bump default thread counts for spec catalog listener and DAG processing engine#4189DaisyModi wants to merge 1 commit intoapache:masterfrom
DaisyModi wants to merge 1 commit intoapache:masterfrom
Conversation
…nd DAG processing engine Increase DEFAULT_NUM_SPEC_CATALOG_LISTENER_THREADS and DEFAULT_NUM_DAG_PROC_THREADS from 3 to 150. Both pools serve compileFlow invocations (submission and execution paths respectively); compileFlow calls DataMovementAuthorizer.isMovementAuthorized, which can be slow under load and starves the small default pools, queueing flow submissions and executions. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
| public static final String NUM_DAG_PROC_THREADS_KEY = GOBBLIN_SERVICE_DAG_PROCESSING_ENGINE_PREFIX + "numThreads"; | ||
| public static final String DAG_PROC_ENGINE_NON_RETRYABLE_EXCEPTIONS_KEY = GOBBLIN_SERVICE_DAG_PROCESSING_ENGINE_PREFIX + "nonRetryableExceptions"; | ||
| public static final Integer DEFAULT_NUM_DAG_PROC_THREADS = 3; | ||
| public static final Integer DEFAULT_NUM_DAG_PROC_THREADS = 150; |
Contributor
There was a problem hiding this comment.
can we make this configurable?
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.
Dear Gobblin maintainers,
I am submitting the following PR for your kind review.
JIRA
Description
Increases two thread-pool defaults from 3 to 150 in
ServiceConfigKeys:DEFAULT_NUM_SPEC_CATALOG_LISTENER_THREADS— controls the executor used byFlowCatalog'sSpecCatalogListenersListfor parallel flow compilation on the submission path (POST /flowconfigs).DEFAULT_NUM_DAG_PROC_THREADS— controls the executor used byDagProcessingEngineon the execution path.Motivation
Both pools ultimately invoke
MultiHopFlowCompiler.compileFlow, which callsDataMovementAuthorizer.isMovementAuthorized(MultiHopFlowCompiler.java:242). Under high authorization-service latency, the default pool size of 3 becomes the binding throughput limit on both paths and queues flow submissions and executions even when downstream resources have plenty of capacity.The pool sizes remain configurable via:
gobblin.service.specCatalogListener.numThreadsgobblin.service.dagProcessingEngine.numThreadsDeployments preferring the previous behavior can override either back to 3.
Tests
Existing tests reference these constants symbolically (e.g.
DagProcessingEngineTest.javausesServiceConfigKeys.DEFAULT_NUM_DAG_PROC_THREADSdirectly), so they auto-adjust to the new default and require no changes.