azure未连接_查找影响Azure成本的未使用资源

本文探讨如何减少Azure上的未使用资源成本,通过跟踪资源总成本、使用Azure门户来识别高成本资源,并根据初创公司和大型组织的不同预算策略来优化资源管理。预防策略和按成本组织资源能有效帮助节约成本。
摘要由CSDN通过智能技术生成

azure未连接

To reduce Azure costs on unused and unnecessary resources, we should design with prevention in mind – considering whether we want to commit to reserved use or test with a pay-as-we-go model. We may experience situations where we already have many resources, but are unsure of their use – are these consistently used, sometimes used, never used? Before we can answer whether an unused resource (or what appears to be an unused resource) is unnecessary, we have to determine whether it’s used. In this tip, we’ll look at this challenge.

为了减少Azure上未使用和不必要的资源的成本,我们在设计时应牢记预防–考虑我们是否要保留使用或使用即付即用模型进行测试。 我们可能会遇到这样的情况,即我们已经拥有许多资源,但不确定其使用方式–这些资源是否一直使用,有时使用或从未使用过? 在我们可以回答是否有必要使用未使用的资源(或看起来是未使用的资源)之前,我们必须确定是否已使用它。 在本文中,我们将探讨这一挑战。

按总成本组织资源 (Organization of Resources by Total Cost)

With strong measures to prevent unused and unnecessary resources from existing on the design side, we can focus on organizing our resources to identify unused and unnecessary resources that add to our Azure costs. As our environment grows, we may see one resource replace another resource since replacement in development can be a method to easily revert changes. One way to manage this is through tracking the total cost of each resource. In the Azure Portal, we can get this information by selection our subscription and Cost Analysis. Here, we can click on the “Cost by resource” and export the data (Excel or CSV), as we see in the below image.

通过采取强有力的措施来防止设计端存在未使用和不必要的资源,我们可以集中精力组织资源以识别会增加Azure成本的未使用和不必要的资源。 随着环境的发展,我们可能会看到一种资源替代另一种资源,因为开发中的替代可以轻松还原变更。 一种解决方法是跟踪每个资源的总成本。 在Azure门户中,我们可以通过选择订阅和成本分析来获取此信息。 在这里,我们可以单击“按资源成本”并导出数据(Excel或CSV),如下图所示。

We get the list of our Azure costs by resource in our subscription, which will show us the highest costs first

Tracking resources by total costs also helps us save on Azure costs because unused and unnecessary resources that add high costs should be our major focus since these will have the largest impact. Unused and unnecessary resources that cost us less can be an eventual priority. For example, if we have 25 VMs in our environment with 5 being unused and unnecessary, but only 2 of them have high costs, those would be our first focus for disabling.

按总成本跟踪资源还有助于我们节省Azure成本,因为未使用和不必要的资源会增加高成本,因为我们将重点关注这些资源,因为它们将产生最大的影响。 最终可能会优先考虑使我们花费更少的未使用和不必要的资源。 例如,如果我们的环境中有25个VM,其中5个未被使用和不必要,但其中只有2个具有较高的成本,那么这些将是我们首先要禁用的虚拟机。

We can provide the information that we retain from this to teams within our company. The output of this information not only includes the resources and their cost, we’ll also see tagging information as well as location and resource type information that can be filters for organizing our Azure costs. We may use these categories for organizing teams – such as teams that tend to develop some resources or teams organized by tags.

我们可以将由此保留的信息提供给公司内的团队。 此信息的输出不仅包括资源及其成本,我们还将看到标记信息以及位置和资源类型信息,这些信息可以用作组织Azure成本的筛选器。 我们可以使用这些类别来组织团队-例如倾向于开发某些资源的团队或按标签组织的团队。

Example output with details edited showing us headers we can use for organization and sharing with teams

使用Azure门户 (Using the Azure Portal)

In the Azure portal, we can obtain information about our resources related to their use to plan for our Azure costs. If we select a resource (we’ll use an example with VMs) and look at the Overview option, we’ll see data about the resource’s use over a period of time (we may dive deeper into data and performance metrics, but these provide a useful overview of a resource). In the below image, I’ve intentionally removed many details that are unrelated to where we get a resource’s use while showing where we would get information about this resource’s use (we see that I’ve selected 30 days and that we have options such as 1 hour, 6 hours, 12 hours, etc).

在Azure门户中,我们可以获得有关资源的信息,这些资源与它们用于计划Azure成本的用途有关。 如果我们选择一种资源(我们将在虚拟机上使用一个示例)并查看“概述”选项,则将看到一段时间内有关该资源使用的数据(我们可能会更深入地研究数据和性能指标,但是这些提供了资源的有用概述)。 在下图中,我故意删除了许多与资源使用位置无关的细节,同时显示了在哪里可以获取有关资源使用信息的信息(我们已经选择了30天,并且我们有一些选项,例如1小时,6小时,12小时等)。

On the overview selection, we can show data about this VMs use to monitor for Azure costs over various time periods

This helps us determine use very quickly for our Azure costs – is the resource even being used? In the below image, we see a separate resource that shows some network use over a period of time. We see that for this period of time, the resource is being used. Using these graphs may not tell us whether our use is necessary, but they can answer our first question about them being used and whether they may be using the best model for their use – reserved or a pay-as-we-go model.

这可以帮助我们很快决定使用我们的Azure的成本-甚至被使用的资源? 在下图中,我们看到了一个单独的资源,该资源显示了一段时间内的某些网络使用情况。 我们看到在这段时间里,资源正在被使用。 使用这些图形可能不会告诉我们是否需要使用它们,但是它们可以回答有关使用它们的第一个问题,以及它们是否使用的是最佳模型-保留模型或即付即用模型。

Provided the network use is required, this Azure cost is in use and necessary

We can also use these graphs to determine if our scale is appropriate for our Azure costs. If we determine use of a resource and confirm that the resource is necessary, can we improve its scale to save? This challenge may require more data, as our scale may be very high for one of its performance counters (such as memory, CPU, disk, etc), but low in another counter.

我们还可以使用这些图来确定我们的规模是否适合我们的Azure成本。 如果我们确定使用资源并确认该资源是必需的,是否可以提高其节省规模? 这个挑战可能需要更多数据,因为我们的性能指标之一(例如内存,CPU,磁盘等)的规模可能很高,而另一个性能指标的规模却很小。

We may be tempted to view this Azure cost as unnecessary, but we should remember some variables – like time - matter

In the above image, we see a resource that hasn’t had any CPU use in the last 30 days and when we check other performance counters, we see this trend across all our performance counters. This may indicate that our resource is not being used – there may be a few exceptions where it hasn’t been used for a while, but if I see a high cost item from our organized list by cost and the resource has no use in the last 30 days, it needs to be reviewed.

在上图中,我们看到在过去30天内没有使用任何CPU的资源,当我们检查其他性能计数器时,我们在所有性能计数器中都看到了这种趋势。 这可能表明我们的资源没有被使用-可能有一段时间没有使用过一些例外情况,但是如果我从按成本排序的有组织清单中看到一个成本较高的项目,并且该资源在最近30天,需要进行审核。

初创公司与大型组织 (Startups vs Large Organizations)

In my experience of working for both startups and large organizations, the budget styles tend to differ in opposites. In the context of resource expenses, such as Azure costs, and budgeting I’ve seen that successful startups tend to be strict with their limited budget, as their concern is for validating their proof-of-concept. In the context of Azure and other cloud providers, this would mean that early in development, they favor a pay-as-they-go model because they want to retain as much financial resources as possible and ensure that they have enough customer demand before they commit to a resource contract for their supply. The majority of ideas fail and never materialize into products while the cost of resource use remain real. Applied to what we’ve seen with resource use, in these contexts we would be strict with resources that don’t show use.

根据我为初创公司和大型组织工作的经验,预算风格往往相反。 在诸如Azure成本和预算之类的资源支出的背景下,我已经看到,成功的初创公司往往会对有限的预算提出严格要求,因为他们关注的是验证概念验证。 在Azure和其他云提供商的上下文中,这意味着在开发的早期,他们倾向于按需付费的模式,因为他们希望保留尽可能多的财务资源,并确保在他们之前有足够的客户需求承诺为其提供资源合同。 大多数想法失败了,并且从未实现,而资源使用成本仍然是真实的。 应用于我们在资源使用中看到的情况,在这些情况下,我们将严格限制未显示使用的资源。

Large organizations (excluding government) tend to emphasize the opposite: they have a set budget and they’re willing to commit an amount of the budget to new concepts for longer periods of time. In the context of Azure costs, this means that a year contract for reserved resources provides them with ample time (and a reduced cost when we look at the overall cost by time) to test their concept. Resources that don’t show use may be expected and may be retained until testing is done. This is because large organizations may test for longer periods even with low resource use because they have more capital to validate a concept.

大型组织(不包括政府)往往会强调相反的观点:他们有固定的预算,并且愿意为新概念投入更长的时间。 在Azure成本的情况下,这意味着一年的预留资源合同为它们提供了充足的时间(如果按时间查看总成本,则可以降低成本)来测试其概念。 未使用的资源可能是预期的,并且可以保留到测试完成。 这是因为大型组织即使在资源使用较少的情况下也可能会测试更长的时间,因为它们有更多的资本来验证概念。

The exception to both of these may be later in the business cycle, when investors in either startups or large organizations tend to be less patient.

这两种情况都可能在商业周期的后期出现,这时,初创公司或大型组织的投资者往往会耐心较小。

告诫 (A Word of Caution)

We want to ensure that we remove resources that are both unused and unnecessary and possibly one or the other to save on Azure costs. We should take extra steps to ensure this is the case before we do, as it’s possible in companies that a developer is temporarily out and no one knows the resource’s function and the resource is actually necessary. For example, the resource may be used in a proof-of-concept and removal could impact development because the developer is away from work for a period. This is another reason I recommend beginning with the most expensive resources first, as these are more likely to involve multiple individuals within a company and allow for multiple confirmations before removal. This possible drawback of removal is another reminder of why designing our resources with costs in mind reduces further challenges.

我们想要确保我们删除那些既未使用又不必要的资源,并可能删除其中一个或两个以节省Azure成本。 我们应该采取一些额外的步骤,以确保在这种情况之前发生,因为在公司中,开发人员可能会暂时退出工作,而没人知道资源的功能,而资源实际上是必需的。 例如,该资源可能用于概念验证中,并且删除可能会影响开发,因为开发人员会在一段时间内不工作。 这也是我建议首先从最昂贵的资源开始的另一个原因,因为这些资源更可能涉及公司中的多个人,并且允许在删除之前进行多次确认。 删除的这种可能的缺点再次提醒了我们,为什么在考虑成本的情况下设计我们的资源可以减少进一步的挑战。

结论 (Conclusion)

We should remember that prior to organizing our resources for removal, prevention comes first in reducing Azure costs. If we don’t prevent unnecessary and unused resources from existing, this becomes a constant effort. From using pay-as-we-go to reserved resources, good design prevents these unused and unnecessary resources from existing with some minor exceptions. When we have many existing resources that we need to identify, organizing by costs helps us reduce the largest costs first when we determine use. This impacts us faster than the other approach. Finally, as we identify unused resources, or seldom used resources, we may use scale to our advantage to save on costs.

我们应该记住,在组织我们的资源进行删除之前,首先要预防的是降低Azure成本。 如果我们不防止存在不必要的和未使用的资源,那么这将是一项持续的工作。 从使用按需付款到保留的资源,良好的设计可以防止这些未使用和不必要的资源的存在,但有一些例外。 当我们需要确定许多现有资源时,按成本进行组织可以帮助我们在确定用途时首先减少最大的成本。 这对我们的影响比其他方法更快。 最后,当我们确定未使用的资源或很少使用的资源时,我们可能会利用规模优势来节省成本。

目录 (Table of contents)

Azure Costs Tracking with Security and Design Considerations
Controlling Azure Costs Using Scaling and Tags
User Security and Risks to Azure Costs
Extract Azure Costs Using PowerShell
Tracking Azure Costs with Cost Management
Handling Unused and Unnecessary Resources Impacting Azure Costs
Finding Unused Resources Impacting Azure Costs
Situations When We May Want Higher Azure Costs
具有安全性和设计注意事项的Azure成本跟踪
使用扩展和标签控制Azure成本
用户安全和Azure成本风险
使用PowerShell提取Azure成本
通过成本管理跟踪Azure成本
处理影响Azure成本的未使用和不必要的资源
查找影响Azure成本的未使用资源
我们可能需要更高的Azure成本的情况

翻译自: https://www.sqlshack.com/finding-unused-resources-impacting-azure-costs/

azure未连接

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值