Compute Engine lets you create and run virtual machines on Google infrastructure.
There are no upfront investments and you can run thousands of
virtual CPUs on a system that is designed to be fast and to offer consistent performance.
You can create a virtual machine instance by using
the Google cloud platform console or the gcloud command line tool.
Your VM can run Linux and Windows Server images
provided by Google or customized versions of these images.
And you can even import Images from many of your physical servers.
When you create a VM, pick a machine type which
determines how much memory and how many virtual CPUs it has.
These types range from very small to very large indeed.
And if you can't find a predefined type that meets your needs perfectly,
you can make a custom VM.
Speaking of processing power,
If you have workloads like machine learning and data
processing that can take advantage of GPUs,
many GCPUs on [inaudible] have GPUs available for you.
Just like physical computers need disks, so do VMs.
You can choose two kinds of persistent storage, standard or SSD.
If your application needs high performance scratch space,
you can attach a local SSD.
But be sure to store data of permanent value somewhere else
because local SSD's content doesn't last past when the VM terminates.
That's why the other kinds are called persistent disks.
Anyway, most people start off with standard persistent disks and that's the default.
You also choose a boot image.
GCP offers lots of versions of Linux and Windows ready to go.
And you can import your own images too.
Lots of GCP customers want their VMs to always come up with certain configurations,
like installing software packages on first boot.
It's very common to pass GCP VM startup scripts that do just that.
You can also pass in other kinds of metadata too.
Once your VMs are running,
it's easy to take a durable snapshot of their disks.
You can keep these as backups or use
them when you need to migrate a VM to another region.
Suppose you have a workload that no human being is sitting around waiting to finish,
say, a bash job analyzing a large data set.
You can save money by choosing preemptible VMs to run the job.
A preemptible VM is different from an ordinary compute Engine VM in only one respect.
You've given compute Engine permission to
terminate it if its resources are needed elsewhere.
You can save a lot of money with preemptible VMs.
Although, be sure to make your job able to be stopped and restarted.
You can choose the machine proper use of your instances,
such as the number of virtual CPUs and the amount of memory,
by using a set of predefined machine types or by creating your own custom machine types.
I mentioned a bit ago that you can make very large VMs in compute Engine.
At the time this video was produced,
the maximum number of virtual CPUs in the VM was 96
and the maximum memory size was in beta at 624 gigabytes.
Check the GCP website to see where these maximums are today.
These huge VMs are great for workloads like
in-memory databases and CPU intensive analytics.
But most GCP customers start off with scaling out, not scaling up.
Compute Engine has a feature called auto scaling that lets you add
and take away VMs from your application based on load metrics.
The other part of making that work is balancing the incoming traffic across the VMs.
And Google VPC supports several different kinds of load balancing.
We'll consider those in the next section.