Compute Engine
Last updated
Was this helpful?
Last updated
Was this helpful?
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.
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 instances are available at much lower price—a —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.
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
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.
When you configure a persistent disk, you can select one of the following disk types.
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
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.
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.
Create SSH Key
Insert Public key into compute engine
Connect compute engine by own terminal
Install new ops agent on vm
Install monitoring agent (legacy) on vm
Install logging agent (legacy) on vm
The accelerator-optimized machine family feature NVIDIA's new Ampere and is a new machine family available on Compute Engine. Machine types in this family are optimized for , such as machine learning (ML) and high performance computing (HPC).
Standard persistent disks (pd-standard
) are backed by .
Balanced persistent disks (pd-balanced
) are backed by . They are an alternative to SSD persistent disks that balance performance and cost.
SSD persistent disks (pd-ssd
) are backed by .
Extreme persistent disks (pd-extreme
) are backed by . With consistently high performance for both random access workloads and bulk throughput, extreme persistent disks are designed for high-end database workloads. Unlike other disk types, you can provision your desired IOPS. For more information, see .
Cloud Storage buckets are the most flexible, scalable, and durable storage option for your VM instances. If your apps don't require the lower latency of and , you can store your data in a Cloud Storage bucket.
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 or to . 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.