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: You observe that the application does not scale under high load. You want to resolve this. What should you do?
Choose an answer
Tap an option to check your answer.
Correct answer: Change the filter to metric.label.state = ‘used’..
Why this is the answer
The correct solution is to change the filter to metric.label.state = ‘used’. The Cloud Monitoring agent reports memory usage with different states, including 'used' and 'free'. To autoscale based on total memory usage exceeding 80%, you need to monitor the 'used' memory. By filtering for state = ‘used’, the autoscaler will correctly evaluate the proportion of memory actively consumed by the application against the total memory, triggering scaling when it surpasses the defined threshold. Changing the Target type to DELTAPERMINUTE is incorrect because memory usage is a gauge metric (a point-in-time value), not a rate. Changing the Metric identifier to agent.googleapis.com/memory/bytesused is incorrect because the existing metric agent.googleapis.com/memory/bytestotal is the correct base metric, and the state label differentiates used from total. Changing the filter to state = ‘free’ and Target utilization to 20 would cause scaling when free memory drops to 20%, which is equivalent to 80% used, but directly monitoring 'used' memory is more intuitive and directly aligns with the requirement.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed