How to Define a Whole GPU Cost Model
This procedure registers NVIDIA whole-GPU allocation and project-quota usage as billing items. It does not measure GPU utilization percentage.
TOC
What this configuration provides1. Create the recording rule2. Create the collection configuration3. Create the display configuration4. Add prices to the cost model5. Verify the resultWhat this configuration provides
- Allocation: one allocated GPU UUID is counted as one GPU, then accumulated as GPU-hours.
- Project quota (optional): the project's
requests.nvidia.com/gpuhard quota can be accumulated as GPU-hours when project-quota billing is required. - Model pricing: allocation records retain
modelName, so different GPU models can have different prices. - Project-quota pricing: quota records do not contain a GPU model, so use one project-level base price.
1. Create the recording rule
Where to apply this configuration
Before applying it, confirm that the GPU exporter target is healthy and that its source metric has UUID, modelName, and namespace labels.
The first rule emits one value-1 series for each allocated GPU UUID. The second rule emits the project's GPU quota. The second rule is optional: remove it and the matching project-quota collection and display entries when project-quota billing is not required. Replace the source expressions if the exporter or quota metric has different names in your environment.
Verify the rules in Prometheus:
Both queries must return the expected non-empty series before continuing.
Confirm that the GPU exporter target is healthy in the active Prometheus instance before troubleshooting the recording rule.
2. Create the collection configuration
Where to apply this configuration
Apply this ConfigMap in the GPU cluster where the Cost Management Agent runs.
The label_ prefix is required in the Prometheus label source. Cost Management stores label_modelName as the billing label modelName.
After applying the ConfigMap, reload the Cost Management Agent so it reads the new collection configuration:
3. Create the display configuration
Where to apply this configuration
Apply this ConfigMap in the Global cluster where the Cost Management Server runs.
After applying the ConfigMap, reload the Cost Management Server so it reads the new display configuration:
4. Add prices to the cost model
In the platform console, open Metering and Billing > Cost Models and create or edit the cost model linked to the GPU cluster.
Add the following billing items:
Project Quota is optional. Add this method only when project-quota billing is required. Project Quota data has no GPU model dimension, so do not configure modelName price overrides for this method.
For model-specific allocation prices, add a label override:
The label value is case-sensitive. Confirm it with:
5. Verify the result
Wait for at least one hourly billing window and allow the collection and billing processes to finish. Verify the result in this order:
- Usage: confirm that the GPU usage record exists for the expected cluster, namespace, and GPU UUID.
- Bill: confirm that a bill is generated from that usage record and that the expected price is applied.
- Console: confirm that the same item and amount appear in cost details and statistics.
Confirm that:
Allocation Usagecontains the allocated GPU UUID and, when available,modelName;Project Quotacontains the project and cluster dimensions;- the expected model-specific price is applied to allocation records;
- project-quota records use the project-level base price.
For common issues, see FAQ.