Azure Low Priority VMs and Spot VMs for Cost Savings

Azure Low Priority VMs and Spot VMs for Cost Savings

Among the many ways to purchase and consume Azure resources are Azure low priority VMs and Spot VMs. These virtual machines are compute instances allocated from spare capacity, offered at a highly discounted rate compared to “on demand” VMs. This means they can be a great option for cost savings – for the right workloads. And we love cost savings! Here’s what you need to know about these purchasing options.

How Interruptible VMs Work

The great part about both of these options is the price. Depending on the options selected, you can get a discount of up to 90% compared to the pay-as-you-go price. However, this is in exchange for the possibility that these VMs will be “evicted” when Azure needs the capacity, which makes them suitable for fault-tolerant applications such as batch processing, rendering, testing, some dev/test workloads, containerized applications, etc.

Azure Low Priority VMs 

There are two key things to know about Low Priority VMs. The first is that they are only available through Azure Batch, Azure’s tool for running large-scale parallel and high-performance computing jobs through a pool of compute nodes (VMs). Through Azure Batch, you can run jobs and tasks across compute pools called “batch pools”. Since batch jobs consist of discrete tasks run using multiple VMs, they are a good fit to take advantage of low priority VMs.

Note that prior to February 2020, Low Priority VMs were available in Azure Scale Sets, but that option has been discontinued, with Spot VMs now available in Azure Scale Sets instead.

The second highlight is that Low Priority VM pricing is at a fixed discount of 60-80% compared to pay-as-you-go. 

Azure Spot VMs 

As of May 2020, Azure offers Spot instances/VMs in addition to Low Priority VMs. Like Low Priority, the Spot option allows you to purchase spare capacity at a deeply discounted price in exchange for the possibility that your VM may be evicted. You can choose whether or not to have a cap on the price you’re willing to pay for Spot VMs. Unlike Low Priority, you can use the Azure Spot option for single VMs and scale sets. VM scale sets scale up to meet demand, and when used with Spot VMs, will only allocate when capacity is available. 

Your Spot VMs can be evicted when Azure needs the capacity, or when the price goes above your maximum price. You can choose to get a 30-second eviction notice and attempt to redeploy. 

The other key difference is that Azure Spot pricing is variable, and based on the capacity for size or SKU in an Azure region. Prices change slowly to provide stabilization. The price will never go above pay-as-you-go rates.

When it comes to eviction, you have two policy options to choose between:

  • Stop/Deallocate (default) – when evicted, the VM is deallocated, but you keep (and pay for) underlying disks. This is ideal for cases where the state is stored on disks.
  • Delete – when evicted, the VM and underlying disks are deleted. 

For more information about the difference between the “Deallocate” and “Stop” states, please see this article.

Azure Low Priority VMs vs. Azure Spot VMs

While similar in idea, there are a few key differences between these two purchasing options:

Low Priority Spot
Availability Azure Batch  Single VMs, VM scale sets
Pricing Fixed pricing Variable pricing; ability to set maximum price
Eviction/Preemption Preempted when Azure needs the capacity. Tasks on preempted node VMs are requeued and run again. Evicted when Azure needs the capacity or if the price exceeds your maximum. If evicted for price and afterward the price goes below your maximum, the VM will not be automatically restarted.

Azure Extra Capacity Options vs. AWS Spot Instances

So are low priority VMs the same as AWS Spot Instances? In some ways, yes: both options allow you to purchase excess capacity at a discounted rate.

However, there are a few key differences between these options:

  • Fixed vs. variable pricing – AWS spot instances have variable pricing while Azure low priority VMs have a fixed price as listed on the website
  • Integration & flexibility – AWS’s offering is better integrated into their general environment, while Azure offers limited options for low priority VMs (for example, you can’t launch a single instance) with limited integration to other Azure services.
  • Visibility – AWS has broad availability of spot instances as well as a Spot Instance Advisor to help users predict availability and interruptibility. On the other hand, Azure has lower visibility into the available capacity, so it’s hard to predict if/when your workloads will run.

