A VM is a digital computer that can be run on any hardware – laptop, server or in the cloud. VMs are also offered by cloud providers. This means that you can set up and run on-demand any instance that, on a physical level, is installed on the provider’s server. In Google Cloud, the virtual machine service is Compute Engine.
What is Google Compute Engine?
Compute Engine is a VMs platform in the infrastructure as a service model. IaaS means that the hardware belongs to the service provider, but you can use the virtual resources. It is an online infrastructure – without the need to build your own server room and operate physical infrastructure.
What can you use Google Compute Engine for? Among other things, for:
- hosting your website files,
- hosting your application or its backend,
- as a mobile games server,
- hosting a real-time bidding system,
- Hadoop batch processing,
- multimedia rendering,
- video transcoding,
- running financial simulations,
- conducting genetic simulations (e.g. DNA sequencing),
- training machine learning or artificial intelligence models.
We can do virtually everything on cloud machines that we can do on our own physical devices. And in fact… even more, thanks to access to machines of various, even very high specifications.
Types of virtual machines in Google Compute Engine
Google divides virtual machine types into four main categories:
- General purpose machines with a reasonable price/performance ratio. They are suitable for typical workloads such as databases, development and test environments, web applications or mobile games. Those are machines from the E2, N2, N2D, N1 and Tau T2D families.
- Ultra-high memory machines. They offer the highest level of memory configuration – up to 12 TB per instance. They are designed to support memory-intensive workloads, such as SAP HANA databases or running in-memory analytics. They are machines designated as M2 and M1.
Compute-optimised. These instances provide the highest performance per core and can be used for high-performance computing jobs and as game servers or low-latency API servers. These are machines from the C2 family.
- Accelerator-optimised machines that are designed for the heaviest workloads, such as machine learning and high-performance computing. They use the NVIDIA® Ampere A100 Tensor Core GPU, which has tens of times the computing performance of a typical CPU. They are machines with the symbol A2.
The available instances are pre-configured, so you don’t spend much time setting their parameters. However, you have various configuration options, such as changing the CPU level, adding a GPU or TPU, increasing or decreasing memory, and selecting disks or operating systems.
Cost of the service
In Compute Engine, as in other cloud services, billing is based on the consumption level. In the case of the GCE virtual machine platform, costs are charged on a per-second basis. The final price depends not only on the machine’s operating time but also on its specifications, disk type or network usage level. The expected cost of using the service can be calculated in the calculator on the Google Cloud website.
Compute Engine discounts
Google Cloud offers monthly renewable limits on using certain cloud services – the Free Tier. These include Compute Engine:
- with an e2-micro machine in the us-west1 (Oregon), us-central1 (Iowa) and us-east1 (Soutch Carolina) regions,
- a 30 GB storage space per month per instance,
- 5 GB of storage space per month for snapshots in the us-west1 (Oregon), us-central1 (Iowa), us-east1 (South Carolina), asia-east1 (Taiwan) and europe-west1 (Belgium) regions,
- and 1 GB of outbound traffic (egress) per month from regions in North America to all destinations, excluding China and Australia.
Commitment use discount is another way to reduce the cost of using the computing power and memory of Google Cloud VMs. It works very well for projects that use the cloud service for an extended period.
The discount is based on a commitment to a fixed monthly use of resources. The amount of discount received depends on several factors:
- the duration of the commitment (one or three years),
- the selected machine family,
- the indicated amount of monthly vCPU and RAM consumption,
- disk space,
- or the region in which the service is launched.
The discount can be up to 70% for memory-optimised machines and 57% for other virtual machines.
Sustained use discounts are given automatically; the longer the machines run continuously during the month, the higher the discount. When resources are in use for more than 1/4 of a month, Compute Engine allocates a discount for every minute an instance is running – up to 30% for N1 machines and up to 20% for N2 machines. The SUD discount does not apply to E2 and A2 machines.