Nothing Special   »   [go: up one dir, main page]

CH Ebook ReducingSpendAzure

Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

10 Best Practices

for Reducing Spend


in Azure
INTRODUCTION

When cloud computing services were introduced in the mid-2000s with


compute and storage offered for pennies on the dollar, the world of IT
changed forever. While prices have come down significantly over the
years, many companies learned the hard way that moving to the public
cloud didn’t always achieve the cost savings they expected.

In fact, organizations have frequently noticed public cloud bills that are

“ Infrequently
fact, organizations have
noticed public cloud
two to three times higher than expectations.1 This doesn’t mean that
moving to the public cloud is a mistake. The public cloud provides huge
benefits in agility, responsiveness, simplified operations, and improved
bills that are two to three times


innovation. The mistake is assuming that migrating to the public cloud
higher than expectations.
without implementing management, governance and automation will lead
to cost savings.

The first step to combating rising Microsoft Azure costs is to gain visibility
across your entire organization’s cloud spend. Once you’ve identified the
areas of high and/or rapidly growing costs, use these proven best prac-
tices for cost reduction and optimization to make sure you are getting the
most out of your cloud investment.

(1) Gartner, Innovation Insight for Dynamic Optimization Technology for Infrastructure
Resources and Cloud Services, Donna Scott and Milind Govekar, 29 February 2016

© 2 0 1 8 C L O U D H E A LT H ® T E C H N O L O G I E S I N C . 2
1 DELETE UNATTACHED
DISK STORAGE

It’s common to see thousands of dollars in unattached Disk Storage (Page


Blobs) within Azure accounts. These are volumes that are costing money
but aren’t being used for anything.

When a Virtual Machine (VM) is launched, Disk Storage is usually attached


to act as the local block storage for the application. However, when you
terminate a VM, the Disk Storage remains active, and Microsoft will con-

“ However, when you terminate a


VM, the Disk Storage remains
tinue to charge the full price of the disk, despite the fact that the data is
not in use.
active, and Microsoft will
continue to charge the full price Because of the dynamic nature of cloud computing, it’s easy for users
of the disk, despite the fact that to quickly spin up and spin down workloads, but that means the risk of

the data is not in use.
leaving behind unattached storage is high. By continuously checking for
unattached Disk Storage in your infrastructure, you can cut thousands of
dollars from your monthly Azure bill.

PROTIP
Delete Disk Storage when it has been unattached for two
weeks, as it is unlikely the same storage will be utilized again.

© 2 0 1 8 C L O U D H E A LT H ® T E C H N O L O G I E S I N C . 3
2 DELETE AGED
SNAPSHOTS

Many organizations use Snapshots on Blob and Disk Storage to create


point-in-time recovery points to use in case of data loss or disaster.
However, Snapshot costs can quickly get out of control if not closely
monitored. Individual Snapshots are not costly, but the cost can grow
quickly when several are provisioned.

A compounding factor on this issue is that users can configure settings


to automatically create subsequent snapshots on a daily basis, without
scheduling older snapshots for deletion. Organizations can help get
Snapshots back under control by monitoring snapshot cost and usage per
VM to make sure they do not spike out of control.

One B2B SaaS company found that among its millions of snapshots, a large
percentage of them were more than two years old, making them good
candidates for deletion.

PROTIP
Set a standard in your organization for how many snapshots
should be retained per object. Remember that the majority of
the time, a recovery will occur from the most recent snapshot.

© 2 0 1 8 C L O U D H E A LT H ® T E C H N O L O G I E S I N C . 4
3 TERMINATE
ZOMBIE ASSETS

Zombie assets are infrastructure components that are running in your


cloud environment but not being used for any purpose. For example, they
could be VMs that were once used for a particular purpose, but are no
longer in use and have not been turned off. Zombie VMs also can occur
when VMs fail during the launch process or because of errors in script that
fail to deprovision VMs. Additionally, zombie assets can also come in the
form of idle Load Balancers that aren’t being used effectively, or an idle
PROTIP SQL Database.

Start your zombie hunt by identifying


No matter the cause, Microsoft will charge for them as long as these
VMs that have a Max CPU <5% over the
past 30 days. This doesn’t automatically assets are in a running state. They must be isolated, evaluated, and
mean this VM is a zombie, but it’s worth immediately terminated if deemed nonessential. Take a backup of the
investigating further. asset before terminating or stopping it to ensure you can recover it if the
asset is needed again.

One customer had a nightly process to help its engineering velocity —


loading an anonymized production database into a cloud database to use
for testing and verification in a safe environment. The process worked
well and saved lots of time for engineers. However, while the automation
was good at spinning up new environments, the customer never made a
plan for cleanup. Each night a new database VM was spun up, with the
attached resources, and then was abandoned, eventually leaving hundreds
of zombie resources.