Should You Use Azure Low Priority VMs?

If you have fault-tolerant batch processing jobs, then yes, low priority VMs are worth a try to see if they work well for you. If you’ve used these VMs, we’re curious to hear your feedback. Have you had issues with availability? Does the lack of integrations cause any problems for you? Are you happy with the cost savings you’re getting? Let us know in the comments below.

Related reading:

How to Use an AWS EDP for Discounted Cloud Resources

How to Use an AWS EDP for Discounted Cloud Resources

Lately, many of our AWS customers (especially those purchasing through the AWS marketplace) have mentioned that they are using an AWS EDP, which stands for Amazon Web Services Enterprise Discount Program. Essentially, this is AWS’s way to provide enterprises a discount off its services based on a volume (consumption) commitment. In the most recent Flexera State of the Cloud Report, 37% of respondents using AWS reported using an EDP. 

How does an AWS EDP work?

A simple example of how an AWS EDP or “AWS Enterprise Agreement” might work is as follows: for the next 3 years, you commit to spend $5MM on AWS services, and receive a 13% discount. Even if you don’t spend $5MM you would still owe them $5MM, and of course if you go over you would get billed for the overage. Of course, the terms and amounts are all up to negotiation with AWS.

AWS’s website does not provide a lot of information about these agreements, which is perhaps to be expected considering they will customize the terms for any given customer. Here’s what they say:  “Customers also have the option to enroll in an Enterprise Agreement with AWS. Enterprise Agreements give customers the option to tailor agreements that best suit their needs. For additional information on Enterprise Agreements please contact your sales representative.”

There are a few things you should consider about the EDP contract terms you agree upon with AWS. For example, the agreement may be limited to certain accounts, services, and/or regions.

You’ll see big numbers in the news, such as Apple’s $30 million monthly on AWS or Pinterest’s $750 million multi-year deal – but even if you’re not a tech giant or a unicorn startup, an Amazon EDP can still be on the table and a way to get an across-the-board discount.

What Other Agreements Compare to an AWS EDP?

Going back to my days at IBM, we used to generally refer to discount contracts as Enterprise License Agreements (ELAs). An ELA is a software site license that is sold to large enterprises. It typically allows for unlimited use of single or multiple software products throughout the organization, although there were often some restrictions and limitations. During my time at IBM, these were sold upfront for a set dollar amount and term, generally 3 to 5 years and usually had a cap on usage, so at some point overages could kick in – which would help with the renegotiation, of course.

Other terms used with a similar concept include Site License, Enterprise Agreement (this is a common Microsoft term – EA), Volume Purchase Agreement (VPA) and All You Can Eat (AYCE). What all of these have in common is that the vendor gets a large revenue/spend commit, and the enterprise gets discounting and flexibility.

How Else can you Get an AWS Discount?

AWS provides enterprises with multiple ways to consume its services based on their business needs and get volume discounts. Traditional on-demand instances allow you to pay for capacity by the hour without any long-term commitments or upfront payments. AWS Savings Plans are a way to save by committing to use at a micro scale: you commit to a certain amount of spend per hour, and in return get a discount on the VMs you’re already running. The less flexible reserved instances are another option for applications with steady-state or predictable usage and can provide up to a 75% discount compared to on-demand pricing. Especially for smaller organizations, there are a number of ways to get AWS credits to ease the burden. And of course they promote scale groups, spot instances, and other optimization efforts to reduce spend and waste but those are more cost control opportunities then they are discounts. Plus, you can always wait for better pricing.

Should You Use an AWS EDP?

Whether you participate in this program is somewhat predicated on your existing partner relationship and amount of spend with AWS, but you can always reach out to your AWS representative. Before committing to an AWS EDP, ensure that you are confident your organization will consume the amount of resources you are committing to. Keep in mind that this can also include the AWS Marketplace. The third party solutions you can buy on the AWS Marketplace also count toward your AWS EDP, and leverage that discount structure — so before completing a third-party transaction, make sure you check the Marketplace to see if the cloud solution you buy is listed there.

9 Free Azure Training Resources

9 Free Azure Training Resources

If you’re looking to tune up your Microsoft Azure knowledge, contemplating a cloud computing career, or want to show value to a potential employer, there’s never been a better time than now to seize the opportunity to learn with a few free Azure training resources.

Whether you’re relatively new to Azure or you’re a pro, there’s always more to learn. Microsoft has been releasing more and more free online resources for all learning paths, experience levels, and learning types to help you do just that, and of course there’s a third-party ecosystem built around it as well. That’s why we compiled a list of our favorite Microsoft Azure training resources on how to learn Azure for free: 

1. Microsoft Azure’s Own Training Resources

The most obvious resource for free Azure training is Microsoft itself. Microsoft does a great job of providing ample free educational material with virtual courses, hands-on training, and documentation for users with a range of experience:  

  • Microsoft Learn Courses provide information on Azure Virtual Machines and virtual networks, PaaS, automation and management, cloud migration, and more. 
  • Get hands-on and learn on the go with an Azure free account. It’s free to sign up and $200 credit is yours to spend in the first 30 days. That’s a month of free exploration to “test and deploy enterprise apps, create custom mobile experiences, and gain insight from your data.”  On top of that, you’ll also get 12 months to use some popular services for free.
  • Microsoft Learn for Azure is a great resource for learning more about Azure or expanding your Azure skills.
  • For those who enjoy some light reading, there’s Microsoft Azure Documentation. Jump in and start learning with quickstarts, samples, and tutorials.

2. Favorite YouTube Channels

If you prefer to actually see steps needed to deploy a particular application or how a new feature works, then videos can make all the difference for visual learners. Some of the most popular channels for Azure free training include:

  • Microsoft Azure (173K subscribers) offers demos, technical insights, and training videos.
  • Cloud Ranger Network  (24.7K subscribers) accompanies a popular blog on all things Microsoft Azure, making it a great resource for supplemented learning with both video and text.
  • Azure DevOps (21.8K subscribers) deserves a nod as a great niche channel for developers looking to make use of Azure’s developers services.

3. GitHub

If you want to go beyond videos and start digging in, hands-on, check out these great collections on GitHub. To learn Azure, check out both the official and unofficial Azure GitHub. It will help you save a lot of time and effort.

4. Blogs

Bloggers offer new insights, ideas, and the latest on all things cloud computing – if you know where to look. CloudRanger.net is solely-focused on Microsoft Azure, along with the previously mentioned YouTube channel. Microsoft has its own Azure blog, of course. But for a more well-rounded blog with additional content on AWS and Google Cloud Platform, check out Cloud Academy.

5. Udemy

Udemy offers several free Azure-focused courses. These freebies range from beginner-level overviews to service-specific outlines, as well as certification preparation. 

6. Pluralsight

Pluralsight is a Microsoft partner that provides an incredible number of Azure courses for free. Pluralsight offers over 200+ courses, 40+ Skill IQs, and 8 Role IQs; aiming to prepare students for specific Azure certification exams.

7. EDx

Founded by Harvard University and MIT, EDx is a massive online course provider. Take advantage of free online university-level courses and be on your way to earning professional certifications. Azure course topics include databases, security, cosmos DB, and more.

8. Social Media

A great way to stay informed with the latest from Microsoft Azure (and of course, free) is by subscribing to its social media channels: Microsoft Azure Facebook and Microsoft Azure Twitter.

9. Meetups

While many meetups are being held virtually right now, they are still a great way to get involved in your local community. Typically, tech meetups have talks delivered by group members and other experts, and with small communities, there’s plenty of opportunities to ask questions, request specific topics, and generally have a more personalized experience than mass-produced online content. Search Azure, Cloud, or Microsoft on meetup.com to see what’s available near you (or, since they’re currently virtual, look further afield). 

Take Advantage of These Free Azure Training Resources

