Determining GCP instance type for workflows.
I would like to know which GCP instance types are hosting my workflows. The primary motivation is to understand workflow costs. GCP instance types and pricing are available here.
This is explained in more detail below, along with currently applicable information that I am aware of.
I believe Terra workflows are executed using Googe Lifesciences Pipelines API, which spawns GCP instances for the duration of the workflow. To estimate costs associated with Terra workflow submissions, it is necessary to know which GCP instance type host workflow jobs, as well as the number of cores and RAM. This information is partially contained in the response the the Firecloud API workflowMetadata endpoint:
"jes": {
"endpointUrl": "https://genomics.googleapis.com/",
"executionBucket": "gs://fc-9169fcd1-92ce-4d60-9d2d-d19fd326ff10/05c90bd5-f0bd-4901-aef0-73270a40edd0",
"googleProject": "firecloud-cgl",
"instanceName": "google-pipelines-worker-69a16132e9de0ef6cf9efbc4abe40212",
"machineType": "custom-10-65536",
"zone": "us-central1-c"
}
Here we see that the workflow job was executed on a "custom" machine with 10 cores and 64GiB of RAM. However, the GCP instance type is unspecified.
Typical instance types are N1 and N2. However, if workflows are given memory or CPU optimized instance types, costs can increase 10% or more.
Comments
4 comments
Hi Brian Hannafious,
Thanks for writing in. All machines created by PAPI are
custom-<cpu>-<memory>and behind the scenes, it usesn1,n2, etc. machine types for the VM. If there is non1orn2in thecustom-<cpu>-<memory>string, it defaults to ann1.Best,
Samantha
Hi Samantha,
Can you let me know what options we would need to set (and to what values) in the runtime section for a task to get an n2 instance?
Is this option from Cromwell google cloud backend docs is supported in Terra?
https://cromwell.readthedocs.io/en/stable/RuntimeAttributes/#cpuplatform
The cpuplatform option isn't documented here..
https://support.terra.bio/hc/en-us/articles/360046944671-Default-runtime-attributes-for-workflow-submissions
But I'm uncertain if that means it's unsupported or just doesn't have a default value or just isn't documented.
Many thanks, Mitch
Hi Mitch Cunningham,
Thanks for the question. Let me double-check with one of our Workflow engineers on this and get back to you!
Kind regards,
Jason
Hey Mitch Cunningham
It looks like you should be able to use the
cpuPlatformruntime attribute in your WDL.Note that when this option is specified, you will want to make sure the requested CPU platform is available in the
zonesyou selected.If you run into any trouble with this, let us know!
Kind regards,
Jason
Please sign in to leave a comment.