您现在访问的是微软AZURE全球版技术文档网站,若需要访问由世纪互联运营的MICROSOFT AZURE中国区技术文档网站,请访问 https://docs.azure.cn.

如何通过 Azure 成本管理优化云投资How to optimize your cloud investment with Azure Cost Management

借助 Azure 成本管理所提供的工具,用户可以规划、分析和减少开支,最大程度利用云投资。Azure Cost Management gives you the tools to plan for, analyze and reduce your spending to maximize your cloud investment. 本文档提供成本管理的系统方法,重点介绍可用于解决组织成本难题的工具。This document provides you with a methodical approach to cost management and highlights the tools available to you as you address your organization’s cost challenges. 借助 Azure,可以轻松构建和部署云解决方案。Azure makes it easy to build and deploy cloud solutions. 但是,重要的一点是,这些解决方案需要经过优化,以最大程度减少组织所承担的费用。However, it's important that those solutions are optimized to minimize the cost to your organization. 遵循本文档所述的原则并使用我们的工具,有助于确保组织已做好成功实施的准备。Following the principles outlined in this document and using our tools will help to make sure your organization is prepared for success.

方法Methodology

成本管理是一个组织问题,并且应在进行云资源投资前持续实施。Cost management is an organizational problem and should be an ongoing practice that begins before you spend money on cloud resources. 要成功实施成本管理并优化成本,组织必须:To successfully implement cost management and optimize costs, your organization must:

  • 准备好成功实施所需的恰当工具Be prepared with the proper tools for success
  • 对成本负责Be accountable for costs
  • 采取适当措施优化支出Take appropriate action to optimize spending

以下所述的三个关键团队,必须与组织达成一致,以确保成功管理成本。Three key groups, outlined below, must be aligned in your organization to make sure that you successfully manage costs.

  • 财务 - 财务人员负责根据云支出预测批准整个组织内的预算请求。Finance - People responsible for approving budget requests across the organization based on cloud spending forecasts. 他们支付相应的账单,并将成本分摊到各个团队以促进问责制。They pay the corresponding bill and assign costs to various teams to drive accountability.
  • 经理 - 组织的业务决策制定者需要了解云支出,发现最佳支出结果。Managers - Business decision makers in an organization that need to understand cloud spending to find the best spending results.
  • 应用团队 - 工程师每日管理云资源、开发服务以满足组织需要。App teams - Engineers managing cloud resources on a day-to-day basis, developing services to meet the organization's needs. 这些团队需要在指定的预算内交付最大价值的灵活性。These teams need the flexibility to deliver the most value in their defined budgets.

关键原则Key principles

使用下面所述的原则,确保组织在云成本管理方面取得成功。Use the principles outlined below to position your organization for success in cloud cost management.

规划Planning

通过全面的预先规划,你可以根据特定的业务要求定制云使用。Comprehensive, up-front planning allows you to tailor cloud usage to your specific business requirements. 问问你自己:Ask yourself:

  • 我需要解决哪些业务问题?What business problem am I solving?
  • 我所需的资源使用模式是什么?What usage patterns do I expect from my resources?

你的回答有助于你选择适合自己的产品/服务。Your answers will help you select the offerings that are right for you. 你的回答决定要使用什么基础结构,以及如何使用该基础结构来最大程度提高 Azure 效率。They determine the infrastructure to use and how it's used to maximize your Azure efficiency.

可见性Visibility

如果成本管理的结构合理,这将有助于员工了解其所负责的 Azure 成本以及资金使用情况。When structured well, Cost Management helps you to inform people about the Azure costs they're responsible for or for the money they spend. Azure 提供的相关服务可让你了解资金使用方向 。Azure has services designed to give you insight into where your money is spent. 请充分利用这些工具。Take advantage of these tools. 它们可以帮助你找到未充分利用的资源、消除浪费并最大程度利用节省成本的机会。They can help you find resources that are underused, remove waste, and maximize cost-saving opportunities.

问责制Accountability

在组织中进行成本归因可以确保责任人对其团队的支出负责。Attribute costs in your organization to make sure that people responsible are accountable for their team's spending. 若要全面了解组织的 Azure 支出,应组织相关资源,以最大限度了解成本归因。To fully understand your organization's Azure spending, you should organize your resources to maximize insight into cost attribution. 良好的组织有助于管理和减少成本,并确保员工对组织中的高效支出负责。Good organization helps to manage and reduce costs and hold people accountable for efficient spending in your organization.

优化Optimization

行动起来,减少支出。Act to reduce your spending. 通过规划和提高成本可见性,根据收集的发现实现最大程度利用。Make the most of it based on the findings gathered through planning and increasing cost visibility. 你需要考虑购买和许可优化,以及基础结构部署变化(本文档将在后续部分对此作详细介绍)。You might consider purchase and licensing optimizations along with infrastructure deployment changes that are discussed in detail later in this document.