Cloud-based application development is growing at a rapid pace and having Azure skills and experience can help you achieve many goals – free Azure online training is both abundant and rewarding. We picked our top 9 resources for their reliability, quality, and range of information. Whether you’re new to Azure or consider yourself an expert, these resources will get you on the right foot.

Further reading:

Has Azure Chargeback Improved with the New Cost Allocation Capabilities?

Has Azure Chargeback Improved with the New Cost Allocation Capabilities?

Microsoft Azure recently announced an addition designed to help with Azure chargeback: cost allocation, now in preview in Azure Cost Management + Billing. We’re always glad to see cloud providers making an effort to improve their native cost management capabilities for customers, so here’s a quick look at this update.

Chargeback for Cost Accountability

Cost allocation for cloud services is an ongoing challenge. Depending on organizational structure and decisions about billing and budgets, every organization will handle it a bit differently. In some cases, separating by Azure subscription can make this easier, but in others, your organization may have shared costs such as networking or databases that need to be divided by business unit or customer. However, it is an obstacle that must be addressed in order for organizations to gain visibility, address inefficiencies, and climb up the cloud spend optimization curve to actually take action to reduce and optimize costs. 

Many IT organizations address this via an Azure chargeback setup, in which the IT department provisions and delivers services, and each department or group submits internal payment back to IT based on usage. Thus, it becomes an exercise in determining how to tag and define “usage”.

In some cases, showback can be used as an alternative or stepping stone toward chargeback. The content and dollar amounts are the same – but without the accountability driven by chargeback. For this reason, it can be difficult to motivate teams to reduce costs with a showback. We have heard teams using variation on showback – ”shameback”. IT can take the costs they’re showing back and gamify savings, coupled with a public shame/reward mechanism, to drive cost-saving behavior.  

What Azure Added with the Preview Cost Allocation Capabilities

The cost allocation capabilities are currently in preview for Enterprise Agreement (EA) and Microsoft Customer Agreement (MCA) accounts. It allows users to identify the costs that need to be split by subscription, resource group, or tag. Then, you can choose to move them, and allocate in any of the following ways: distribute evenly, distribute proportional to total costs, distribute proportional to either network, compute, or storage costs, or choose a custom distribution percentage. 

Cost allocation does not affect your Azure invoice, and costs must stay within the original billing account. So, Azure did not actually add chargeback, but they did add visualization and reporting tools to facilitate chargeback processes within your organization, outside of Azure.

Improvements in the Right Direction – or Too Little, Too Late? 

Azure and AWS are slowly iterating and improving on their cost visibility, reporting, and management capabilities – but for many customers, it’s too little, too late. The lack of visibility and reporting within the cloud providers’ native offerings is what has led to many of the third-party platforms in the market. We suspect there is still a way to go before customers’ billing and reporting needs are fully met by the CSPs themselves. 

And of course, for organizations with a multi-cloud presence, the cloud costs generally need to be managed separately or via a third-party tool. There are some movements within the CSPs to at least acknowledge that their customers are using multiple providers, particularly on the part of Google Cloud. Azure Cost Management has done so in part as well, with the AWS connector addition to the platform, but it’s unclear whether the 1% charge of managed AWS spend is worth the price – especially when you may be able to pay a similar amount for specialized tools that have more features.

Looking for a Google Cloud Instance Scheduling Solution? As You Wish

Looking for a Google Cloud Instance Scheduling Solution? As You Wish

Like other cloud providers, the Google Cloud Platform (GCP) charges for compute virtual machine instances by the amount of time they are running — which may lead you to search for a Google Cloud instance scheduling solution. If your GCP instances are only busy during or after normal business hours, or only at certain times of the week or month, you can save money by shutting these instances down when they are not being used. So can you set up this scheduling through the Google Cloud console? And if not – what’s the best way to do it?

This post was originally written by Bill Supernor in 2018. I have revised and updated it for 2020.

Why bother scheduling a Google VM to turn off?

