1

Compute Engine VMs Cost Optimization with Suspend/Resume

 2 years ago
source link: https://www.infoq.com/news/2022/03/google-compute-engine-vms-cost/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Compute Engine VMs Cost Optimization with Suspend/Resume

Mar 28, 2022 2 min read

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.

Compute_Engine_VMs_Hz6vcIq.max-800x800.jpg

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

Steef-Jan Wiggers

Steef-Jan Wiggers is one of InfoQ's senior cloud editors and works as a Technical Integration Architect at HSO in The Netherlands. His current technical expertise focuses on integration platform implementations, Azure DevOps, and Azure Platform Solution Architectures. Steef-Jan is a board member of the Dutch Azure User Group, a regular speaker at conferences and user groups, writes for InfoQ, and Serverless Notes. Furthermore, Microsoft has recognized him as Microsoft Azure MVP for the past eleven years.

Show more

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK