Skip to content
6 min read·Lesson 3 of 10

Compute Engine and VM Options

Understand Google Compute Engine, machine types, disk options, preemptible VMs, and how to choose the right compute configuration.

Compute Engine is Google Cloud's Infrastructure-as-a-Service (IaaS) product. It lets you create and manage virtual machines (called instances) running on Google's global infrastructure. If you need full control over the OS, software stack, and configuration, Compute Engine is your starting point.

Machine Types

Machine types define the vCPU count, memory, and performance profile of a VM. GCP organises them into machine families:

FamilySeriesBest For
General PurposeN4, N2, N2D, E2, T2DWeb servers, dev environments, databases
Compute OptimizedC3, C2, C2DHigh-performance computing, gaming, science
Memory OptimizedM3, M2, M1Large in-memory databases (SAP HANA)
Accelerator OptimizedA3, A2, G2GPU workloads, ML training
Storage OptimizedZ3High IOPS, low-latency local storage

You can also create custom machine types — specifying any combination of vCPUs and memory — so you only pay for what you actually need.

Disk Options

Every Compute Engine instance needs a boot disk. Additional persistent disks can be attached:

Disk TypePerformanceUse Case
Balanced Persistent Disk (pd-balanced)GoodMost workloads — good price/performance balance
SSD Persistent Disk (pd-ssd)High IOPSDatabases, latency-sensitive apps
Standard Persistent Disk (pd-standard)LowSequential access, backups, cold data
Extreme Persistent Disk (pd-extreme)Very High IOPSHighest-performance DB workloads
Local SSDFastest (ephemeral)Temp data, scratch space — data lost on stop

Preemptible and Spot VMs

GCP offers two cost-saving VM options for fault-tolerant workloads:

  • Preemptible VMs: Up to 80% cheaper than regular VMs. GCP can terminate them with a 30-second warning. Maximum lifespan: 24 hours. Good for batch jobs, data processing.
  • Spot VMs: The successor to Preemptible VMs. No 24-hour limit; otherwise same preemption model. Up to 91% cheaper.

Instance Templates and Managed Instance Groups

For scalable, resilient architectures:

  • Instance Template: A reusable configuration (machine type, disk, network, startup script) for creating identical VMs.
  • Managed Instance Group (MIG): A group of VMs created from a template. Supports autoscaling, autohealing (replacing failed instances), and rolling updates. Essential for production workloads.

Billing and Discounts

  • Per-second billing (after a 1-minute minimum) — granular cost control.
  • Sustained Use Discounts (SUD): Automatic discounts of up to 30% for VMs that run for more than 25% of a month.
  • Committed Use Discounts (CUD): Up to 57% discount for 1-year or 3-year commitments.
Exam tip: Know the difference between Preemptible/Spot VMs vs standard VMs, and when to use each machine family. The ACE exam tests your ability to select the right machine type for a given workload scenario.

Key Takeaways

  • Compute Engine provides IaaS virtual machines running on Google's infrastructure.
  • Machine types are grouped into families: General Purpose (N, E, C), Compute Optimized (C), and Memory Optimized (M).
  • Preemptible and Spot VMs offer up to 91% cost savings for fault-tolerant workloads.
  • Persistent disks (HDD, SSD, Balanced) are the standard VM storage; Local SSDs offer the highest throughput.
  • Instance templates and managed instance groups enable auto-scaling and high availability.

Test your knowledge

Try exam-style practice questions to reinforce what you've learned.

Practice Questions →