Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Specifying minimum CPU type in Batch Job to reduce CODE_GCE_ZONE_RESOURCE_POOL_EXHAUSTED

Hi,

I'm creating a batch job from a GCP Workflow in the us-central1 region. I'm specifying a c3d-highcpu-30 machine type, because it has the best performance for the image processing I'm doing.

Today, I've been getting lots of timeouts and an error as above. It's better for me to complete the batch job no matter how long it takes, but obviously the faster the better.

Can I set the allocationPolicy for the batch job create command so that it tries for the preferred machine type but then will drop down to something slower if no resources are available? Is that what minCPUPlatform does?

Thanks,

Chris

Solved Solved
0 1 214
1 ACCEPTED SOLUTION

At the moment, Batch does not allow for a list of preferred machines to be specified and leveraged for a job. This is a feature that is currently being investigated. The use of minCPUPlatform is used to specify the minimum hardware architecture for a machine type since a machine type can support different generations of hardware. See https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform for more details.

View solution in original post

1 REPLY 1

At the moment, Batch does not allow for a list of preferred machines to be specified and leveraged for a job. This is a feature that is currently being investigated. The use of minCPUPlatform is used to specify the minimum hardware architecture for a machine type since a machine type can support different generations of hardware. See https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform for more details.