Compute Engine

Introduction

  • Virtual machines have the power and generality of a full-fledged operating system in each. You configure a virtual machine much like you build out a physical server: by specifying its amounts of CPU power and memory, its amounts and types of storage, and its operating system.

  • Compute Engine lets you create and run virtual machines on Google infrastructure.

  • For each VM that you run for more than 25% of a month, Compute Engine automatically gives you a discount for every incremental minute. You can get up to a 30% net discount for VMs that run the entire month.

Lifecycle

  • On provisioning stage, the resources such as CPU, memory, and disks are being reserved for the instance, but the instance itself isn't running yet

  • On staging stage, resources have been acquired and the instance is prepared for launch, Compute Engine is adding IP addresses, booting up the system image, and booting up the system

  • On running stage, it will go through pre-configured startup scripts and enable SSH or RDP access, while running, you can configure some of the meta data , etc, to modify the usage

  • To know that if you are restarting, rebooting, stopping, or even deleting an instance, the shutdown process will take about 90 sec

  • When a VM is terminated, you do not pay for memory and CPU resources. However, you are charged for any attached disks and reserved IP addresses

Preemptible VM

  • Preemptible VM instances are available at much lower price—a 60-91% discountarrow-up-right—compared to the price of standard VMs.

  • Compute Engine might stop (preempt) these instances if it needs to reclaim the compute capacity for allocation to other VMs. Preemptible instances use excess Compute Engine capacity, so their availability varies with usage.

  • If your apps are fault-tolerant and can withstand possible instance preemptions, then preemptible instances can reduce your Compute Engine costs significantly. For example, batch processing jobs can run on preemptible instances. If some of those instances stop during processing, the job slows but does not completely stop.

Machine Family

  • There are 4 types of machine families

  • General-purpose machine family has the best price-performance with the most flexible vCPU to memory ratios, and provides features that target most standard and cloud-native workloads

  • Compute-optimized virtual machine (VMs) instances are ideal for customers most performance-intensive workloads

  • The memory-optimized machine family provides the most compute and memory resources of any Compute Engine machine family offering. They are ideal for workloads that require higher memory-to-vCPU ratios than the high-memory machine types in the general-purpose N1 machine series

  • The accelerator-optimized machine family feature NVIDIA's new Ampere A100 GPUsarrow-up-right and is a new machine family available on Compute Engine. Machine types in this family are optimized for massively parallelized Compute Unified Device Architecture (CUDA) workloadsarrow-up-right, such as machine learning (ML) and high performance computing (HPC).

  • If you need GPU support for a compute-heavy workload, you can choose to attach GPUs to certain machine types. You can only use GPUs with general-purpose N1 VMs or accelerator-optimized A2 VMs.

Disk Options

Persistent Disk

When you configure a persistent disk, you can select one of the following disk types.

Local SSDs

  • Local SSDs are physically attached to the server that hosts your VM instance. Local SSDs have higher throughput and lower latency than standard persistent disks or SSD persistent disks. The data that you store on a local SSD persists only until the instance is stopped or deleted. Each local SSD is 375 GB in size, but you can attach a maximum of 24 local SSD partitions for a total of 9 TB per instance

Cloud Storage

Custom Image

  • You can create custom images from source disks, images, snapshots, or images stored in Cloud Storage and use these images to create virtual machine (VM) instances. Custom images are ideal for situations where you have created and modified a persistent boot disk or specific image to a certain state and need to save that state for creating VMs.

Instance Template

  • Instance templates define the machine type, boot disk image or container image, labels, startup script, and other instance properties. You can then use an instance template to create a MIGarrow-up-right or to create individual VMsarrow-up-right. Instance templates are a convenient way to save a VM instance's configuration so you can use it later to create VMs or groups of VMs.

Sole-tenancy

  • Sole-tenancy lets you have exclusive access to a sole-tenant node, which is a physical Compute Engine server that is dedicated to hosting only your project's VMs. Use sole-tenant nodes to keep your VMs physically separated from VMs in other projects, or to group your VMs together on the same host hardware, as shown in the following diagram.

Operation

Create New Instance

SSH to instance

Manage SSH Key

  • Create SSH Key

  • Insert Public key into compute engine

  • Connect compute engine by own terminal

Monitoring

  • Install new ops agent on vm

  • Install monitoring agent (legacy) on vm

  • Install logging agent (legacy) on vm

View detail and list

Last updated