BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Compute Engine VMs Cost Optimization with Suspend/Resume

Compute Engine VMs Cost Optimization with Suspend/Resume

This item in japanese

Recently, Google announced the general availability of the Suspend/Resume feature for its Compute Engine VMs. The feature provides customers better control over Google Cloud resource consumption.

Earlier, the company made suspend/resume available in preview after being in alpha for a few years. By suspending a Google Compute Engine VM, customers can save the state of their instance to disk, allowing them to pick up where they left off when resuming it later. In the suspend state, they no longer incur the cost for cores or RAM, only for the storage of the instance memory. In addition, the running costs like OS licensing may be reduced. 

Users can use the Cloud Console, the gcloud CLI, or the API to suspend an instance. Note that they can suspend an instance for up to 60 days before the VM is automatically stopped. In addition, there are other limitations like that Suspend/Resume doesn't work for GPU instances, instances with more than 120 GB of memory, E2 instances, and Confidential VMs.

Source: https://cloud.google.com/blog/products/compute/save-by-suspending-vms-on-google-compute-engine

How suspending works is that an ACPI S3 signal is sent to the instance's operating system when suspending, leading to two significant advantages compared to similar functionalities from other cloud providers. According to the company's blog post:

  • Suspending allows for broad compatibility with a wide selection of OS images without requiring you to use a cloud-specific OS image or install daemons. 
  • Storage is dynamically provisioned when Suspend is requested and is separate from the instance's boot disk. This is in contrast to implementations in other clouds that require you to ensure that you have sufficient empty space in your boot disk to save the instance state, which may increase the running costs of your VM.

Regarding other public cloud providers, Microsoft, for instance, offers its customers to stop VMs in the portal or through PowerShell or Azure CLI. As a result, customers do not incur costs in the "Stopped (deallocated)" state of the VM. Stop/start or suspend/resume VMs can lead to cost savings. In the Google blog post, Aaron Humerickhouse, manager, Engineering at BigCommerce, said:

Utilizing Compute Engine's suspend and resume functionality has allowed BigCommerce to reduce operation costs of our Compute Engine-driven development environment - each engineer is allowed to customize their environment's "working hours," which triggers suspension at the end of each workday and resumption at the beginning of the next day - reducing our Virtual Machine Instance usage times from 168 hours a week to 60 hours a week per environment on average.

Lastly, Google Cloud VMs are available in most regions, with more to come.  

About the Author

Rate this Article

Adoption
Style

BT