You have a Compute Engine application that you want to autoscale when total memory usage exceeds 80%. You have installed the Cloud Monitoring agent and configured the autoscaling policy as follows:
– Metric identifier: agent.googleapis.com/memory/percent_used
– Filter: metric.label.state = ‘used’
– Target utilization level: 80
– Target type: GAUGE
You observe that the application does not scale under high load. You want to resolve this. What should you do?
A. Change the Target type to DELTA_PER_MINUTE.
B. Change the Metric identifier to agent.googleapis.com/memory/bytes_used.
C. Change the filter to metric.label.state = ‘used’ AND metric.label.state = ‘buffered’ AND metric.label.state = ‘cached’ AND metric.label.state = ‘slab’.
D. Change the filter to metric.label.state = ‘free’ and the Target utilization to 20.
Disclaimer
This is a practice question. There is no guarantee of coming this question in the certification exam.
Answer
C
Explanation
Tip:
In the real exam, it could be “Filter: metric.label.state = ‘used’ AND metric.label.state = ‘buffered’ AND metric.label.state = ‘cached’ AND metric.label.state = ‘slab'” is in the QUESTION.
The answer should be:
C. Change the filter to metric.label.state = ‘used’
A. Change the Target type to DELTA_PER_MINUTE.
B. Change the Metric identifier to agent.googleapis.com/memory/bytes_used.
C. Change the filter to metric.label.state = ‘used’ AND metric.label.state = ‘buffered’ AND metric.label.state = ‘cached’ AND metric.label.state = ‘slab’.
(The current filter only considers memory in the “used” state. However, the operating system also uses memory for caching, buffering, and other purposes. By modifying the filter we ensure the autoscaling policy considers all memory states, providing a more accurate representation of total memory usage.
https://cloud.google.com/compute/docs/autoscaler/scaling-cloud-monitoring-metrics#autoscale_based_on_memory_usage)
D. Change the filter to metric.label.state = ‘free’ and the Target utilization to 20.