As mentioned, depending on your purchasing option, Google Cloud pricing is based on the amount of time an instance is running, charged at a per-second rate. We find that at least 40% of an organization’s cloud resources (and often much more) are for non-production purposes such as development, testing, staging, and QA. These resources are only needed when employees are actively using them for those purposes — so every second that they are left running when not being used is wasted spend. Since non-production VM instances often have predictable workloads, such as a 7 AM to 7 PM work week, 5 days a week, the other 64% of spend is completely wasted. Inconceivable!

The good news is, that means these resources can be scheduled to turn off during nights and weekends to save money. So, let’s take a look at a couple of cloud scheduling options.

Scheduling Option 1: GCP set-scheduling Command

If you were to do a Google search on “google cloud instance scheduling,” hoping to find out how to shut your compute instances down when they are not in use, you would see numerous promising links. The first couple of references appear to discuss how to set instance availability policies and mention a gcloud command line interface for “compute instances set-scheduling”. However, a little digging shows that these interfaces and commands simply describe how to fine-tune what happens when the underlying hardware for your Google virtual machine goes down for maintenance. The options in this case are to migrate the VM to another host (which appears to be a live migration), or to terminate the VM, and if the instance should be restarted if it is terminated. The documentation for the command goes so far as to say that the command is intended to let you set “scheduling options.”  While it is great to have control over these behaviors, I feel I have to paraphrase Inigo Montoya – You keep using that word “scheduling” – I do not think it means what you think it means…

Scheduling Option 2: GCP Compute Task Scheduling

The next thing that looks schedule-like is the GCP Cron Service. This is a highly reliable networked version of the Unix cron service, letting you leverage the Google App Engine service to do all sorts of interesting things. One article describes how to use the Cron Service and Google App Engine to schedule tasks to execute on your Compute Instances. With some App Engine code, you could use this system to start and stop instances as part of regularly recurring task sequences. This could be an excellent technique for controlling instances for scheduled builds, or calculations that happen at the same time of a day/week/month/etc.

While very useful for certain tasks, this technique really lacks flexibility. Google Cloud Cron Service schedules are configured by creating a cron.yaml file inside the app engine application. The GCP Cron Service triggers events in the application, and getting the application to do things like start/stop instances are left as an exercise for the developer. If you need to modify the schedule, you need to go back in and modify the cron.yaml. Also, it can be non-intuitive to build a schedule around your working hours, in that you would need one event for when you want to start an instance, and another when you want to stop it. If you want to set multiple instances to be on different schedules, they would each need to have their own events. This brings us to the final issue, which is that any given application is limited to 20 events for free, up to a maximum of 250 events for a paid application. Those sound like some eel-infested waters.

Scheduling Option 3: ParkMyCloud Google Cloud Instance Scheduling

Google Cloud Platform and ParkMyCloud – mawwage – that dweam within a dweam….

Given the lack of other viable instance scheduling options, we at ParkMyCloud created a SaaS application to automate instance scheduling, helping organizations cut cloud costs by 65% or more on their monthly cloud bill with AWS, Azure, and, of course, Google Cloud.

We aim to provide a number of benefits that you won’t find with, say, the GCP Cron Service. ParkMyCloud’s cloud management software:

  • Automates the process of switching non-production instances on and off with a simple, easy-to-use platform – more reliable than the manual process of switching GCP Compute instances off via the GCP console. Automatic on/off schedules make resource states easy to manage.
  • Provides a single-pane-of-glass view, allowing you to consolidate multiple clouds, multiple accounts within each cloud, and multiple regions within each account, all in one easy-to-use interface.
  • Does not require a developer background, coding, or custom scripting. It is also more flexible and cost-effective than having developers write scheduling scripts.
  • Can be used with a mobile phone or tablet.
  • Avoids the hard-coded schedules of the Cron Service. Users of ParkMyCloud’s GCP scheduler can temporarily override schedules if they need to use an instance on short notice.
  • Supports Teams and User Roles (with optional SSO), ensuring users will only have access to the resources you grant.
  • Helps you identify idle instances by monitoring instance performance metrics, displaying utilization heatmaps, and automatically generating utilization-based “SmartParking” schedule recommendations, which you can accept or modify as you wish...
  • Provides “rightsizing” recommendations to identify resources that are routinely underutilized and can be converted to a different Google Cloud server size to save 50-75% of the cost of the resource.  These recommendations incorporate custom GCP sizes, so you can adjust specifics around memory and CPU independent of each other.
  • Has a 14-day free trial, so you can try the GCP cloud scheduler platform out in your own environment. There’s also a free-forever tier, useful for startups and those on the Google Cloud free tier, as well as paid tiers with more advanced options for enterprises with a larger Google Cloud footprint.
  • Supports multiple GCP products, including Virtual Machines, CloudSQL databases, Autoscaling Groups, and GKE clusters and nodes.
  • Notifies users and admins of resource shutdowns, startups, and actions taken via Google Hangouts, Slack, Microsoft Teams, or Email.

