GCP 101: How to Use Google Compute Engine

Did you know that Google Cloud has its own secure and reliable infrastructure as a service (IaaS) component that’s built on the same infrastructure as the tried-and-true Google search engine and other services?

You do now. And I’m here to tell you all about how Google Compute Engine works in this latest installment of GCP 101. So far in these series, we’ve examined Google Cloud from a high level and also have taken a look at building a data pipeline in GCP.

Now we’re going to dive into GCP’s various services, all of which you can mix and match to create your perfect cloud environment, starting first with Compute Engine. 

What is Google Compute Engine?

We touched upon this service briefly in our first GCP 101 blog but didn’t get too deep into the specifics of what this means.

In short, this service allows you to run your apps on virtual machines (VMs), or instances, on physical hardware in Google’s global data center. Google Compute Engine makes it easy for you to have access to virtual machines that deliver large amounts of computing power in a cost-effective, secure cloud environment which spans 23 Google Cloud regions. 

software-developer-working-with-computer-in-the-mo-EFGFSSSCompute Engine is great for when you need more control of the underlying infrastructure. For example, you might use Compute Engine when you:

  • Are migrating existing applications through lift-and-shift or lift-and-modernize approaches to kick off your infrastructure modernization journey.
  • Run Windows or other 3rd party applications where you are bringing your own license (BYOL) to CGP or use a license-included VM image. These include ones available in the GCP Marketplace. 
  • Have highly customized business logic or you want to run your own storage system.

This service offers the choice of preset or custom machine sizes that most closely resemble your on-premise structure to best support your workloads. A partner will do this by rightsizing your environment with recommendations for the machine sizes that work best with your instance types and managed instances groups. 

Google Cloud offers a wide range of Compute Engine machine types. These include:

  • General-purpose N1, N2, N2D and E2 machines that offer the best price-performance ratio.
  • Memory-optimized VMs that offer higher memory per core, up to 12 TB.
  • Compute-optimized machines that offer the highest performance per core for compute-intensive workloads. 
  • Shared-core machines for N1 and E2 VMs for a cost-effective way to run small, non-resource-intensive applications.

You also can use what are known as preemptible VMs. These are low-cost, short-term instances that are ideal for running batch jobs and fault-tolerant workloads. Google Cloud indicates that these VMs cut budgets up to 80% over traditional VMs but offer the same performance and capabilities for short-term use. 

Google Compute Engine makes it easy for you to have access to virtual machines that deliver large amounts of computing power in a cost-effective, secure cloud environment. 

How to Use Google Compute Engine

Once you determine what kind of VMs you are going to use when running Compute Engine, you can explore how to best use it to keep your apps up and running. The solution has many features to help you easily do this. Some notable ones include...

OS Support

Your OS doesn’t limit your ability to use Google Compute Engine. You can run any of the following with this service — Debian, CentOS, CoreOS, SUSE, Ubuntu, Red Hat Enterprise Linux, FreeBSD, or Windows Server 2008 R2, 2012 R2, and 2016. That’s not all; you can bring your own shared image or use one from the Google Cloud community. And speaking of OS needs, you also can patch your OS across a set of VMs in Google Compute Engine. It even can be automated, if you choose.

Live Migration

Compute Engine can live-migrate your instances across servers without having to shut down for patching and maintenance (e.g., security). You can flag whether you want to include your VMs in the live migration or have scheduled downtime for Google to apply the patches. 

Persistent Disks

Google Persistent Disk, durable and high-performance block storage for GCP, is available in solid-state-drive (SSD) or hard-disk-drive (HDD) formats to use with your VM instances. You can take snapshots and create new persistent disks from those shots. Persistent disks retain data after a VM is terminated and can be attached to another instance.

Local SSD

Speaking of SSD, did you know that Google Compute Engine also offers local SSD storage that is physically attached to the server that houses the VM instance? They’re always encrypted and are designed for high input/output operations per second (IOPS). Local SSD offers lower latency than persistent disks.

GPU Accelerators

Some workloads need a little boost to keep going. You know the ones — those that are computationally intensive, such as machine learning, 3D visualization or medical analysis, to name just a few. GPU accelerators can speed things up on an as-needed basis. Add them to your VMs for these types of workloads and remove them when you are done. You pay only for the time when you are using the resources.

Global Load Balancing

Looking to maintain maximum performance throughout, and availability on a budget? That’s what you’ll get if you opt to use global load balancing technology with Google Compute Engine. This scalable option helps you distribute your incoming requests across multiple regions to meet your high-availability requirements.


No, not the restaurant kind, but it does work on a similar theory. With Google Compute Engine, you can create a reservation for VM instances to run in a specific zone. This ensures your project will have specific resources in place for anticipated demand increases. When demand slows, you can delete the reservation and return to your original configuration.

Per-Second Billing & Discount Models

cost optimization package imageCompute Engine pricing is based on per-second usage of the machine types, persistent disks plus any other other resources you’ve selected to enhance your virtual machines. You pay only for the compute time you use. You can get savings on your usage with several discount models. We already discussed reservations, and when you book one, you can save up to 57% with a commited-use discount that has no upfront costs or instance-type lock-ins. And if you’re consistent Compute Engine users, you can enjoy savings automatically through sustained-use discounts for running this service for a significant portion of your billing month.

Right-Sizing Recommendations

Compute Engine takes the guesswork out of optimizing how your virtual machine instances use resources. It provides machine-type recommendations to resize instances for better performance and efficiency, often resulting in monthly cost savings. These recommendations are automatically generated and are based on system metrics gathered over an eight-day period. 

This is just a broad overview of what Google Compute Engine is, what it does and how you can use it as part of your Google Cloud infrastructure environment. There are more nuances about this service and also many other Google Cloud services you can use that easily integrate with Google Compute Engine. 

We want to be sure you understand all that Google Cloud Platform has to offer, so be sure to check out other blogs in our GCP 101 series. We'll be adding more soon!

GCP 101: An Introduction to Google Cloud Platform

GCP 101: Building a Data Pipeline in Google Cloud Platform

GCP 101: How Autoscaling Works in the Google Cloud

GCP 101: Let’s Talk about Google Cloud Storage

GCP 101: Exploring Google Cloud SQL Database

GCP 101: Understanding Google Cloud VPC

Post Your Comments

Search Blog

get a cloud assessment

Meet the Author

Doug Sainato, Enterprise Cloud Account Executive

Doug Sainato, Enterprise Cloud Account Executive

Across his 20+-year tech career, Doug Sanaito has helped organizations get the most out of the cloud. He has served as a business analyst, sales/solution engineer and sales account executive, roles that reflect his lifelong love of analytical problem-solving. It comes in handy more often than not in the tech world, as he can attest. When he joined Onix six years ago, he started as a Google Apps SESolution Engineer, a role that helped him quickly develop a passion for the cloud infrastructure and all of the possibilities it offers to organizations launching a cloud journey. He’s an original member of Onix’s GCP team and has held sales, consulting and leadership roles. When his head is out of the cloud, Doug enjoys listening to the Beatles, visiting the beach and finally hoping to catch a big fish.

More Posts By Doug Sainato, Enterprise Cloud Account Executive

Are you cloud ready?

We'll perform a discovery of your environment, assess TCO and determine best workloads for migration. 

Get a Cloud Assessment