迭代Iteration

组织中的每个人必须加入到成本管理生命周期中。Everyone in your organization must engage in the cost management lifecycle. 他们需要对优化成本保持持续关注。They need to stay involved on an ongoing basis to optimize costs. 对此迭代过程应持严谨态度,将其作为组织中负责任的云监管的关键原则。Be rigorous about this iterative process and make it a key tenet of responsible cloud governance in your organization.

显示可见性、问责制和优化的关键原则图

在计划时考虑成本Plan with cost in mind

在部署云资源之前,需要评估以下各项:Before you deploy cloud resources, assess the following items:

  • 最能满足你需要的 Azure 套餐The Azure offer that best meets your needs
  • 计划使用的资源The resources you plan to use
  • 它们的成本可能是多少How much they might cost

Azure 提供了有助于评估过程的工具。Azure provides tools to assist you in the assessment process. 借助这些工具,可以充分了解启用工作负载所需的投资。The tools can give you a good idea of the investment required to enable your workloads. 这样便可以根据自己的情况,选择最佳配置。Then you can select the best configuration for your situation.

Azure 入门选项Azure onboarding options

最大程度利用成本管理的第一步是调查和确定最适合你的 Azure 套餐。The first step in maximizing your experience within Cost Management is to investigate and decide which Azure offer is best for you. 思考一下你将来计划如何使用 Azure。Think about how you plan to use Azure in the future. 此外,思考一下你希望如何配置计费模型。Also consider how you want your billing model configured. 制定决策时,请思考以下问题:Consider the following questions when making your decision:

  • 我计划使用 Azure 多长时间?How long do I plan to use Azure? 我是否测试或计划构建长期基础结构?Am I testing, or do I plan to build longer-term infrastructure?
  • 我希望如何支付 Azure 费用?How do I want to pay for Azure? 我应该预付以获得价格优惠,还是应该在月末转账付款?Should I prepay for a reduced price or get invoiced at the end of the month?

要详细了解各种选项,请访问如何购买 AzureTo learn more about the various options, visit How to buy Azure. 以下列出了几种最常见的计费模型。Several of the most common billing models are identified below.

免费Free

  • 12 个月的热门免费服务12 months of popular free services
  • 200 美元额度,用于在 30 天内探索各种服务$200 in credit to explore services for 30 days
  • 超过 25 种服务永久免费25+ services are always free

即用即付Pay as you go

  • 无最低限额或承诺使用量No minimums or commitments
  • 有竞争力的定价Competitive Pricing
  • 只需为使用的服务付费Pay only for what you use
  • 随时可以取消Cancel anytime

企业协议Enterprise Agreement

  • 可选择预先货币承诺付款Options for up-front monetary commitments
  • 可享受 Azure 价格优惠Access to reduced Azure pricing

估算解决方案的成本Estimate the cost of your solution

在部署任何基础结构之前,评估解决方案的成本。Before you deploy any infrastructure, assess how much your solution will cost. 评估将帮助你为组织的工作负载预先创建预算。The assessment will help you create a budget for your organization for the workload, up-front. 然后可以长期使用预算来检验初始估算的有效性。Then you can use a budget over time to benchmark the validity of your initial estimation. 可以将其与已部署解决方案的实际成本相比较。And you can compare it with the actual cost of your deployed solution.

Azure 定价计算器Azure pricing calculator

借助 Azure 定价计算器,可以混合和匹配 Azure 服务的不同组合,以了解成本估算。The Azure pricing calculator allows you to mix and match different combinations of Azure services to see an estimate of the costs. 可以在 Azure 中采用不同方式实施解决方案 - 每种方式可能会影响整体支出。You can implement your solution using different ways in Azure - each might influence your overall spending. 预先考虑云部署的所有基础结构需求将有助于最有效地使用该工具。Thinking early about all of the infrastructure needs of your cloud deployment helps you use the tool most effectively. 这可以帮助你获得 Azure 中估算支出的可靠预估。It can help you get a solid estimate of your estimated spending in Azure.

有关详细详细,请参阅 Azure 定价计算器For more information, see the Azure pricing calculator.

Azure MigrateAzure Migrate

Azure Migrate 服务可以评估本地数据中心中的组织当前工作负载。Azure Migrate is a service that assesses your organization's current workloads in on-premises datacenters. 你可以深入了解你对 Azure 替代解决方案的需求。It gives you insight into what you might need from an Azure replacement solution. 首先,Migrate 会分析本地计算机,确定迁移是否可行。First, Migrate analyzes your on-premises machines to determine whether migration is feasible. 然后,它会建议 Azure 中的 VM 大小,以最大程度优化性能。Then, it recommends VM sizing in Azure to maximize performance. 最后,它还会创建基于 Azure 的解决方案的成本估算值。Finally, it also creates a cost estimate for an Azure-based solution.

