SPEAKER 1: It should be no surprise
that using any cloud resource tends to cost money.
When it comes to managing your Google Cloud costs,
you'll want to be able to understand what your costs are,
put controls in place so you don't overspend,
and then optimize your costs from there.
Let's see how you can understand your Google Cloud costs
and optimize virtual machines running on Compute Engine.
The best way to understand your costs
is to use the billing reports available in the cloud console.
Just use the left navigation to click Billing
and choose your billing account.
Here's a quick summary of your costs.
If you want to drill into further detail,
choose Reports on the left side.
Here, you'll be able to see your costs broken down by project
so you can quickly tell where your costs are coming from.
In addition, you can group costs by product
to see which Google Cloud services are making up
your costs.
And then filter by SKU to see a more detailed breakdown
of your usage.
So that's how you can get a better
understanding of your costs.
Now let's look at some ways to optimize your costs
for Compute Engine.
Compute Engine automatically applies discounts
for running a virtual machine over a sustained period
of time.
These are called sustained use discounts
and don't require any configuration to enable.
You can save up to 30% on a virtual machine running
during a significant portion of the billing month.
If you know that you'll be using resources
over a long period of time, you can save even more
by using committed use discounts.
These are great for static workloads where
you have consistent resource usage, like multiple production
machines.
To see what your usage looks like, head to the Commitments
tab on the left navigation.
Here, you can see how many compute resources you're
using, like VCU cores, RAM, local SSD, or GPUs.
If there's a certain amount you know that you'll always
be running, such as a baseline, you
may want to sign up for commitments for a one or three
year term, which can save you up to 57%.
Here, for example, you can see that this graph is pretty flat.
So there's not a lot of fluctuation in the amount
of resources being consumed.
This would make for a great candidate for purchasing
commitments to save money.
In addition, commitments can be made per project or span
across an entire billing account.
So you can set up the scope that makes the most
sense for your organization.
If you want to ensure that you're
maximizing the commitments you have
and the potential cost savings that you could have,
the committed use discount analysis report
is the best place to start.
If you actually want to purchase a commitment,
head to the compute page and click on Purchase Commitment
to get started.
Coming soon are automatic recommendations
for your committed use discounts based on your historical usage.
Applying these recommendations can provide an easy way
to save on long term usage.
But if you have spiky or dynamic workloads,
there are other ways to save on your costs
that you should consider.
To start, Google Cloud automatically
provides recommendations for machines and disks
that may be idle or underutilized.
In the recommendation column, you
can see suggestions for each VM based on its historic resource
usage, such as adding or removing resources or even
deleting them entirely.
Thanks to the ability to resize your VMs to custom machine
sizes, you can fine tune your workloads
to be exactly the right size and not pay for any resources
that you're not using.
If your machines are already the right size,
but there are times when you don't need them,
you can also stop the instances to save money.
When a VM is stopped, you don't pay for the Cores or RAM
running.
For example, you may be running a test environment
that you don't need outside of core business hours.
So it can be shut off.
You can even use some quick Cloud Functions code and Cloud
Scheduler to turn your VMs on and off automatically
when you do or don't need them.
Depending on the type of workload you're running,
you may also benefit from using different types of instances
and pre-emptable VMs.
The newer generation of E2 general purpose machines
can give you similar performance to the N1 series
while also saving you money.
In addition, memory optimized and compute
optimized instances may be better fits for your machines,
letting you focus in on exactly those resources that you need.
Leveraging pre-emptable instances
is a great way to run stateless workloads that aren't time
sensitive, like genomics or media transcoding.
They have a maximum uptime of up to 24 hours
before they're deleted, but they're 80% cheaper.
You can choose pre-emptable when making a new compute instance,
but you'll likely want to automate this
by spinning up new pre-emptable machines when you need them.
Every workload is different.
So it's important to understand what your resource uses looks
like and which tools you can use to optimize your costs based
on your unique needs.
Start with the billing reports to understand your costs.
And then see which of these recommendations
works best for you.
Check out this link to see videos and documentation
about more ways to manage and optimize your costs.