Speed up submission of Google Batch array jobs#6847
Open
thalassemia wants to merge 2 commits intonextflow-io:masterfrom
Open
Speed up submission of Google Batch array jobs#6847thalassemia wants to merge 2 commits intonextflow-io:masterfrom
thalassemia wants to merge 2 commits intonextflow-io:masterfrom
Conversation
Modeled off implementation in AWS Batch executor Signed-off-by: Sean Cheah <cheah_sean@yahoo.com>
Signed-off-by: Sean Cheah <cheah_sean@yahoo.com>
✅ Deploy Preview for nextflow-docs-staging canceled.
|
d9fa5cd to
d752bc2
Compare
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.
I noticed that Nextflow was submitting my Google Batch array jobs very slowly, maybe about one submission every 3 seconds. That was despite no explicit submission throttling in my Nextflow config. In my investigation, I identified two sources of latency.
First, the Google Batch executor uses
TaskPollingMonitorto submit jobs. This blocks on each submission and greatly limits the achievable throughput compared to theParallelPollingMonitorused by the AWS Batch executor. To fix this, I essentially copied theAwsBatchExecutorlogic inGoogleBatchExecutor. The retry exceptions were sourced fromBatchClientand documented here.Second, creation of task runs for job arrays happens sequentially in a for loop. I parallelized that.
I tested these changes using the following config and Nextflow script:
process { executor = 'google-batch' container = 'ubuntu:22.04' machineType = 'e2-medium' cpus = 1 memory = '4 GB' } google { // Set your project ID project = 'PROJECT_ID' location = 'us-central1' batch { spot = true maxSpotAttempts = 3 } }By reading
.nextflow.log, I got the following times from starting Nextflow to submission of the final job:ParallelPollingMonitorcreateTaskArray