有关详细信息,请参阅 Azure MigrateFor more information, see Azure Migrate.

分析和管理成本Analyze and manage your costs

及时了解组织的成本变化情况。Keep informed about how your organization's costs evolve over time. 使用以下方法以正确理解和管理支出。Use the following techniques to properly understand and manage your spending.

组织和标记资源Organize and tag your resources

组织资源时考虑成本。Organize your resources with cost in mind. 在创建订阅和资源组时,考虑各团队所负责的相关成本。As you create subscriptions and resource groups, think about the teams that are responsible for associated costs. 请确保在报告中考虑组织要求。Make sure your reporting keeps your organization in mind. 订阅和资源组提供了组织和归因组织支出的良好存储桶。Subscriptions and resource groups provide good buckets to organize and attribute spending across your organization. 标记是归因成本的好方法。Tags provide a good way to attribute cost. 可将标记用作筛选器。You can use tags as a filter. 也可在分析数据和调查成本时,将其作为分组依据。And you can use them to group by when you analyze data and investigate costs. 企业协议客户还可以创建部门并将订阅放置在部门下。Enterprise Agreement customers can also create departments and place subscriptions under them. Azure 中的基于成本的组织有助于组织的相关人员对减少团队支出负责。Cost-based organization in Azure helps keep the relevant people in your organization accountable for reducing their team's spending.

使用成本分析Use cost analysis

借助成本分析,可以使用标准资源属性对成本进行交叉分析,从而深入分析组织成本。Cost analysis allows you to analyze your organizational costs in-depth by slicing and dicing your costs using standard resource properties. 请思考以下常见问题,将其作为分析指南。Consider the following common questions as a guide for your analysis. 定期回答这些问题有助于你更加及时了解相关信息,并制定成本合理化决策。Answering these questions on a regular basis will help you stay more informed and enable more cost-conscious decisions.

  • 当前月的估算成本 - 这个月已经产生的费用是多少?Estimated costs for the current month – How much have I incurred so far this month? 在预算范围内吗?Will I stay under my budget?
  • 调查异常值 - 执行定期检查,确保成本在正常使用的合理范围内。Investigate anomalies – Do routine checks to make sure that costs stay within a reasonable range of normal usage. 其趋势如何?What are the trends? 是否有离群值?Are there any outliers?
  • 发票对账 - 最近的已开票成本是否高于上个月?Invoice reconciliation - Is my latest invoiced cost more than the previous month? 月支出习惯的环比变化是什么?How did spending habits change month-over-month?
  • 内部退款 - 我已经了解我的费用,那这些费用如何在组织中分配?Internal chargeback - Now that I know how much I'm being charged, how should those charges be broken down for my organization?

有关详细信息,请参阅成本分析For more information, see cost analysis.

按计划导出账单数据Export billing data on a schedule

是否需要将账单数据导入外部系统,例如仪表板或财务系统?Do you need to import your billing data into an external system, like a dashboard or financial system? 可设置为自动导出到 Azure 存储,避免每月手动下载文件。Set up automated exports to Azure Storage and avoid manually downloading files every month. 然后便可轻松地设置与其他系统的自动集成,使帐单数据保持同步。You can then easily set up automatic integrations with other systems to keep your billing data in sync.

要详细了解如何导出账单数据,请参阅创建和管理导出的数据For more information about exporting billing data, see Create and manage exported data.

创建预算Create budgets

已确定并分析支出模式后,请务必开始为你和你的团队设置限制。After you've identified and analyzed your spending patterns, it's important to begin setting limits for yourself and your teams. Azure 预算使你能够设置基于成本或使用情况的预算,其中包含许多阈值和警报。Azure budgets give you the ability to set either a cost or usage-based budget with many thresholds and alerts. 请务必定期查看创建的预算,了解预算燃尽进度,根据需要进行更改。Make sure to review the budgets that you create regularly to see your budget burn-down progress and make changes as needed. 通过 Azure 预算,还可以配置达到给定预算阈值时的自动化触发器。Azure budgets also allow you to configure an automation trigger when a given budget threshold is reached. 例如,可以配置服务以关闭 VM。For example, you can configure your service to shut down VMs. 或者,可以将基础结构移动到其他定价层以响应预算触发器。Or you can move your infrastructure to a different pricing tier in response to a budget trigger.

有关详细信息,请参阅 Azure 预算For more information, see Azure Budgets.

有关基于预算的自动化的详细信息,请参阅基于预算的自动化For more information about budget-based automation, see Budget Based Automation.

行动起来,进行优化Act to optimize