© 2 0 1 8 C L O U D H E A LT H ® T E C H N O L O G I E S I N C . 5
4 UPGRADE VMS TO THE
LATEST GENERATION

In 2014, Microsoft introduced the next generation of Azure deployment,


called Azure Resource Manager (ARM), or sometimes v2. This update
gives you access to additional functionality like resource grouping,
advanced tagging, role-based access control, and templates. While the
prices for ARM and Azure Classic (Azure v1) are the same, the
management improvements can drive significant time savings.

For example, using ARM, you can easily batch deploy new VMs from a
JSON template, rather than deploying them one at a time. You can tag
assets to more easily view them by line of business.

In addition to upgrading to ARM for improved management, for some VM


types there is the option to upgrade to the latest version. While the new
versions of Azure VMs have the same price points, they come with
performance improvements that may enable you to run fewer VMs.

For example, upgrading a D-series VM gives you 35% faster processing


and greater scalability for the same price point.

PROTIP
Migrating from Azure Classic to ARM is a win-win for most
customers. It not only provides performance advantages, but
also access to additional features and better manageability. The
process does not need to be a “big bang.” Since both Classic and
ARM assets can now be managed in the same console, you can
migrate workloads at your own pace.

© 2 0 1 8 C L O U D H E A LT H ® T E C H N O L O G I E S I N C . 6
5 RIGHTSIZE VIRTUAL
MACHINES

Rightsizing an Infrastructure as a Service (IaaS) offering such as VMs is


the cost reduction initiative with the potential for the biggest impact. It’s
common for developers to spin up new VMs that are substantially larger
than necessary.

This may be intentional, to give themselves extra headroom, or accidental


since they don’t know the performance requirements of the new workload
yet. Over-provisioning a VM can lead to exponentially higher costs.
Without performance monitoring or cloud management tools, it’s hard to
tell when assets are over- or under-provisioned.

It’s important to consider CPU, memory, disk, and network in/out


utilization. Reviewing these trended metrics overtime, you can make
decisions around reducing the size of the VM without hurting the perfor-
mance of the applications on the VM. Because it’s common for VMs to be
underutilized, you can reduce costs by assuring that all VMs are the right
size.

PROTIP
A good starting place for rightsizing is to look for VMs that have an Avg
CPU < 5% and Max CPU < 20% for 30 days. VMs that fit this criteria are
viable candidates for rightsizing or termination.

© 2 0 1 8 C L O U D H E A LT H ® T E C H N O L O G I E S I N C . 7
6 RIGHTSIZE
DISK STORAGE

Similar to VMs, Disk Storage can also be rightsized. Instead of looking at


the dimension of CPU, memory, disk and network, the critical factors to
consider with Disk Storage are capacity, IOPS, and throughput. As dis-
cussed earlier, removing unattached disks is one way to reduce the cost
associated with Disk Storage.

Another approach is to evaluate which disks are over-provisioned and can

“ The price difference between


standard and premium disks
be modified for potential cost savings.

can be as high as 3x, so it Microsoft offers two types of storage that VMs can leverage: a standard
behooves you to pick the right storage performance tier, which can be purchased in three different levels
storage for each workload.
” of redundancy, and a premium storage performance tier, which is offered
in three different sizes. The price difference between standard and premi-
um disks can be as high as 3x, so it behooves you to pick the right storage
for each workload.

PROTIP
Premium storage is billed based on the total disk size, regardless of
consumption. For example, if you attach an empty Premium P20 512GB
disk to a VM, you will be charged for the full 512GB per month,
regardless of use. Keep a close eye on utilization of Premium storage to
minimize wasted cost.

© 2 0 1 8 C L O U D H E A LT H ® T E C H N O L O G I E S I N C . 8
7 RIGHTSIZE
SQL DATABASES

Similar to rightsizing your IaaS, Azure customers also need to rightsize


their platform-as-a-service (PaaS). Azure SQL Database is a PaaS offering
that is used by many developers to manage their applications.

It’s important to evaluate how well your SQL Databases are being utilized
in terms of the workloads you are running on them. The critical factors to
take into consideration are Database Transaction Units (DTU), Database
Microsoft recently announced Size, and Capacity.
the preview of a virtual core
(vCore) based purchasing
model, which lets you choose
SQL Databases are purchased through a DTU-based model, which is a
the choose the number of
blend of compute, memory, and IO resources. There are three service
vCores, the amount or memory,
and the amount and speed of tiers, Basic, Standard, and Premium. The Basic tier is used primarily for
storage. development and testing. The Standard tier is suitable for applications that
service more than one user at a time. The Premium tier is for applications
with a high-performance level and many simultaneous requests. Naturally,
there is a price difference within the three tiers, and the database sizes
within those tiers.

