Google App Engine Managed VM with automatic scaling always starts with max number of instances and then scales down

265 views Asked by At

When I deploy a custom managed VM module, it always starts out with the max number of instances before it scales down.

Why does this happen and is there a way around this?

I suspect it is because cpu utilization is higher than the target during startup. But shouldn't the scaler know to not evaluate utilization during startup?

My scaling settings are as follows:

automatic_scaling:
  min_num_instances: 2
  max_num_instances: 20
  cool_down_period_sec: 60
  cpu_utilization:
    target_utilization: 0.5
1

There are 1 answers

0
Mathew Ryden On BEST ANSWER

coolDownPeriodSec sets how long the autoscaler waits after the VM starts to use data from that VM. The autoscaler 60 second default is probably too low. Try setting it to 120 to give it more time.