使用以下方式来优化支出。Use the following ways to optimize spending.

避免浪费Cut out waste

在 Azure 中部署基础结构后,请务必确保其正在使用中。After you've deployed your infrastructure in Azure, it's important to make sure it is being used. 立即开始节省的最简单方法是查看资源并移除没有使用的资源。The easiest way to start saving immediately is to review your resources and remove any that aren't being used. 由此,应该确定资源是否正在被尽可能高效地使用。From there, you should determine if your resources are being used as efficiently as possible.

Azure 顾问Azure Advisor

Azure 顾问服务可以识别在 CPU 或网络使用方面利用率低的虚拟机。Azure Advisor is a service that, among other things, identifies virtual machines with low utilization from a CPU or network usage standpoint. 由此,可以确定是关闭还是根据估算成本调整计算机大小以继续运行计算机。From there, you can decide to either shut down or resize the machine based on the estimated cost to continue running the machines. 顾问还提供了用于预留实例购买的建议。Advisor also provides recommendations for reserved instance purchases. 这些建议基于你过去 30 天的虚拟机使用情况。The recommendations are based on your last 30 days of virtual machine usage. 一旦采纳,这些建议有助于减少支出。When acted on, the recommendations can help you reduce your spending.

有关详细信息,请参阅 Azure 顾问For more information, see Azure Advisor.

正确调整 VM 的大小Size your VMs properly

VM 大小对于 Azure 总成本具有重大影响。VM sizing has a significant impact on your overall Azure cost. Azure 中所需的 VM 数量可能与本地数据中心中当前已部署的 VM 数量不相等。The number of VMs needed in Azure might not equate to what you currently have deployed in an on-premises datacenter. 请确保为计划运行的工作负载选择恰当大小。Make sure your choose the right size for the workloads that you plan to run.

有关详细信息,请参阅 Azure IaaS:恰当大小和成本For more information, see Azure IaaS: proper sizing and cost.

使用购买折扣Use purchase discounts

Azure 提供许多折扣,组织应利用这些折扣节省成本。Azure has many discounts that your organization should take advantage of to save money.

Azure 预留Azure Reservations

通过 Azure 预留,可以预付一年或三年的虚拟机或 SQL 数据库计算容量。Azure Reservations allow you to prepay for one-year or three-years of virtual machine or SQL Database compute capacity. 通过预付,能够以折扣价购买所用资源。Pre-paying will allow you to get a discount on the resources you use. Azure 预留可大幅度减少虚拟机或 SQL 数据库计算成本,最多可以降低 72% 的即用即付价格,但需提前一年或三年预留。Azure reservations can significantly reduce your virtual machine or SQL database compute costs — up to 72 percent on pay-as-you-go prices with one-year or three-year upfront commitment. 预留提供计费折扣,且不影响虚拟机或 SQL 数据库的运行时状态。Reservations provide a billing discount and don't affect the runtime state of your virtual machines or SQL databases.

有关详细信息,请参阅什么是 Azure 预留For more information, see What are Azure Reservations?.

使用 Azure 混合权益Use Azure Hybrid Benefit

如果本地部署中已有 Windows Server 或 SQL Server 许可证,可以使用 Azure 混合权益计划节省 Azure 费用。If you already have Windows Server or SQL Server licenses in your on-premises deployments, you can use the Azure Hybrid Benefit program to save in Azure. 如果享有 Windows Server 权益,每个许可证涵盖 OS(最多两台虚拟机)成本,仅需支付基础计算成本。With the Windows Server benefit, each license covers the cost of the OS (up to two virtual machines), and you only pay for base compute costs. 可以使用现有 SQL Server 许可证,在基于 vCore 的 SQL 数据库选项方面节省多达 55% 的费用。You can use existing SQL Server licenses to save up to 55 percent on vCore-based SQL Database options. 选项包括 Azure 虚拟机中的 SQL Server 和 SQL Server Integration Services。Options include SQL Server in Azure Virtual Machines and SQL Server Integration Services.

有关详细信息,请参阅 Azure 混合权益节省计算器For more information, see Azure Hybrid Benefit savings calculator.

其他资源Other resources

Azure 还提供一项服务,借助该服务,可以构建利用 Azure 中的富余容量(以优惠费率计费)的服务。Azure also has a service that allows you to build services that take advantage of surplus capacity in Azure for reduced rates. 有关详细信息,请参阅在 Batch 中使用低优先级 VMFor more information, see Use low priority VMs with Batch.

后续步骤Next steps

  • 如果不熟悉成本管理,请参阅什么是 Azure 成本管理?,了解成本管理如何监视和控制 Azure 支出并优化资源使用。If you're new to Cost Management, read What is Azure Cost Management? to learn how it helps monitor and control Azure spending and to optimize resource use.