Google Professional Cloud Developer exam dumps

Google Professional Cloud Developer practice question 380 of 481

Professional Cloud Developer. Professional level, Google Cloud. Free question with the correct answer and a full explanation.

Google Professional Cloud Developer Question 380

Select 2Google Cloud Platform

You are deploying a containerized web application on Google Kubernetes Engine (GKE) and want to ensure the application performs optimally under varying workloads. The application has a predictable memory usage pattern but can occasionally experience CPU spikes. How should you define the resource requirements for the application in the Pod specification to achieve this?

  1. A

    Set memory requests to the average memory usage and memory limits to the maximum observed memory usage.

  2. B

    Set CPU requests to a value slightly above the average CPU usage and CPU limits to handle peak CPU usage.

  3. C

    Leave resource requests and limits unset to allow Kubernetes to automatically allocate resources as needed.

  4. D

    Set memory and CPU requests equal to their respective limits to ensure guaranteed performance.

  5. E

    Set CPU requests to a very low value and memory limits to an excessively high value to avoid resource throttling.

Show answer and explanation

Correct answers: A, B

Explanation

In Kubernetes, defining proper resource requests and limits is crucial for optimal workload performance and cluster efficiency. Memory requests should align with average usage to ensure sufficient allocation, while limits should handle maximum observed usage to avoid overcommitment. Similarly, CPU requests should be slightly above the average to maintain consistent performance, and limits should account for spikes to prevent throttling. This approach balances performance with efficient resource utilization.

  • A. Correct.

    This is correct because setting memory requests to the average and memory limits to the maximum observed ensures efficient resource allocation and prevents memory overcommitment.

  • B. Correct.

    This is correct because setting CPU requests slightly above average ensures sufficient allocated CPU resources, while setting CPU limits to handle peak usage avoids throttling during spikes.

  • C. Incorrect.

    This is incorrect because leaving resource requests and limits unset can lead to resource contention and unpredictable performance.

  • D. Incorrect.

    This is incorrect because setting requests equal to limits does not allow for flexibility in resource allocation and may lead to inefficient usage of resources.

  • E. Incorrect.

    This is incorrect because setting CPU requests too low can cause resource starvation, while excessively high memory limits can lead to inefficient cluster utilization.

Timed practice exam

Take a Google Professional Cloud Developer practice test under exam conditions

60 questions in 120 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam