Skip to content

Cluster Dynamic Resource Oversubscription

At present, many services have peak and off-peak periods. To ensure the performance and stability of a service, resources are usually requested based on peak demand when the service is deployed. However, the peak period may be very short, causing resources to be wasted during off-peak periods. Cluster resource oversubscription makes use of these requested-but-unused resources (that is, the difference between the requested amount and the used amount), thereby improving cluster resource utilization and reducing resource waste.

This document mainly describes how to use the cluster dynamic resource oversubscription feature.

Prerequisites

Enable Cluster Oversubscription

  1. Click Cluster List in the left navigation bar, and then click the name of the target cluster to enter the Cluster Details page.

    Cluster List

  2. On the cluster details page, click Operations and Maintenance -> Cluster Settings in the left navigation bar, and then select the Advanced Settings tab.

    Advanced Settings

  3. Turn on cluster oversubscription and set the oversubscription ratio.

    • If the cro-operator plugin is not installed, click the Install Now button. For the installation procedure, refer to Manage Helm Apps.
    • If the cro-operator plugin is installed, turn on the cluster oversubscription switch and you can start using the cluster oversubscription feature.

    Note

    You need to add the following label to the corresponding namespace under the cluster for the cluster oversubscription policy to take effect.

    clusterresourceoverrides.admission.autoscaling.openshift.io/enabled: "true"
    

    Cluster Oversubscription

Use Cluster Oversubscription

After the cluster dynamic resource oversubscription ratio is set, it takes effect when workloads are running. The following uses nginx as an example to verify the resource oversubscription capability.

  1. Create a workload named nginx and set the corresponding resource limits. For the creation procedure, refer to Create a Stateless Workload (Deployment).

    Create a Workload

  2. Check whether the ratio of the Pod resource request value to the limit value of the workload matches the oversubscription ratio.

    Check Pod Resources

Comments