Tuning Costs on my Azure Development Machine

I’ve been storing my development machines up in Azure instead of buying a new laptop. And I really like this approach. 

By far the most useful aspect is that I needed to completely rebuild a machine the other day to get my development tools all working properly. The conversion from an older version of my dev tools to a newer version did not go so well, and the solution turned out to be just moving to a new machine. In Azure this was trivial as I just fired up a new VM.

But this is something you could do locally as well, and I’m wondering if I need to do that, because one thing I’m learning is that AZURE can be Expensive. Now by “expensive” it should be noted that I just hit $60/mo in my VM dev environment, so not actually that much money, but it’s an environment I only use a few hours per month for side work, so very expensive per hour.

A couple of issues I’ve had:

  • When you remove a VM, it doesn’t automatically remove the disks, which is maybe a good thing, but on a VM you only use occasionally the disks are the most expensive part. You have to go remove those manually.
  • BACKUPS seem to be very expensive. Since adding VM backups, my bill seems to be climbing an additional $20/mo. Obviously I need to tune this.
  • Overall, unpredictable costs. It’s not always obvious to me how the items on my bill line up to my VM’s, and when I sign up for new features, like backups, I can’t really tell how much it’s going to cost.

When looking around for advice on this, the following article was probably the most useful:

https://stackify.com/lower-azure-pricing-optimize-costs/

  • Sign a longer term contract and get a discount.
  • Sign up for BizSpark
  • Some Azure Regions are cheaper than others (?!)
  • Sign up for an expensive Cost Analysis Service to help you make sense of your bill
  • Use DevTestLabs to get auto-shutdown
  • [I don’t have this problem, I’m good at shutting down my one VM :^)]
  • Use App Services, Service Fabric, and all the other PAAS offerings instead of running individual VM’s - you can save a lot this way! [interesting comment]
  • Optimize your apps to use less resources

The lesson for me today is, yep, this can be expensive, especially if you are wanting to stay with the VM model. Set your machines to auto-shutdown, and retain only the backups you really need. On a Dev machine, it’s questionable whether you need backups at all, assuming you are using some service for source control. It only saves you if you have something go really haywire and want to be able to just rollback to a prior state instead of building a new VM. And given how fast we can build VM’s these days (especially if you have a template, which I don’t), it may not be worth it at all.

Also I found the report I really wanted. In the “Cost Management + Billing” area, there is a “Cost Analysis” option a few lines down. IGNORE the “check out this Azure Cost Management website!”, and just look a few lines down after “Invoices” for “Cost Analysis”. There it breaks out what is happening by Service instead of just by Resource, and I can see that I paid $25 last month just for backups, and $14 for a disk on an old VM I deleted several weeks ago.

So I’ve deleted several older backups and set my one remaining backup to only retain the last 2 weeks, and I already ditched the leftover disk last week. So now I think I’m back on track with an affordable Azure development machine :^)

Comments

Popular posts from this blog

SQL 2005 SP4 and MSreplication_subscriptions

Hiding an ASPXGridView Delete button with HTMLRowCreated vs. CommandButtonInitialize

SQL Server Deadlocks - Easy Quick Start Guide