Use HAMi vGPU ResourceQuota in Alauda Container Platform

Use Alauda Container Platform to configure HAMi vGPU quotas at both the project level and the namespace level. The platform manages project quotas as a project-level ProjectQuota: the sum of namespace ResourceQuota values inside the project must stay within the project's configured limits.

HAMi extended quotas are displayed in Alauda Container Platform after the HAMi extended resource ConfigMaps are created on the GPU cluster. If HAMi NVIDIA is not displayed in the quota type list, check that Alauda Build of Hami is installed and that the extended resource ConfigMaps from the installation guide have been applied.

Prerequisites

  • Alauda Build of Hami is installed on the target workload cluster.
  • The HAMi extended resource ConfigMaps are created in the GPU cluster.
  • You have permission to create a project or update project quotas in Alauda Container Platform.
  • The target project is associated with the GPU cluster where HAMi resources are available.

HAMi vGPU quota fields

Use the following fields whenever the platform asks you to configure the HAMi NVIDIA quota type:

FieldResource keyUnitDescription
gpu numbernvidia.com/gpualloccountNumber of physical GPUs reserved by the quota. When a workload requests GPU cores and memory, the core and memory values are counted per physical GPU.
vgpu coresnvidia.com/gpucoresintegerGPU compute quota. 100 means the full compute power of one physical GPU.
vgpu memorynvidia.com/gpumemMiGPU memory quota per physical GPU.

Configure project-level HAMi vGPU quotas

Project quota is the upper bound for all namespace quotas in that project.

When creating a project

  1. In Alauda Container Platform, go to Administrator -> Project Management.
  2. Click Create Project.
  3. Fill in the project information, then select the GPU cluster that provides HAMi resources.
  4. Click Next to open the project quota setting step.
  5. In the selected cluster, add an extended quota.
  6. Set the quota type to HAMi NVIDIA.
  7. Fill in gpu number, vgpu cores, and vgpu memory.
  8. Review the quota values, then create the project.

For an existing project

  1. In Alauda Container Platform, go to Administrator -> Project Management.
  2. Open the target project detail page.
  3. Update the project quota for the GPU cluster associated with the project.
  4. Add or edit the extended quota type HAMi NVIDIA.
  5. Set gpu number, vgpu cores, and vgpu memory, then save the change.

Configure namespace-level HAMi vGPU quotas

Namespace HAMi vGPU quotas are consumed from the project quota assigned to the same cluster. If the remaining project quota is insufficient, the platform rejects the namespace quota creation or update.

When creating a namespace

  1. Open the target project in Alauda Container Platform.
  2. Click Create Namespace.
  3. Fill in the namespace information.
  4. In the Resource Quota section, find the hardware accelerator or extended resource quota area.
  5. Add an extended resource quota and set the quota type to HAMi NVIDIA.
  6. Fill in gpu number, vgpu cores, and vgpu memory.
  7. Save the namespace.

For an existing namespace

  1. Open the target project in Alauda Container Platform.
  2. Open the target namespace detail page.
  3. Edit the namespace Resource Quota.
  4. Add or edit the extended quota type HAMi NVIDIA.
  5. Set gpu number, vgpu cores, and vgpu memory, then save the change.

View quota usage in Alauda Container Platform

After HAMi vGPU quotas are configured, you can check quota usage and allocation from multiple pages in Alauda Container Platform:

  • On the project details page, the Quota table shows the project-level quota. For HAMi resources, the table can show Utilization and Quota Rate; Utilization represents used quota over total quota, while Quota Rate represents allocated quota over total quota.
  • On the namespace details page, the Resource Quotas table shows namespace-level information such as Allocated, Quota, and Quota Rate.
  • On the namespace-scoped Overview page in the business view, the Resource Quotas card can show the current namespace quota and allocation rate.

Use these pages to check whether gpu number, vgpu cores, and vgpu memory are close to their limits before creating or scaling applications.

Enforcement behavior for HAMi vGPU quotas

HAMi vGPU quota enforcement is different from the standard Kubernetes ResourceQuota admission behavior.

  • For standard Kubernetes resource quotas, a request that exceeds quota is usually rejected before the Pod is created.
  • For HAMi extended quotas in Alauda Container Platform, quota feasibility is evaluated by hami-scheduler during scheduling.

In current product behavior, if an application requests HAMi resources that exceed the remaining namespace quota, the Pod object may still be created first and stay in Pending state, with an insufficient quota or scheduling failure message from the HAMi scheduler. This behavior is consistent with HAMi's scheduler-side quota calculation model.

Troubleshooting

  • If HAMi NVIDIA is not available in the quota type list, reapply the HAMi extended resource ConfigMaps on the GPU cluster.
  • If namespace quota creation or update fails, check whether the requested namespace quota would exceed the remaining project quota for the same HAMi resource.
  • If a Pod is created but stays in Pending, check the scheduling events from hami-scheduler and verify that the namespace still has enough gpu number, vgpu cores, and vgpu memory quota.
  • If workloads still cannot be scheduled after the project quota is updated, check the namespace ResourceQuota, workload resource requests, and actual GPU capacity in the target cluster.