The aim of this chapter is to familiarize ourselves with the implementation of various compute solutions.
We will cover the Google Compute Engine (GCE).
We will try to create each computing solution, in this and the upcoming chapters, by using the Cloud console and the command line with the gcloud CLI. We will learn how to edit and manage each specific resource. In our experience, which we gained by clearing the Associate Cloud Engineer exam twice, the compute solutions from the Google Cloud portfolio are some of the most important ones.
Let’s dive into the different compute solutions.
In the previous chapter, we had an overview of which compute solutions should be used and when. For the exam itself, we need to remember which solutions can be easily implemented based on the scenario, how much time we might need to do it, and how to estimate the total cost and choose the best solution accordingly.
Let’s start with GCE, one of the core Google Cloud products.
The base resources for virtual machines (VMs) are a processor, memory, storage, and a network. We have many ways to configure VMs, based on our requirements and how to implement them, be it through the Cloud console, command line, or code implementation.
It might not come as a surprise to you that Google Cloud utilizes a hypervisor that is responsible for virtualization – hosting many virtual servers on one or more significant servers. Google Cloud uses a KVM-based hypervisor secured and hardened by Google itself: https://cloud.google.com/blog/products/gcp/7-ways-we-harden-our-kvm-hypervisor-at-google-cloud-security-in-plaintext.
Throughout the chapter, we will refer to a VM as an instance, so please do not be confused when we switch between the two phrases. Similarly, we will refer to Google Compute Engine as GCE.
Before we actually create our first GCE instance, it is important to learn about the different types of machines – so-called machine families.
Generally speaking, Google Cloud offers machine families for different types of workloads.
Here is the general summary of different machine families:
- General-purpose: This offers the best balance between price and performance for a wide range of tasks.
- Compute-optimized: This delivers the highest performance per core on Compute Engine and is specifically designed for compute-intensive workloads.
- Memory-optimized: This is perfect for tasks that require a large amount of memory, providing more memory per core compared to other machine families, with a maximum capacity of 12 TB of RAM.
- Accelerator-optimized: This is specifically tailored to massively parallelized Compute Unified Device Architecture (CUDA) compute workloads, such as machine learning (ML) and high-performance computing (HPC). This machine family is the optimal choice for workloads that require GPUs.
GCE machines are further classified by series and generation. For example, the N1 series is the older version of the N2 series. Typically, a higher generation or series indicates newer CPU platforms or technologies.
Every machine series has predefined machine types with a set of resources available for the VM. If that predefined machine type doesn’t meet your requirements, you can create a custom machine type.
Google Cloud offers several workload-based machine families:
- General-purpose workloads:
- E2: Day-to-day computing at a lower cost. Typical use cases for E2 machine types can be low-traffic web servers, back office apps, containerized microservices, virtual desktops, and development and test environments.
- N2, N2D, and N1: A balanced between price and performance. Typical use cases can be low- to medium-traffic web and application servers, containerized microservices, CRM applications, and data pipelines.
- C3: Consistently high performance for a variety of workloads – high-traffic web and application servers, databases, in-memory caches, ad servers, game servers, data analytics, media streaming and transcoding, and CPU-based ML training.
- Tau T2D and Tau T2A: Best per-core performance/cost for scale-out workloads. Typical use cases include scale-out workloads, web servers, media transcoding, large-scale Java applications, and containerized microservices.
- Compute-optimized:
- C2, C2D, Ultra-high performance for compute-intensive workloads. Typical workloads include compute-bound workloads, high-performance web servers, game servers, ad servers, HPC, media transcoding, and AI/ML workloads.
- Memory-optimized:
- M3, M2, and M1: The highest memory-to-compute ratios for memory-intensive workloads. Typical applications deployed include medium-to-extra-large SAP HANA databases, in-memory data stores such as Redis, simulations, high-performance databases such as Microsoft SQL Server or MySQL, and electronic design automation.
- Accelerator-optimized:
- Optimized for accelerated HPC workloads. Typical workloads include CUDA-enabled ML training and inference, HPC, massively parallelized computation, natural language processing, the deep learning recommendation model (DLRM), video transcoding, and a remote visualization workstation.
To learn more details about each machine family, including a detailed description and the recommended settings for each type, visit the following URL: https://cloud.google.com/compute/docs/machine-resource.
Having learned about different machine families, we are now ready to start with our first GCE machine creation.