이 콘텐츠는 선택한 언어로 제공되지 않습니다.
Chapter 2. Calculating effective usage with cost models
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
- You must be a user with Cost Administrator or Cost Price List Administrator permissions. To learn how to configure user roles, see Limiting access to cost management resources in Getting started with cost management
- You must add your OpenShift cluster as a cost management data integration. For more details, see Integrating OpenShift Container Platform data into cost management in Getting started with cost management.
Procedure
- Log in to Red Hat Hybrid Cloud Console.
-
From the Services menu, click
. -
In the Global Navigation, click
. - In the Cost Models tab, click to open the cost model wizard.
- Enter a name and description for the cost model and select OpenShift Container Platform as the integration type. Click .
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.
To create a price list to calculate effective CPU usage, click
.-
Add a description. In this example, enter
effective cpu usage
. - In the Metric field, select CPU.
- In the Measurement field, select Effective-usage (core-hours).
-
In the Rate field, enter the rate you pay for CPU usage. In this example, enter
2
. Click .
-
Add a description. In this example, enter
To create a price list to calculate effective memory usage, click
.-
Add a description. In this example, enter
effective memory usage
. - In the Metric field, select Memory.
- In the Measurement field, select Effective-usage (GiB-hours).
-
In the Rate field, enter the rate you pay for memory usage. In this example, enter
1
. Click .
-
Add a description. In this example, enter
- Click .
- (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.
- 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 .
- Assign an integration to your cost model and then click .
- Review the details and then click .
-
To review the results of your cost model on a integration, in the Global Navigation, click
. - Select a project and view the results.