搜索

此内容没有您所选择的语言版本。

Chapter 2. Calculating effective usage with cost models

download PDF

Cloud providers charge for the infrastructure costs of running a cluster, regardless of your overall usage. By calculating the effective usage in cost management, you can more accurately correlate cloud costs with a pod or namespace by considering their direct utilization.

A pod typically requests resources, such as CPU or memory, from a cluster. The cluster then reserves these requested resources as a minimum, but the pod might use more or less than it initially requested. The effective usage metric in cost management uses whichever kind of usage, CPU or memory, is greater per hour.

You can create a cost model in cost management to estimate your effective usage. Ultimately, you can use this data to understand how infrastructure cost is distributed to your OpenShift project.

Prerequisites

Procedure

  1. Log in to Red Hat Hybrid Cloud Console.
  2. From the Services menu, click Spend Management Cost Management.
  3. In the Global Navigation, click Cost Management Settings.
  4. In the Cost Models tab, click Create cost model to open the cost model wizard.
  5. Enter a name and description for the cost model and select OpenShift Container Platform as the integration type. Click Next.
  6. Create a price list so that you can assign rates to usage or requests. The cost management service collects these metrics from OpenShift but there is no cost attached to them in cost management until you apply a cost model.

    1. To create a price list to calculate effective CPU usage, click Create rate.

      1. Add a description. In this example, enter effective cpu usage.
      2. In the Metric field, select CPU.
      3. In the Measurement field, select Effective-usage (core-hours).
      4. In the Rate field, enter the rate you pay for CPU usage. In this example, enter 2. Click Create rate.
    2. To create a price list to calculate effective memory usage, click Create rate.

      1. Add a description. In this example, enter effective memory usage.
      2. In the Metric field, select Memory.
      3. In the Measurement field, select Effective-usage (GiB-hours).
      4. In the Rate field, enter the rate you pay for memory usage. In this example, enter 1. Click Create rate.
  7. Click Next.
  8. (Optional) On the Cost calculations page, apply a markup or discount to change how raw costs are calculated for your integrations. Adding a markup to your raw costs can allow you to account for your overhead costs, such as the cost of administering your AWS account, Azure subscription, or other support costs. A markup is an estimation to cover your costs not shown by metrics or usage.
  9. On the Cost distribution page, select the CPU or Memory distribution type. The distribution type distributes costs based on CPU or memory metrics in project cost breakdowns. If your cluster has high memory usage, select Memory. If your cluster has high CPU usage, select CPU. Click Next.
  10. Assign an integration to your cost model and then click Next.
  11. Review the details and then click Create.
  12. To review the results of your cost model on a integration, in the Global Navigation, click Cost Management OpenShift.
  13. Select a project and view the results.
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.