Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

7 Tips to Reduce Cost with Azure Virtual Machines

  • Last Updated : 16 Dec, 2021

In this article, we will see various ways by which we can save costs with Azure virtual machines.

Azure Virtual Machines (VMs) are software emulations of the physical computer, which have a virtual processor, memory, storage, and networking capabilities running inside the host’s data center in a virtualized environment. In these cases, the host is Microsoft Azure.

  • How to create a new Virtual Machine in Azure Portal
  1. Open and sign in to the Azure portal.
  2. In global search or in the left menu, search for the Virtual Machines section.
  3. Select the Create option under the Virtual Machine section in order to create a VM.

1. Use Azure Reserved Virtual Machine:

When we know that our server must be up and running for a long period of time( one year or three years). Then we can reserve virtual machines by prepaying and making commitments with Azure for servers in their data centers. Committing allows you to get a discount on the virtual machines you use. As said by Azure, by using Azure reservations one can save up to 72% of the billing than pay-as-you-go prices.

For reserving Virtual Machines:

  1. Open Azure portal.
  2. Go to azure global search and search for Reservations.
  3. In Reservations, select resources for reservation. In this case VM.
  4. Use filters and select virtual machines you want to reserve.

 We can use Azure Pricing Calculator to estimate the prices of Virtual Machine.

Azure Pricing Calculator

2. Select right Azure Region for VM:

The closer the data center to your users, the lower the latency and the faster the load time. If this case does not apply to you then choosing a low-cost region for your VM would be a good option to save cost. The pricing of virtual machines depends from region to region. So that you can use Azure Pricing Calculator to compare costs. It is recommended to use low-cost locations or regions to save costs. 

Briefly,

For Windows Server: D2 v3: 2 vCPUs, 8GB RAM, 50GB Temporary storage

  • In East US Region : $0.188/hour
  • In West US Region : $0.209/hour
  • In Central India Region : $0.197/hour

(Note : Actual pricing may vary depending on the various factors for eg.currency exchange rate,etc.)

3.  Use of Azure Spot Virtual Machines:

 Using Spot Virtual Machines allows users to take advantage of Azure’s unused compute capacity at a significant cost saving. Azure spot virtual machines provide unused compute capacity of Azure’s data centers. At any point of time, if Azure needs their servers back for on-demand customers, they can evict our compute capacity. Therefore, Azure spot VMs are recommended to workloads that can bear interruptions like dev/test environment, time-insensitive workloads, and many more. By using Azure spot VMs one can save up to 90% compared to pay-as-you-go (PAYG) pricing.  

4. Pick the Right Size for your Virtual Machine:

There are many sizes and types of VMs are available to choose from, but each one has a different price according to their computing and storage capabilities. The size that you choose determines the processing power, memory, and storage capacity of the VM. Azure charges an hourly price based on VMs size and operating system. So choose the right VM that will fulfill your requirements.  Assess your VM requirements regularly and scale accordingly. Sometimes we might not need that powerful hardware for VM.

5. Shut-down or Set Auto-Shut down for Unused virtual machines:

This is possible only when the Virtual Machine is not a web server or database server. Because this type of server needs to be run all over the day. This is mostly used when Virtual Machines are created for testing or development purposes.

When we create a virtual machine in the tab Management. If we scroll down and can check Auto-shutdown

option. We can set there and specify a schedule when we want our Virtual Machine to be automatically shut down. We can schedule auto-shutdown during the nights and weekends according to the user’s needs. We can also automatically shut down all existing VMs using scripts.

6. Use Azure Hybrid Benefit for Windows Server:

Azure has the option to use hybrid benefits for windows server licenses. This means we can use our on-premises windows server or SQL server license to reduce the cost for deploying VMs as a software license fee. As said by Microsoft, one can save up to 49% with a license we already own Azure Hybrid Benefit

7. Use of Azure Advisor:

Azure Advisor is a free service that will analyze your use of Azure and make you specific recommendations based on your usage across availability, security, performance, and cost consumption. Sometimes resources keep running and billing in the background but we no longer have any use of those resources(services), hence Azure Advisor gives that type of recommendation to stop or delete that resource to reduce cost. We can closely monitor Azure Advisor for best practices. We can also set alerts from the Alerts section for important recommendations.   

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!