GCP – Google Compute Engine – Machine Type

What is Machine Type?

  • Machine Type is a template of virtualized hardware resources needed to instantiate the Google Compute Engine instances on Google Cloud Platform (GCP). The template contains resources like memory, virtual CPU, persistent disk storage.

Compute Engine - Machine Type
Compute Engine – Machine Type
  • Generally, one physical CPU is equal to 2 virtual CPU (vCPU).
  • If a VM instance is running and you change Machine Type, it will restart the VM.
  • There are two main types of Machine Type
    • Pre-defined Machine Type
    • Custom Machine Type
  • Pre-defined Machine Type –
    • Standard – 
      • these are General Purpose machines. These provide good balance of price and performance. 
      • The CPU (up to 32 vCPU) and Memory (maximum 8 GB per vCPU; total up to 128 GB memory) configurations are at average level and so these can be used in most of the use cases where neither high processing nor high memory requirements are mentioned. 
      • Use Cases – day-to day computing at lower cost like web serving, back-office applications, small-medium-large databases, media-streaming, microservices etc. 
      • Examples are – E2, N1, N2, N2D
    • High CPU – 
      • These are used where you have a requirement of high processing but not that high memory is needed. 
      • These provide high-performance for compute-optimized use cases. In these machine types, the virtual CPU is more compared to memory. 
      • Use Cases – ultra high performance for compute-intensive workloads like gaming.
      • Example – C2
    • High Memory – 
      • These are used where you have high memory-optimized requirements. 
      • If need high in-memory databases, then you can use this machine type. This is the case of high-memory but not that high CPU. 
      • Use Cases -ultra high performance for memory-intensive workloads like in-memory analytics, large in-memory databases etc.
      • Example – M2
    • Shared Core – 
      • These provide a single vCPU that runs on one hyper-thread of the host CPU. These are used for multi-tasking on the same physical machine.
      • In the CPU bursting, instances that are using shared-core machine type – they can use additional physical CPU for short period of time.
      • Use Cases – cost-effective solution for small or batch workloads.
      • Example – A2
  • Custom Machine Type
    • When pre-defined Machine Types are not able to fulfill your requirement.
    • For example, if you have a requirement of CPU more than provided by General-purpose machine types but less than Compute-optimized 
    • Use Cases – more processing power or memory power than General-purpose machine types but less than compute-intensive or memory-intensive machine types.

Leave a Comment

Your email address will not be published. Required fields are marked *