Part-17: πŸš€Google Cloud Compute Engine – Graphic Process Unit and Machine Families



This content originally appeared on DEV Community and was authored by Latchu@DevOps

Virtual Machine Types

Choosing the right VM family in GCP can save cost and boost performance.

General Purpose

  • E2 β†’ Cost-optimized (Web serving, Dev/Test)
  • N2/N2D β†’ Balanced (Enterprise apps, DBs, Web & App serving)
  • T2D (Tau) β†’ Scale-out optimized (Best price/performance for scale-out workloads)

Workload Optimized

  • C2 β†’ Compute optimized (HPC, Gaming, Scientific modeling)
  • M2 β†’ Memory optimized (SAP HANA, real-time analytics, in-memory DBs)
  • A2 β†’ Accelerator optimized (ML, HPC, GPU-heavy workloads)

💡 Rule of thumb:

👉 Use E2/N2 for general apps,
👉 C2/M2/A2 for specialized high-performance workloads.

gce-generalpurpose

GCE Machine Families

machine-family

machine-families-1

GCE – Machine Types

machine-types

  • We can choose machine type based on CPU, Memory and Disk needed for us.
  • As number of vCPU’s increases accordingly memory, disk and networking sizes increase

Google Compute Engine – Customized Machine Type

custom-machinetype

Custom Machine Types: We can configure our Customized Machine Type

  • Desired vCPU Cores
  • Desired Memory
  • Desired GPU

If predefined machine types doesn’t match our workload needs we can create a VM with custom machine type

This feature is available for specific Machine families only

  • General Purpose: E2, E2 shared-core, N2, N2D, N1

Billed per vCPUs and memory provisioned

Google Compute Engine – GPUs

gpu-1

What is GPU ?

  • Graphics Processing Unit

Where do you use GPUs?

  • Graphic Intensive workloads
  • Machine Learning
  • Scientific Computing (Math Intensive)
  • 3D Visualization

How to use GPUs in GCP GCE ?

  • Machine Family: GPU
  • Boot Disk: Use Deep Learning Linux OS for supporting GPUs

gpu-2

Which machine families support GPUs?

  • N1 (general-purpose) – Attach the GPU to the VM during, or after VM creation
  • A3, A2, and G2 (accelerator-optimized) – GPUs are automatically attached when you create the VM
  • You can add GPU to preemptible and Spot VM Instances

GPUs and host maintenance

  • VMs with attached GPUs cannot live migrate and must stop for host maintenance events

GPUs and block storage

  • You can add Local SSDs to VMs that have GPUs attached
  • Not all GPU types support Local SSDs


This content originally appeared on DEV Community and was authored by Latchu@DevOps