Google Associate Cloud Engineer Question 64
Select 2Google Cloud PlatformYou are tasked with running a batch processing job that can tolerate interruptions and requires a specific combination of vCPUs and memory not offered by predefined machine types. To optimize cost on Google Cloud Platform, what should you do?
- A
A. Use predefined machine types with Spot VM instances.
- B
B. Use a custom machine type with Spot VM instances.
- C
C. Use a custom machine type with regular on-demand VM instances.
- D
D. Use managed instance groups with Spot VM instances.
Show answer and explanation
Correct answers: B, D
Explanation
For batch processing jobs that can tolerate interruptions, using Spot VM instances is cost-effective because they are significantly cheaper than regular VM instances. When specific vCPU and memory requirements are needed, custom machine types provide the necessary flexibility. Combining custom machine types with Spot VM instances optimizes cost, and using managed instance groups with Spot VMs ensures automatic scaling and reallocation, making options B and D the best choices.
- A. Incorrect.
A. Predefined machine types do not offer the flexibility needed for specific vCPU and memory requirements and might not optimize cost as effectively as custom machine types.
- B. Correct.
B. Custom machine types allow you to specify the exact vCPU and memory requirements, and using them with Spot VM instances can significantly reduce costs for interruptible workloads.
- C. Incorrect.
C. While custom machine types provide the needed flexibility, using regular on-demand VM instances is not cost-effective for interruptible workloads.
- D. Correct.
D. Managed instance groups can automatically handle interruptions and rescheduling for Spot VM instances, making it a cost-effective choice for scalable and fault-tolerant batch processing.