(bright musical jingle)
- Up next, if you're an existing Azure customer
and want to save money now, in the next few minutes,
we'll share top tips for how you can do more with less
as you run your workloads in Azure,
using free tools and plans available to you,
including cost-cutting by identifying unnecessary spend
in Azure Advisor,
taking advantage of new commitment-based savings plans
based on your expected utilization,
employing cost avoidance tactics such as setting budgets
and monitoring with Microsoft Cost Management,
and containing your spend
through new automation options and much more,
and joining us today to take us through everything
is Azure expert, Matt McSpirit.
Welcome back to the show.
- Always a pleasure. Thanks for having me.
- Likewise.
So, now, today's show is part of a two-part series
where we start by helping you look for
ways to save money right now in Azure.
Now, we'll follow that with a second show
on tips for workload strategies
to achieve ongoing efficiency and also growth.
So, let's get right into this, Matt.
So where should we look today first
as we start to identify workloads
where we can save in Azure?
- Well, the advantage of the cloud is
you pay for what you use,
and costs are tied to compute and storage,
along with the underlying software licensing fees,
and there are powerful ways
to save on all of these cost factors.
So I've got two important tips here right out of the gate.
Firstly, software licensing can make up to
30 to 40% of your cloud bill,
and I cannot stress this enough,
if you aren't already doing so, when you provision your VMs,
take advantage of Azure Hybrid Benefit,
which lets you reuse
existing and even future software licenses
in return for 40% savings or more.
Now, license portability includes bringing over
your RedHat Enterprise Linux and SUSE licenses to Azure,
as well as your Windows and SQL Server licenses for reuse
across your VMs in Azure
or Azure SQL Database PaaS services.
So, here, for example, I've got a D-series VM
with four cores and 14 gigs of RAM,
and as soon as I apply the Azure Hybrid Benefit,
the average cost per month is reduced by 45%,
and there are many other scenarios
supported by the Azure Hybrid Benefit, including the use of
the Azure Kubernetes Service
and Azure Stack HCI on-premises.
Additionally, you can get
unlimited Windows Server virtualization rights
to run on Azure Dedicated Host or on Azure Stack HCI,
and you can learn more about this at aka.ms/HybridBenefit.
Second, if you have database workloads
running in virtual machines that aren't CPU-intensive,
you can save significant costs on compute and licensing
by using constrained vCPU-capable VMs.
Now, notice here, I've got three E16 ADS VMs highlighted
with 16 cores, 8 cores, and 4 cores.
The cost of compute is around $923
regardless of the core count.
Now, let's move over to the pricing calculator.
If you look at the same VM with 16 cores first,
you'll see that SQL licensing
adds almost $4,400 per month to the total cost,
and if I choose
the constrained four-core version of the same VM,
my licensing costs are reduced to around $1,100,
and I still have the same IOPS, and memory, and storage,
and that's because SQL is licensed by cores.
So, the less cores you have, the less you pay,
and the good news is you can switch between sizes in Azure
without having to rebuild your instance.
- And that's really a great example
in terms of right-sizing your resource consumption
based on what you actually need.
Of course, consumption-related costs
account for about 60 to 70% of your cloud bills.
So what can we do there?
- So this is where knowing your resource consumption
for specific workloads is key.
Now, not only will this help you
stop wasting money on underutilized resources,
but knowing your average consumption
can help you to take advantage of
commitment-based pricing plans
that give you significant discounts
in return to an agreed amount of spend in Azure.
Now, a great starting point for this visibility,
that I recommend for everybody, is Azure Advisor.
So it's available to you for free in the Azure Portal,
and it gives you
an automated assessment of your Azure tenant
with tailored recommendations across multiple areas,
as you can see here.
So, it defaults to the cost category,
and there's a percentage score,
which is an indicator of how well I'm acting on
the recommendations generated for me.
Now, importantly, down the page,
I can see recommendations to save costs.
So, here, for example, I can see that
I've got VMs that are underutilized
and there's a recommendation to right-size them
along with the potential yearly savings if I do.
Now, right-sizing your VMs is an important consideration
as you look at ways to save
based on an agreed level of committed spend in Azure.
Now, notice that among the top recommendations
in the cost score view
is to take advantage of an Azure savings plan.
Now, if we dig in to see the recommendation details,
you'll see it's assessed
your compute usage over the last 30 days,
and with the savings plan,
select compute services are unlocked
when you commit to spending a fixed hourly amount.
Now, if you go above that,
you're billed at regular pay-as-you-go prices.
So you can save up to 65%
compared to pay-as-you-go prices on many compute services,
and the greatest savings, of course,
come with a three-year term.
- And these savings plans, they're relatively new,
so why don't we go over the difference
between savings plans and reserved instances
that you might use for compute?
- Well, both give you discounts
based on level of commitment to Azure.
Savings plans for compute give you more flexibility
if your resource consumption changes
as you can shift to pay-as-you-go pricing
when you exceed your average committed consumption.
Reserved instances, on the other hand,
are for stable, predictable workloads,
but for the right workload, there's a bigger discount,
so you can save up to 80% of the cost of compute.
So the good news is you can use
reserved instances and Azure savings plans together,
so that whatever compute isn't covered by reserved instances
is covered by your savings plan.
- And these are all really good levers,
and big levers, actually, for capping unnecessary spend,
so how can you more proactively, then, drive cost avoidance?
- Well, there are a number of things that we can do here.
So, firstly, I recommend setting up
an alert for the cost category
to get up-to-date notifications from Azure Advisor
on new potential actions for you to take,
and, by the way, a study by Forrester Research
that looked at the total economic impact
concluded that you can save up to 20%
by acting on Azure Advisor recommendations.
Now, that said, Microsoft Cost Management
gives you the best granular visibility
into accumulative spend
across your workloads and related resources,
and it's also free.
Now, to access it, you just open the Azure portal
and search for cost, select Cost Management + Billing.
From the overview, go to cost analysis,
and this gives you a bird's eye view of
actual costs and forecasted spend.
It's easy to gauge your spending patterns
and any anomalies if you have them,
so it's a critical resource for
understanding, monitoring, and forecasting your cloud costs.
Now, from a cost avoidance perspective,
one of the most important things you can do
is to set budgets,
which can be for an account or department cost center,
or against a specific resource type, subscription, and more.
So, for example, here, I've got a cumulative spend view
at a subscription level, and the red line indicates
where I'm likely to exceed budget.
Now, when you set a budget,
you can specify up to five thresholds
to alert you to different levels of utilization.
For example, I've got a budget that I've started here,
and as a best practice,
I've set up alerts at 50%, 75%, and 100%,
and I've specified that I want an email notification
when my thresholds are met.
Additionally, and importantly, for any of these alerts,
I can assign a specific action group
that will trigger specific actions
to be taken at either a subscription or resource group level
when the budget threshold is reached.
So I've decided to trigger a VM shutdown when we hit 100%.
Now, the actions taken by the action groups
are easy to define,
so you can select from any number of action types
to trigger or take action.
Here, we're selecting to use an automation runbook,
and, from there, I can choose the runbook I want,
in this case, "Stop VM," and that's going to trigger
when I hit my specified budget threshold,
and if you want to learn more about
enforcing budget caps through automation,
you can see our sample scripts at aka.ms/ACMrunbook.
- Automation is probably one of the most impactful things
that you can do to keep costs down in the first place.
- Yeah, it is, and there are quite a few levers
that we can pull here.
There are lots of automation runbooks that you can use.
One of the most popular is
to start and stop VMs on a schedule,
which can be good, for example,
for resources like DevTest VMs
where all virtual machines with a DevTest tag
are automatically shut down after working hours.
Then another good automation area
is to manage desktop virtualization.
So, in Azure Virtual Desktop,
you can gain a lot of efficiency
by using its built-in depth-first load balancing algorithm.
Now, this works by only provisioning new hosts
as existing hosts reach their utilization limit.
- I really like that example,
because automating load balancing and also auto-scale
can make sure that you aren't
unnecessarily over-provisioning resources,
which is an area where, you know,
Azure VM Scale Sets can really make a big difference too.
- Right, Azure VM Scale Sets are great for
creating and managing a group of load balanced VMs.
They automatically load balance
the number of VM instances and work
by increasing or decreasing VMs
in response to demand or a defined schedule.
Now, I'm glad you mentioned them,
because there are some new options
with Virtual Machine Scale Sets
to more precisely predict the scale-out compute you need
and even specific VM types to keep your costs down,
starting with a new capability called predictive autoscale
that lets you take advantage of machine learning
to anticipate when autoscaling is required
so that the scale-out occurs precisely when needed
based on patterns it sees in trending data
from the past seven days or more.
Now, this works especially well for workloads
that have periodic spikes.
Once the system predicts that the percentage CPU load
of your Virtual Machine Scale Set will spike,
new instances are added based on
the minimum and maximum instances set for your VM Scale Set.
Now, you can also configure how far in advance
you want new instances to be provisioned, up to one hour
before the predicted workload spike will occur.
So this capability can also be set to
forecasting your load balancing needs
where you don't necessarily want to trigger
a scaling action based on the prediction,
but want the forecasting insights.
So, here, for example, the top chart shows
an overlaid comparison of
actual versus predicted total CPU percentage.
You can view charts from 12 hours
to as far back as seven days,
and you can also enable predictive autoscale from here
once you're confident in the forecasting model.
Now, second, and importantly, something I think is
a bit of a game changer for VM Scale Sets
is the ability under flexible orchestration
to now configure the percentage allocation
for the number of standard VMs
that need to be running at any given time,
along with the percentage of Spot VMs in the same scale set,
and, from there, the system will apply that mix
during the scale-out, and, of course,
the great thing about mixing and matching
standard VMs and Spot VMs
is that you can take advantage of
the best pricing in Azure when you need more compute.
- That's a super useful tip, and, by the way,
if you're new and not familiar with Spot VMs,
these are really great for workloads
that can handle interruptions
like maybe batch processing jobs,
and these allow you to really take advantage of
capacity that's in Azure at lower prices,
and then when Azure needs that capacity back,
it will evict those Spot VMs,
and, in return, you benefit from significant cost savings.
So, so far, you've really focused on immediate ways
that we can reduce our compute and licensing spend.
What quick wins, then, are there
in terms of managing the cost of storage?
- So, Azure offers multiple storage options
and a variety of access tiers for blob storage,
like hot, which is immediately accessible,
followed by cool, for data that's less readily available,
and there's also archive to store your rarely accessed data.
Now, matching storage types to your requirements
can help save considerable costs,
hot being the most expensive,
but now in terms of quick wins, there's a brand new option.
Now, it used to be that,
the larger your disk storage capacity,
the more performance potential would come with it.
So, for example, let's say your app needs 5,000 IOPS.
Now, in this case, you'd need to purchase and provision
one terabyte of capacity.
Azure disk storage premium SSD V2 changes all of that
by decoupling storage capacity
from your performance requirements for your data disk,
which means you don't have to provision large disk sizes
to get the performance you need.
Now, here's where it gets interesting.
You always get included a baseline performance of
3,000 IOPS and 125 megabytes per second,
and you can configure
the maximum IOPS and throughput that you want
so that you aren't paying for performance
that you don't need.
So, here, I'll configure my disk size
at 10 gigabytes and 5,000 IOPS as before,
and keep my throughput at 200 megabytes per second,
and to put this into context,
take a look at the impact on price performance.
So, you'll see, in this case, I've saved around 90%.
- And all of these costs avoidance tips
really manage consumption costs
along with license portability and Azure Hybrid Benefit
and commitment-based savings plan.
All of this, kind of in aggregate together,
is really going to add up.
- That's right, and there's one more thing
on my list of quick wins for cost avoidance.
Inherent to both cost management and automation actions
is the use of tags.
Tags can be assigned at
the level of your subscriptions, resource groups,
and all the way down to specific resources,
and while you can add tags to
existing subscriptions and resources,
the most effective way of instrumenting them
is to set policies to ensure that
they're tagged at the time of deployment.
So, here in Azure policy, for example,
there are multiple pre-built policies that can help you
to tag your subscriptions, resource groups, and resources,
and, by the way, you can learn more about
best practices for tagging at aka.ms/costmgmt/videos.
- And these are all really a great set of tips
and a great overview of all the things that you can do
to do more with less and save money right now in Azure.
So, where can everyone watching learn more?
- Well, I mentioned a number of resources
available to you for free.
The two key ones are
Azure Advisor and Microsoft Cost Management
in the Azure Portal, so please check those out,
and more guidance can be found at aka.ms/Azure-DMWL.
- Thanks, Matt.
I'm looking forward to inviting you back
for part two in our series, where we're going to explore
how you can do more with less
and look at tips on workload strategies
for ongoing efficiency and growth in Azure.
Of course, keep checking back to Microsoft Mechanics
for all the latest tech updates.
Subscribe to our channel if you haven't already,
and, as always, thank you for watching.
(bright musical jingle)