1

I'm running a Docker container in the GAE Flexible Environment beta and have my auto-scaling configured like so:

automatic_scaling:
  min_num_instances: 2
  max_num_instances: 10
  cool_down_period_sec: 60
  cpu_utilization:
    target_utilization: 0.75

My CPU utilization chart in the console for the corresponding Compute Engine VM instances looks like this:

CPU utilization chart

And yet for the last 30+ minutes GAE has been running the maximum 10 instances. Looking at my application's logs, it doesn't appear to be inordinately busy either. Yet this situation happens regularly.

Why does GAE scale so aggressively? Is there a better place than the CPU utilization chart to find the data it uses to drive scaling decisions?

1 Answer 1

1

The short answer is that currently the flexible environment uses the Compute Engine autoscaler, which has the following behavior:

During periods of heavy CPU utilization, if utilization reaches close to 100%, the autoscaler estimates that the group may already be heavily overloaded. In these cases, the autoscaler increases the number of virtual machines by at least an extra 50% or a minimum of 4 instances, whichever is higher. In general, CPU utilization within a managed instance group will not exceed 100%.

One way to reduce the aggressiveness of the autoscaler is to set the target_utilization to a high value. More parameters for tuning the autoscaler will hopefully be added in the future which are more in line with the standard environment options.

1
  • Fair enough, but my point is that the CPU chart doesn't get anywhere close to 100%, or even reach the 75% threshold I set in my config. So either the auto scaler is buggy or the chart is lying -- or I'm missing something.
    – Piotr
    Oct 31, 2016 at 9:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .