Google Compute Engine explained simply: it is Google Cloud’s infrastructure-as-a-service offering, providing virtual machines that run on the same global infrastructure that powers Google Search and YouTube. The central question it answers is how to get flexible, scalable compute without buying or running your own servers. The short answer is that you pick a machine type, launch a virtual machine in minutes, and pay only for the resources you use, billed by the second.
Compute Engine, usually shortened to GCE, is the foundation of Google Cloud Platform. Most Google Cloud workloads either run directly on Compute Engine virtual machines or on services built on top of them. Our guide to how IT teams actually use Google Cloud Platform covers the wider platform that Compute Engine sits inside.
Key takeaways
- Google Compute Engine is Google Cloud’s IaaS service for running virtual machines on Google’s global infrastructure.
- Machine families are grouped by workload: general-purpose, compute-optimised, memory-optimised and accelerator-optimised.
- Custom machine types let you choose exact vCPU and memory amounts instead of a fixed size.
- Sustained use discounts apply automatically to eligible machine families that run for a large part of the month.
- Committed use discounts offer deeper savings for one- or three-year commitments on steady workloads.
- Billing is per second after a one-minute minimum, and stopped instances still cost money for their disks.
What Google Compute Engine is
Google Compute Engine is the service that lets you create and run virtual machines on Google Cloud. Each virtual machine, called an instance, runs your choice of operating system, such as Linux or Windows, and your applications on top of it. You choose how many virtual CPUs and how much memory it has, which disks it uses and which network it connects to, and Google provisions the underlying hardware.
Compute Engine is infrastructure as a service, which means Google manages the physical machines, the data centres and the virtualisation layer, while you manage the operating system and everything above it. That split is the difference between GCE and higher-level services such as Cloud Run or App Engine, which manage the operating system and runtime for you. Best for: teams that need full control of their servers, custom operating systems or specific software that only runs on a virtual machine.
Machine families and machine types
A machine type defines the virtual CPUs, memory and capabilities of an instance. Google groups machine types into families, and each family is tuned for a different workload. General-purpose families, such as E2, N2, N2D, N4 and C3, offer a balanced ratio of CPU to memory and suit web servers, application servers and development environments.
Compute-optimised families, such as C2 and H3, offer a higher ratio of CPU to memory and faster processors for compute-heavy work such as batch processing, media transcoding and high-performance computing. Memory-optimised families, such as M1, M2 and M3, offer very large memory per virtual CPU for in-memory databases such as SAP HANA. Accelerator-optimised families add GPUs for machine learning training and inference.
Within a family, machine types come in predefined sizes, such as standard, high-memory and high-CPU shapes. An e2-standard-4, for example, has 4 virtual CPUs and 16 GB of memory. Shared-core machine types, such as e2-micro, e2-small and e2-medium, share a physical CPU core between instances and suit small, low-cost workloads. Our guide to each core Google Cloud Platform service explains where Compute Engine fits alongside Google’s other services.
| Family | Best for | Key trait |
|---|---|---|
| General-purpose (E2, N2, N4, C3) | Web servers, app servers, dev and test | Balanced CPU and memory, lowest cost per vCPU |
| Compute-optimised (C2, H3) | HPC, batch, gaming servers | High CPU to memory ratio, fastest single-thread speed |
| Memory-optimised (M1, M2, M3) | In-memory databases, analytics | Very large memory per vCPU |
| Accelerator-optimised (A, G) | Machine learning, GPU workloads | GPUs attached to the instance |
| Shared-core (e2-micro, e2-small) | Small websites, microservices | Shared physical core, lowest cost |
Custom machine types
Custom machine types are one of Compute Engine’s most useful features. Instead of choosing from predefined sizes, you specify the exact number of virtual CPUs and the exact amount of memory you need. Most series support custom types with 1 to 96 virtual CPUs and memory in 256 MB increments, within limits that depend on the machine series.
Custom types matter because real workloads rarely match a predefined size exactly. A service that needs 6 virtual CPUs and 20 GB of memory would otherwise have to take an 8-CPU predefined type and pay for capacity it never uses. Custom types cost a small premium over predefined types, but they usually save money overall by removing that waste. Extended memory options let you go beyond the standard memory per virtual CPU for memory-hungry workloads.

How Compute Engine pricing works
Compute Engine uses a pay-as-you-go model. You pay for the virtual CPUs, memory, disks and network capacity your instances consume, billed by the second after a one-minute minimum. Prices vary by machine family and by region, and licence fees apply separately for Windows, Red Hat Enterprise Linux, SUSE and SQL Server.
Stopped instances do not cost anything for virtual CPUs or memory, but their disks and reserved IP addresses keep billing, so a stopped instance is not free. Spot VMs, formerly called preemptible VMs, offer large discounts in exchange for the possibility that Google reclaims the capacity with short notice, which suits fault-tolerant batch work. Pricing varies by region and usage, so check Google Cloud’s current pricing page before budgeting a deployment.
Sustained use and committed use discounts
Sustained use discounts apply automatically to eligible machine families when an instance runs for a large part of the billing month. The discount increases as usage rises, starting after the instance has run for about a quarter of the month and reaching its maximum when it runs for the whole month. No purchase or commitment is needed, and the discount applies to the N1, N2, N2D, C2, M1 and M2 series, among others.
Not every family qualifies. E2 instances do not receive sustained use discounts, because they are already priced as the lowest-cost general-purpose option. Committed use discounts are the other mechanism: you commit to a level of usage for one or three years and receive a deeper discount in return, which suits workloads with a steady baseline. Flexible committed use discounts can apply across machine families and regions. The right approach is usually a mix: commitments for the steady baseline, sustained use discounts for the rest, and Spot VMs for work that can be interrupted.
Features that set Compute Engine apart
Live migration is one of Compute Engine’s signature features. When Google needs to maintain the physical host underneath your instance, it can move the running virtual machine to another host without stopping it, so maintenance rarely causes downtime. Most other clouds require a reboot or a planned maintenance window for the same operation.
Compute Engine also offers managed instance groups, which run a fleet of identical instances behind a load balancer and automatically replace unhealthy ones or scale the fleet up and down with demand. Combined with health checks and autoscaling, that turns a single virtual machine into a resilient service. Predefined and custom images, snapshots and persistent disks round out the storage story: disks can be resized while attached, and snapshots back them up across regions. Our guide to how cloud load balancing works explains how traffic reaches those instance groups.
Decision framework: choosing a Compute Engine setup
- Start with a general-purpose family such as E2 or N2 for ordinary web and application workloads, and move to a specialised family only when a bottleneck proves it.
- Use custom machine types when your workload falls between predefined sizes, rather than paying for unused capacity.
- Reserve committed use discounts for the steady baseline you are confident will run for a year or more.
- Use Spot VMs only for work that can survive interruption, such as batch jobs and rendering.
- Run production workloads in a managed instance group across zones, not as a single instance.
- Put a load balancer in front of the group, with health checks that actually exercise the application.
- Snapshot disks on a schedule, and test restoring from a snapshot before you need it.
- Remember that stopped instances still pay for disks and reserved addresses, so delete what you no longer need.
Frequently asked questions
What is Google Compute Engine?
Google Compute Engine is Google Cloud’s infrastructure-as-a-service offering for running virtual machines. You choose a machine type, an operating system and disks, and Google provisions the underlying hardware on its global infrastructure.
What is the difference between Compute Engine and App Engine?
Compute Engine gives you virtual machines that you manage yourself, including the operating system. App Engine is a platform-as-a-service offering that manages the runtime and scaling for you, in exchange for less control over the underlying server.
What are custom machine types in Compute Engine?
Custom machine types let you specify exact virtual CPU and memory amounts instead of choosing a predefined size. They suit workloads that fall between predefined sizes, and they cost a small premium over the equivalent predefined type.
Do sustained use discounts apply to all machine types?
No. Sustained use discounts apply automatically to eligible families such as N1, N2, N2D, C2, M1 and M2 when they run for a large part of the month. E2 instances do not receive them, because they are already the lowest-cost general-purpose option.
How is Compute Engine billed?
Compute Engine bills per second after a one-minute minimum, for the virtual CPUs, memory, disks and network your instances use. Prices vary by machine family and region, and licence fees apply separately for Windows and other licensed operating systems.
What are Spot VMs?
Spot VMs are heavily discounted Compute Engine instances that Google can reclaim with short notice when capacity is needed elsewhere. They suit fault-tolerant work such as batch processing, and they are not suitable for workloads that cannot tolerate interruption.







