- Overview
- Product Documentation
- CML 2.6 Release Notes
- CML 2.6 Installation Guide
- CML 2.6 User Guide
- CML 2.6 Admin Guide
- CML Administrator's Guide
- Cisco Modeling Labs System Overview
- System Defaults
- Creating a New Node Definition
- Custom VM Images
- Clustering
- CML Admin Tools
- System Settings
- Networking
- Resources
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.
If a different user starts a stopped node in a shared lab, the node will be associated with that user’s resource pool, or no pool if the user is not associated with any pool either. There is no way for a user or administrator to move a started node between pools, or to start a node in a pool other than their own.
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.
External Connectors in a Resource Pool¶
A user pool may be used to limit which external connectors may be used by the associated users. In a lab, an external connector node is associated with a bridge created in the CML controller host. If a user’s pool does not allow a given bridge, then the user’s attempt to start the node will fail.
By default, the value is unset, and there are no limitations present, and each pool allows all external connectors. Otherwise, the value is an allow list of bridge device names. The items in the list need not represent actual bridges that exist on the host - they may identify both envisioned bridges that never existed or bridges that no longer exist.
Unlike other resources covered by resource pools, a list set in the pool template is taken into consideration even if a user pool also sets its own value, with the effective allow list being the combination of the two. The user pool cannot remove bridge names that the template already allows, only add to it or keep it the same. If the resulting list is set but empty, then the user cannot start any external connector nodes at all.