Google Cloud today launched a feature to pause/resume shared virtual machines. Before this feature was launched as an alpha a few years ago, the only option for developers was to stop and start the instance. According to Google, with Suspend/Resume, the experience is like closing and opening the lid of your laptop.
While an instance is suspended, you don’t pay for the cores and RAM it normally uses. Instead, you only pay for the storage cost of the instance’s memory. Google notes that OS licenses can also be reduced.
Other clouds offer similar functionality, though Google says that because it sends the standard ACPI S3 signal — the same signal your operating system sends to hibernate your desktop or laptop and switch RAM — the solution is compatible. OS images with a wide range of . In fact, this encourages developers to try it with undocumented custom OS images, since they can also work out of the box.
Google also states that the solution is different in that the image store is provided dynamically when the VM is suspended and is independent of the boot drive. This means you don’t have to worry about running out of space on your startup drive, and a stopped instance takes up less storage space. When suspended, the IP address of the instance remains the same, and after the instance is resumed, memory is moved back from storage to instance memory, and the cycle continues.
However, you can pause an image for up to 60 days. After that, it will automatically end. It’s worth noting that suspend/resume also doesn’t work for GPU instances, instances with more than 120GB of memory, E2 instances, and sensitive VMs. Removable instances can be suspended, but there is a risk that they will be stopped during the suspension process.
But the advantage here is not only cost savings. This system also means you can leave multiple instances idle for fast horizontal scaling when needed. After all, setting up a new virtual machine can take some time. If this is your use case, moving to a serverless system may be your best bet in the future, but while this is a long-term project, a system like this can help for the time being.
Some companies also use pause/resume for their development environments, which often don’t need to run 24/7. “By taking advantage of Compute Engine’s pause and resume feature, BigCommerce can reduce the operating costs of our Compute Engine-based development environment,” explains Aaron Humeryhaus, Design Manager at BigCommerce. “BigCommerce allows any engineer to adjust the “working hours” of their environment, which causes them to pause at the end of each business day and restart at the beginning of the next day. This reduced our VM instance from 168 hours per week to an average of 60 hours per week on every Wednesday, saving us thousands of dollars per month. We expect these cost savings to only increase as our engineering organization grows. ,