As a best practice, you should rightsize to the lowest cost SQL Database
that meets your performance requirements.

PROTIP
Commonly you will not need to rightsize Basic SQL Databases
because they are already offered at a low price and are
mainly used for development or testing.

© 2 0 1 8 C L O U D H E A LT H ® T E C H N O L O G I E S I N C . 9
8 STOP AND START
VMS ON A SCHEDULE

As previously highlighted, Azure will bill for a VM as long as a VM is


running. Inversely, if a VM is in a stopped state, there is no charge
associated to that VM. For VMs that are running 24/7, Microsoft will bill
for 672 to 744 hours per VM, depending on the month. If a VM is turned off
between 5pm and 9am on weekdays and stopped weekends and holidays,
then total billable hours per month would range from 152 to 184 hours per
VM, saving you 488 to 592 VM hours per month.

This is an extreme example, as having flexible workweeks and global


teams means that you can’t just power down VMs outside normal working
hours. However, outside of production, you’ll likely find many VMs that do
not need to truly run 24/7/365.

The most cost-efficient environments dynamically stop and start VMs


based on a set schedule. Each cluster of VMs can be treated a different
way.

PROTIP
Set a target for weekly hours that non-production systems
should run. One large publishing company set that target at
less than 80 hours per week, which is saving them thousands
of dollars a month.

© 2 0 1 8 C L O U D H E A LT H ® T E C H N O L O G I E S I N C . 10
9 BUY RESERVED VIRTUAL
MACHINE INSTANCES
AND OPTIMIZE

Purchasing Microsoft’s Azure Reserved Virtual Machine (VM) Instances is


an extremely effective cost saving technique.

Azure Reserved VM Instances allow you to make a 1 or 3 year upfront


commitment to Microsoft to utilize specific virtual machine instance
types. In return, you get a discount on your compute costs and prioritized
capacity. Reservations can save you up to 72% compared to pay-as-you-
go pricing, so they’re a no-brainer for any company with sustained virtual
machine usage.

PROTIP
One common misconception around RIs is that they cannot be modified.
Microsoft allows you to achieve a greater
cost savings (up to 82%) by leveraging This is not true! Microsoft allows customers to modify reservations in the
Reserved VM Instances combined with the following ways:
Azure Hybrid Benefit. The Azure Hybrid • Changing the Scope from Single Subscription to Shared, or vice versa.
Benefit covers the cost of the Windows OS
• Exchanging Reserved VM Instances across any region and series.
on up to two virtual machines per licence,
so you only have to pay for the base • Cancelling your Reserved VM Instances at any time for an adjusted
compute costs. refund.

It’s critical to not only purchase reservations but also continuously modify
them to get the most value. If a reservation is idle or underutilized,
modification means the Reserved VM Instance can cover on-demand
usage to a greater degree. This ensures that the reservations are operating
as efficiently as possible and that savings opportunities are being
maximized.

© 2 0 1 8 C L O U D H E A LT H ® T E C H N O L O G I E S I N C . 11
10 MOVE OBJECT DATA
TO LOWER-COST
TIERS

Microsoft offers several tiers of Storage at different price points and per-
formance levels.

The best practice is to move data between the tiers of storage depending
on its usage. There are two dials you can adjust when it comes to Azure
storage: redundancy (how many copies are stored across how many
locations), and access tier (how often data is accessed).

Microsoft allows customers to mix and match across four redundancy


options and three access tier options to create the right solution.
For example, Cold Locally Redundant Storage (LRS) is ideal for long term
storage, backups, and disaster recovery content, while Cold
Geographically Redundant Storage (GRS) is best suited for archival.

A best practice is that any objects residing in a Hot tier that are older than
30 days should be converted to a Cool tier. Depending on redundancy
levels, the Hot tier is based on the amount of content stored starting at
$0.0184 per GB per month, the Cool tier prices are a flat price of $0.01 per
GB per month, and the Archive tier is available at an even lower price of
$0.002 per GB per month.

PROTIP
A best practice is that any objects residing in a Hot tier that
are older than 30 days should be converted to a Cool tier.

© 2 0 1 8 C L O U D H E A LT H ® T E C H N O L O G I E S I N C . 12
CONCLUSION
It’s important to remember that these best practices are not meant to be
one-time activities, but ongoing processes. Because of the dynamic and
ever changing nature of the cloud, cost optimization activities should
ideally take place continuously.

Learn more about how CloudHealth can help you


continuously optimize your Azure cloud environment
by visiting www.cloudhealthtech.com.

You might also like