Microsoft Community Insights
Welcome to the Microsoft Community Insights Podcast, where we explore the world of Microsoft Technologies. Interview experts in the field to share insights, stories, and experiences in the cloud.
if you would like to watch the video version you can watch it on YouTube below
https://youtube.com/playlist?list=PLHohm6w4Gzi6KH8FqhIaUN-dbqAPT2wCX&si=BFaJa4LuAsPa2bfH
Hope you enjoy it
Microsoft Community Insights
Episode 1 - Mastering Azure Cost Management with Gregor Suttie
Unlock the secrets to your Azure cloud costs with Azure MVP Gregor Suttie. Discover how strategic use of Azure Advisor, consistent reviews, and the savvy application of Azure Hybrid Benefit and VM reservations can lead to substantial savings. Gregor explains the criticality of right-sizing resources and provides actionable advice for resizing underutilized virtual machines—essentials for anyone looking to optimize cloud costs without sacrificing performance.
Welcome to Microsoft Community Insights podcast where we share insights from the community experts to stay up to date with Azure. My name is Nicholas and I will be your host today. In this episode, we will dive into Azure Cost Management. But before we get started, I want to remind you to follow us on social media so you never miss an episode. So it helps us reach more amazing people like yourself. So today we're having a special guest, Gregor Sutti. Can you start introducing yourself, please? Yeah, hi, Nicholas. Thanks for having me. So my name is Gregor Sutti. I am an Azure Architect for a company called Intercept and they are based in the Netherlands. I am an Azure MVP for the last five years, I think it is. And I'm also an MCT for the last three years. I live in Scotland, so it's quite wild at the moment. We're having some storms. And yeah, so I've been doing Azure for four or five years. Thanks for having me. Yeah. So today's theme is cost management in Azure. And we just want to ask you some several questions to yourself on it. So how can you use Microsoft Cost Management to understand how and where you're incurring costs in the cloud to identify and prevent bad spending patterns? Yeah, so that's a good question. So Azure Cost Management is very important for all of our customers. So when I'm working at Intercept, we get asked to do cost management kind of reviews of all of our customers. And I've yet to find a customer where I haven't been able to save money. So how do you understand and where do you see the costs? Well, in the Azure portal, there's a tool called Advisor. So it used to be called Azure Advisor, but it's now just Advisor. And if you go in there, it'll give you some AI that runs in the background and looks at all of your Azure resources and your spend. And it breaks it down into four or five different areas. But the main area is cost. So I'm looking at a screen right now and I'm looking at a customer. And if I click on cost, it's basically saying you can save X amount over the following year or three years. So it gives you a breakdown. It looks at all your usage and your usage patterns throughout the last 30 days. So that's the last month. And basically, it will give you a breakdown on where you can go and look at and try and save money within Azure. So we do that for all of our customers quite regularly. And as I say, every single month, look at this. There's always some sort of recommendation on ways to save cost. So that's how you can prevent. That's how you can optimize your costs. Now, how do you identify and prevent bad spending patterns? That's a good question. One of the main things that pops up in the Azure Advisor is things like if you're using virtual machines, for example, you can get reservations. So one of the customers we're working with now has hundreds of VMs. And myself and Justin at work have been going through the entire subscription and recommending for when it's Windows virtual machines, you can put on what's called Azure Hybrid Benefit. So the idea here is you buy a Windows license for I think it's like $280 and you apply that to the virtual machine and that reduce costs. And then you can put on a reservation for either one or up to three years. So what we've been doing with this particular customer is we went through all of the Windows virtual machines. We added quite a number of Azure Hybrid Benefits to them. So each virtual machine gets a license basically applied to it and you can then go on and give a reservation. So we spoke to the customer and we asked them, how long are you going to keep these VMs around? So for like the dev and test environment, they weren't truly that interested in reservations. But for production, when we spoke to them, they wanted to keep the VMs for at least one to three years. So based on what they told us, they actually ended up wanting to purchase three reservations. Now, a typical VM of like a V2, sorry, like a standard V2, if you look at the cost reductions and that, you can actually apply, if it's a Windows VM, that is a hybrid benefit and a three year reservation. So an example would be some of the VMs that this customer was paying for was maybe $4,700 a year. And that comes down to like $800. So there's a huge savings across a number of VMs. And Azure Advisor, in this case, was in the millions for this customer. So we've been working away at doing that as part of cost reduction. So that's how you can avoid bad spending patterns. You can look at your usage. Azure Advisor will give you a summary of all this and you can start to look through the Azure recommendations on how to save costs. So I would recommend everyone does that. So what are some of the best practice for costs for resizing resources in Azure? Yeah, so sometimes you'll get recommendations to say that you need to resize or shut down underutilized virtual machines. So what people tend to do is deploy virtual machines that are far too big. And then once they start using them, the recommendation in Azure will say to you after like a month or two, you need to resize or shut them down. So you're either not using them at all or you're not using anywhere near 100%. So you basically spec'd the virtual machine too highly, too high. So you basically get a recommendation to say go in and you can resize these virtual machines. So what you can do is you can just go in and click on it and resize it from like maybe a standard D2 down to something a lot smaller, because you're not using anywhere near like 100% CPU or you're not using all the memory that's been assigned to this virtual machine. So right sizing is very important. I would always recommend you right size the virtual machines first before you do reservations, because the reservations will be wrong if they're based on the wrong size of the virtual machine. So the top tip here is to basically right size your VMs first. And you should get recommendations inside Azure Advisor if your VMs are too powerful for what your workloads are. Then once you do that, you can right size it accordingly, give it a month, let it wait 30 odd days, and then you'll see if you've got any reservation recommendations for your virtual machine. So that's probably the best way to save money if you're using virtual machines, for example. OK, so given that AI is a buzzword going around here, would you recommend companies to use AI to make informed decisions about cloud costs? Yeah, well, that's what Azure Advisor is doing in the background. It's actually using AI to basically review your usage in these virtual machines and in web apps and in AKS and all the kind of storage accounts. So I'm looking at a portal right now and things are like, consider SQL PaaS DB reserved instances. So Azure AI has looked at this subscription and it's basically saying you're paying too much. You could consider a reserved instance for a SQL PaaS SQL server. So it already is using AI in the background for you. Other ones here are considered Cosmos DB reserved instance. So they're using Cosmos DB for production in particular, and it's basically recommending that we put in a reserved instance on Cosmos DB. Now you get this for all sorts of things, things like databases, app services, function apps, web apps. You get it for all sorts of things, including the databases. Yeah, you also get what's called a savings plan for compute, but we tend to ignore that and go for reservations. So there's multiple types of reservations across multiple different Azure resources. But you should definitely check this out. I always recommend you check this out at least once a month because it will save you money. I've never seen a story. I've never seen an account or a subscription that I've not been able to save money on for a customer yet. And sometimes it's a lot of money, like a lot of money, because people don't have things like Azure Policy in place. So you can put things like Azure Policy in place to say that developers are not allowed to deploy large virtual machines, which can be expensive. You can also put in things like policy in place to stop virtual machines so that at the end of the day, you can have them stopped and deleted if they're dev VMs, for example. You can also do things like using policy. You can say you're only allowed to deploy these sizes of virtual machines. So say you want, I don't know, BVMs and then DVMs, that would stop anyone being able to deploy anything but what you've chosen. And you can also choose which locations to deploy to. So a lot of our customers deploy to West Europe and they don't want to be able to deploy resources anywhere else. And you can you can use policy as well to do things like that. So there is AI already running in Azure and Azure Advisor is the thing to go for. Going forward, you'll also have some AI inside Azure for cost management. They're working on previews of that and that will help immensely. So you'll get more recommendations and you'll get better recommendations going forward. So I'm looking forward to when that goes live. Brilliant. From your experience of using cost management in Azure, what are some of the common challenging pitfalls that you face when managing costs and how you overcome them? Yeah, great question. So common challenges are when you start with a new customer and you do a design and you recommend the Azure resources that they're going to need. Sometimes they'll think, oh, that's quite expensive for a month. But some of the common challenges are working out how much it is actually going to be. So what you have to probably do is deploy the resources and let it run for maybe a month, maybe two months, and then look at the spend and also look at Advisor again just to see if you've deployed. Maybe I've deployed VMs that are too powerful for the workloads that the customer is using. So these are some of the common challenges. A lot of customers don't put in what's called an Azure budget. So you can put in like your shopping budget for the month. You can put in a budget in play for your subscription. And if you or anyone in your team starts to deploy large, expensive virtual machines, then your budget is going to get blown out of the water. And if you do put a budget in place, you can get alerts on that. So you can set up alerts that will immediately let you know if someone's deployed something that's going to cost a lot of money. Someone might deploy, I don't know, some very expensive VMs or maybe turn on Cosmos DB and then use far too many RUs. It'll tell you that if your budget was, let's say, 5,000 euros a month, that you're going to blow that very quickly. So you'll get an alert straight away, which is good. I always recommend customers put budgets on all of their subscriptions, especially dev and test, because there's a lot of companies where developers have free access to just go and deploy things from the portal. And that's not always a great idea. You can also put a budget in play and that will kind of give everyone a warning that you're about to spend a lot of money. So budgets, definitely. I think what else would be good? Definitely budgets, definitely the alerts on the budgets. Yeah, I think that's pretty much it. But also review your spend. You can go into the portal and look at cost management and have a look at what's costing. Sometimes you'll see people start turning on monitoring, for example, and they'll monitor VMs or monitor AKS. And they'll just log everything to Log Analytics. Now, it's quite hard because sometimes Log Analytics doesn't always show up in cost management. So you need to go into Log Analytics workspaces and check on usage and cost as well. And just make sure that people aren't logging gigs of data every day. Sometimes when you've got an issue, a customer will phone you up and haven't got any logging on and we'll turn the logging on. But you also need to check the logs and check the cost. You've made sure that you've turned that back off once it's been resolved. So pitfalls can be things like turning on all of the logging and just log everything. And that's not always what you want to do. You'd certainly want to log certain things, but I wouldn't turn on all logging for everything. That means you'll just blow a lot of money. And we try and avoid what's called a big bang at the end of the month when you haven't got a budget in play. And all of a sudden it's went from 3 grand to 15 grand and customers will phone you up and go, whoa, what happened here? And by that point, you've spent that money and it's too late. So you need to make sure you've got your budgets in place. So I would recommend doing that. OK, brilliant. Before we close the episode, I just want to see how can our audience learn more about cost management and connect with you? So to learn about cost management, I would just basically go into Microsoft Learn and read up on it. I think if you're working in Azure, you should probably be aware of the costs involved. Some services are a lot more expensive than others. You don't want to deploy expensive virtual machines and leave them on. Things like, I remember a story on our last place where a lady turned on, she turned on a quick start tutorial for, it was one of the SQL tools, the new SQL tool, I think it was, I forgot the name of it, but it was like 3 grand over the weekend. And all of a sudden, you know, you spend 3,000 pounds just by running a quick start tutorial, importing some taxi data. So you have to be wary of what you're doing and checking. Yeah, so where do you learn about cost management? Microsoft Learn. But I would always suggest people to even look at your own subscriptions and see what you're spending, because it's really easy to deploy resources into a resource group and just forget about them and you're not using them. And that's just wasting money. So you should be able to be familiar with cost management, have a look at all the resources, have a look at cost management itself, set up even a budget on your own so you're not going over that or you want to keep an eye on it. So where can people connect with me? Well, you can connect with me on LinkedIn. It's just Gregor underscore Sutty, I think it is, and Twitter is the same, Gregor underscore Sutty. I highly recommend you get familiar with cost management now because it will help and it will save you from customers phoning up and saying, how come my bill is so high? So it's very, very important. Definitely worth keeping an eye on. OK, thanks for joining us on this episode, Gregor Sutty. Yeah, so everyone, it will be on, if you follow us, it will be on Spotify and Apple Music in a few days. Stay tuned. Bye.