Jump to Content
Compute

Introducing Managed Instance Groups standby pool: Stop and suspend idle VMs

February 20, 2024
Mike Kartamyshev

Product Manager

Try Gemini 1.5 models

Google's most advanced multimodal models in Vertex AI

Try it

At Google Cloud we are constantly working on providing capabilities to improve the cost-efficiency of your infrastructure. One of the ways to do that is to stop or suspend your Compute Engine virtual machines (VMs), to avoid compute charges if they are idle. However, if you manage your applications with Managed Instance Groups (MIGs), this capability was not available.

Introducing standby pool in Managed Instance Groups

Now with standby pool in Managed Instance Groups (MIG) you can pause and resume VMs, manually or as part of MIG automation. This is a new way for MIGs to reduce costs when pausing applications, or enable a MIG to respond faster to increased load with pre-initialized VMs.

Why should you try it?

Stopped or suspended VMs cost only a fraction of a price of running VMs, and you can resume them when you need them in the same state as they were before, without losing the VM’s name, IPs, metadata, disks content or even memory. Standby pool in MIG can be used to:

  • Pause applications and save on costs, rather than running idle VMs and getting charged for compute. VMs in the standby pool keep their state, including software and configurations managed by configuration management tools like Puppet, Chef, Ansible, etc.
  • Stop application and preserve the content of their disks after performing a given calculation, for example at the end of an HPC batch job.
  • Accelerate a MIG’s horizontal scaling cost-effectively, by pre-initializing VMs, pausing them, and resuming them in response to rapid load increase. This is more cost-effective than overprovisioning (running an excessive number of VMs), and depending on the specific application, can also be several times faster than creating a new one and initializing it.

Getting started

You can stop/suspend and start/resume VMs in a MIG individually through the Google Cloud console. In the instance group overview page, select VMs and click the Stop or Suspend button.

https://storage.googleapis.com/gweb-cloudblog-publish/images/1_Managed_Instance_Groups_standby_pool.max-1100x1100.png

You can also stop, suspend, and resume VMs through gcloud and API calls. Read more about manually stopping and suspending VMs.

Finally, you can configure standby pool behavior through the console, gcloud and API. When creating or editing a MIG, go to “advanced configuration” and open the “standby pool” section.

https://storage.googleapis.com/gweb-cloudblog-publish/images/2_Managed_Instance_Groups_standby_pool.max-1300x1300.png

Standby pool has target sizes for the number of suspended and stopped VMs that can be modified. The MIG will automatically create and stop and suspend VMs to meet the requested number of standby VMs.

Standby pool can be configured in two modes:

  • Manual - you have full control over stopping, suspending and starting VMs, and you can decide which VMs are running, stopped or suspended at any moment.
  • Scale-out-pool - you set the size of the standby pool so that the MIG automatically starts VMs from the standby pool when its size is increased (either by you or by the autoscaler). It then automatically replenishes the standby pool by pre-initializing VMs and putting them in the pool, to be ready for the next load increase. Read more about accelerating MIG scale-out with standby pool.

Further, you can configure how long MIG must wait from the time a VM is initialized to when it is ready to be stopped or suspended by setting Initial delay. This helps ensure that your initialization scripts have the time to complete.

Try standby pool today

Standby pool is in preview across all regions. You can learn more about how to stop/suspend VMs in MIG and how to configure standby pool in the documentation page.

Posted in