Resource Limits

The resource limits feature provides a way to limit underlying hardware resources that a user can consume on a multi-user CML instance. You can apply resource limits to restrict the usage of one or more of the following resources:

Resource

Description

Node licenses

The number of running nodes that count toward the licensed node limit

Memory usage

The total nominal memory usage (in megabytes)

CPU usage

The total nominal CPU usage (in number of vCPU cores)

External connectors

The specific external connectors that may be used

To limit resource usage in CML, you must create resource pools and assign some or all of your CML server’s users to them. In each resource pool, you can configure a limit for each of the resources above or leave it unlimited. If a particular resource’s limit is not set, then it has no restriction. For example, you can create a resource pool that restricts memory and CPU usage but leaves external connectors and node licenses unlimited.

You can configure each user to be a member of at most one resource pool. If the user is not associated with a resource pool, then the user is not restricted by any resource limits. If a user is associated with a resource pool, then CML will enforce the limits associated with that resource pool whenever the user starts a lab or a node in a lab.

If a user is a member of a resource pool, when he starts a node, CML checks to see whether the resource pool has sufficient resources available for the new node. If adding the node’s resources to the current totals would exceed any of the resource limits on the resource pool, then CML will not start the node. If the node can be started, it is associated with the resource pool, and the nominal resources for that node are counted toward the resource pool’s current usage. If multiple users are associated with the same resource pool, the resources used by nodes that were started by all of those users are counted toward the resource pool’s resource limits. When a user stops a node, if the node is associated with a resource pool, the nominal resources for that node are returned to the resource pool.

It is important to understand that the resource pool is not a resource reservation. There is no guarantee that the resources associated with a resource pool will be available on the CML instance. The resource pool simply limits what resources can be consumed by the nodes that are started by the users who are associated with the resource pool. For example, if your system has 96 vCPU cores, you could create two resource pools that have the CPU limit set to 60 and 50, respectively. Let’s say that the users in the first resource pool are running enough nodes to consume 60 vCPU cores, the maximum limit for the resource pool. Until some of those nodes are stopped, the users in the other resource pool will only be able to use 36 vCPU cores even though their resource pool has a CPU limit of 50.

Tip

When a user starts a node, the node itself is associated with the user’s current resource pool. If the user is a member of Pool-1 and then moved to Pool-2, any nodes that they have running will continue to be associated with Pool-1 until the nodes are stopped.

Before creating a resource pool, you must create at least one resource pool template. All resource pools are based on a resource pool template. By default, the resource pool inherits all of its limits from the associated resource pool template, but you can also set the limits on the resource pool itself. The resource limits configured directly on the resource pool override the limits configured on the associated resource pool template.