top of page
  • Foto van schrijverFrederik

Save Hundreds of Dollars with VM Reservations

Bijgewerkt op: 29 aug. 2021

Azure VM Reservations is guaranteed a real money saver, with little risk of losing money.


I'm sure you will be impressed by the flexibility offered, with up to 72% discounts on your VMs. You will not be stuck with a reservation after deleting your VM.


Before I continue, please note that Azure has reservations for many Azure Resources. This blog post is only discussing the Azure VM Reservations.


Migrating on-premise compute to the cloud can be very expensive.

Choosing for cloud does not mean simply migrating your servers or virtual machines to the cloud. Most of the times you're better off choosing for Azure Resources which are part of the PaaS or SaaS family.

However, in some cases you will have to choose for deploying an Azure Virtual Machine with your service installed within the VM.

This post teaches you how to save costs on hosting compute in the cloud.


I'm not responsible for costs, should I read this?

Are you hosting, managing or deploying any VM for any period of time? If you answer yes, then I believe this article is interesting to you. Even if you're not paying the bill, in the end of the day any Cloud Consultant's added value is advising on Cloud Solutions. After reading this post you can advise on savings costs with this little trick, or save hundreds of dollars from your own wallet.

"save hundreds of dollars from your own wallet"

If you are pretty sure you will be hosting Virtual Machines for almost a year or even longer, you will want to look into Azure Reservations. With Azure Reservations, you can save up to 72% on your costs. A very important key message is that you are NOT stuck with that particular VM for the next 1 or 3 years, as the reservations dynamic. What does this mean exactly? I will explain this to you in this blog post.

"you are NOT stuck with that particular VM for the next 1 or 3 years"


Azure Reservations

An Azure Reservation is a product bought from the Azure Portal. The reservation is applied as a billing discount, and is not directly coupled to your resources. The discount is calculated at the hour and is considered 'use-it-or-lose-it'. Any hour without Virtual Machines running is a loss.


However, the reservation is not bought for and applied to a particular Virtual Machine.

For example you buy a 1 or 3 year reservation, and decommission your VM. If you have another VM of the same size, after deleting your VM, the discount is automatically applied to your other VMs billing.

"after deleting your VM, the discount is automatically applied to your other VMs billing"

Tuning off VMs with reservations

Whenever your turn off a VM, no costs are incurred to the VM itself. Which makes the reservation useless.

The discount is calculated at the hour. Which means, every hour your VM is on, the discount is applied. Whenever your VM is turned off, the reservation is applied automatically to any other VM to which the reservation would apply.


Even within the hour, the reservation can be shared between VMs. The below graph and bullet list taken from Microsoft Docs explains clearly how the reservation is applied to multiple VMs running only a part of the hour.

  1. Any usage that's above the reservation line gets charged at the regular pay-as-you-go rates. You're not charged for any usage below the reservations line, since it has been already paid as part of reservation purchase.

  2. In hour 1, instance 1 runs for 0.75 hours and instance 2 runs for 0.5 hours. Total usage for hour 1 is 1.25 hours. You're charged the pay-as-you-go rates for the remaining 0.25 hours.

  3. For hour 2 and hour 3, both instances ran for 1 hour each. One instance is covered by the reservation and the other is charged at pay-as-you-go rates.

  4. For hour 4, instance 1 runs for 0.5 hours and instance 2 runs for 1 hour. Instance 1 is fully covered by the reservation and 0.5 hours of instance 2 is covered. You’re charged the pay-as-you-go rate for the remaining 0.5 hours.


Reservations vs VM sizes

Perhaps you're impressed already by the flexibility Microsoft has given us. But with a reservation bought, you might wonder if you're stuck with that particular VM size. Short answer: No.

Reservations are bought for a so called instance size flexibility group.

Consider buying a reservation within the DSv2 instance size flexibility group for a VM size of Standard_DS4_v2.

Any VM size you have within the DS4v2 group qualifies for your discount.

  • Standard_DS1_v2

  • Standard_DS2_v2

  • Standard_DS3_v2

  • Standard_DS4_v2

  • Standard_DS5_v2

The different VM sizes have different costs, so the discount is applied at a ratio of its size. The VM size Standard_DS4_v2 has a ratio of 8.

The ratio for each VM can be found in the Instance size flexibility ratios at: https://isfratio.blob.core.windows.net/isfratio/ISFRatio.csv


You have one VM of size DS4_v2 which has a ratio of 8, and a reservation for the same size. You also have two VMs of size DS3_v2 which have a ratio of 4.

Next you delete the VM with size DS4_v2.

Your reservation would have become obsolete, however as all the VMs are within the same instance size flexibility group, the discount with ratio 8 is now applied at both DS3_v2 VMs with a total ratio equal to 8.


Split your reservation

When you have a reservation for a VM Size which is not the smalles size, it is possible to split your reservation into two reservations. This allows you to move half of the original reservation to another subscription.


Cancel, exchange, or refund reservations

If you are still not impressed nor convinced by the flexibility of reservations at the time of writing it's possible to cancel, exchange and refund your reservation!

So you can either swap your reservation for another reservation, but larger and smaller reservations. You can even completely cancel and refund your reservation and get part of your money returned. Calculation is based on the period used. Currently Microsoft does not charge any early-cancellation fee. However, they do write in future there might be a 12% early-termination fee for cancellations.

"it's possible to cancel, exchange and refund your reservation"


Buying a VM Reservation

To buy a reservation, your account must be assigned the owner role or reservation purchaser role on an Azure subscription.

Azure provides you with Reservation Recommendations. The recommendations are shown in several ways; whenever you buy a reservation, purchase recommendations and recommended quantities are shown. Also the Azure Advisor advises you which VM Reservations are relevant to your subscription.


To buy an instance:

  1. Sign in to the Azure portal.

  2. Select All services > Reservations.

  3. Select Add to purchase a new reservation and then click Virtual machine.

  4. Enter required fields.


Performance of your reservations

You have some possibilities to monitor and tweak your reservations from within the Azure Portal.


Monitor your reservations

From the Azure portal / All Services / Reservations, it is possible to monitor the performance of your reservation.

You can review the Utilization in %, and the reservation use trend over time.


Optimize your reservation

Microsoft advises the below configurations changes if your reservations are underused.

  • Make sure the virtual machines that your organization creates match the VM size that's for the reservation.

  • Make sure instance size flexibility is on. For more information, see Manage reservations - Change optimize setting for Reserved VM Instances.

  • Change the scope of the reservation to shared so that it applies more broadly. For more information, see Change the scope for a reservation.

  • Consider exchanging the unused quantity. For more information, see Cancellations and exchanges.


Conclusion

Whenever I learned about Azure's VM Reservations, I was impressed more and more while I continued reading about the flexibility on how the discounts are calculated.

  • VM Reservations are applied automatically, no management required.

  • If you delete or resize a VM, the reservation is reassigned automatically.

  • VM Reservations are bought for a particular size but are also applied to smaller or larger VMs within the same instance size flexibility group based on a size ratio.

  • Whenever your turn off a VM, the reservation is shared with other VMs.

  • The reservations give up to 72% discount, that's a lot of hours down-time of your VM before you reach break-even against your favour.

  • The reservation can be moved between subscriptions.

  • You can split a reservation into two reservations.

  • If the reservation still becomes useless, you can cancel, exchange and refund your reservation

So why not buy your reservations straight away?


Useful Links:


Save with Azure reservations


Save costs with Azure Reserverved VM Instances


Buying a reservation



16 weergaven0 opmerkingen

Comments


bottom of page