How Much Can You Save with Google Cloud Scheduling?

While it depends on your exact schedule, many non-production Google Cloud VMs – those used for development, testing, staging, and QA – can be turned off for 12 hours/day on weekdays, and 24 hours/day on weekends. For example, the resource might be running from 7 AM to 7 PM Monday through Friday, and “parked” the rest of the week. This comes out to about 64% savings per resource.

Currently, the average savings per scheduled VM in the ParkMyCloud platform is about $245/month. That does not account for any additional savings gained from rightsizing. 

How Enterprises Are Benefitting from ParkMyCloud’s Google Cloud Scheduler + Optimizer

If you’re not quite ready to start your own trial, check out this interview with Workfront, a work management software provider. Workfront uses both AWS and Google Cloud Compute Engine, and needed to coordinate cloud management software across both public clouds. They required automation in order to optimize and control cloud resource costs, especially given users’ tendency to leave resources running when they weren’t being used.

Workfront found that ParkMyCloud would meet their automatic scheduling needs. Now, 200 users throughout the company use ParkMyCloud to:

  • Get recommendations of resources that are not being used 24×7, and use policies to automatically apply on/off schedules to them
  • Get notifications and control the state of their resources through Slack
  • Easily report savings to management
  • Save hundreds of thousands per year

Ways to Save on Google Cloud VMs, Beyond Scheduling

Google has done a great job of creating offerings for customers to save money through regular cloud usage. The two you’ll see mentioned the most are sustained use discounts and committed use discounts. Sustained use discounts give Google Cloud users automatic discounts the longer an instance is run. This post outlines the break-even points between letting an instance run for the discount vs. parking it. Sustained use discounts have also been expanded with resource-based pricing, which allows the sustained use to be applied based on your use of individual vCPUs and GB of memory regardless of the machine type you use.

Committed use discounts, on the other hand, require an upfront commitment for 1 or 3 years’ usage. We have found that they’re best applicable for predictable workloads such as production environments. There are also the pre-emptible VMs, which are offered at a discount from on demand VMs in exchange for being short-lived – up to 24 hours.

In addition to these discounts, you can also save money by rightsizing your instances. Provisioning your resources to be larger than you need is another form of cloud waste. On average, rightsizing a resource reduces the cost by 50%. Google Cloud makes it easy to change the CPU or the Memory amounts using custom instance sizes. If you’d rather use standard sizing, they offer that as well. By keeping an eye on the usage patterns of your servers, you can make sure that you’re getting the most use of the resources you are paying for.

How to Create a Google Cloud Schedule with ParkMyCloud 

Getting started with ParkMyCloud is easy. Simply register for a free trial with your email address and connect to your Google Cloud Platform to allow ParkMyCloud to discover and manage your resources. A 14-day free trial free gives your organization the opportunity to evaluate the benefits of ParkMyCloud while you only pay for the cloud computing power you use. At the end of the trial, there is no obligation on you to continue with our service, and all the money your organization has saved is, of course, yours to keep.

If you do choose to continue, our Google Cloud scheduler/optimizer pricing is straightforward. You will choose a functionality tier and pay per resource per month. There is a free forever tier available – so have at it. 

Have fun storming the castle!