In Apache CloudStack, Resource Limits allow administrators to enforce restrictions on key cloud resources such as Instances, public IPs, Volumes, Snapshots, and Storage. These limits help manage resource consumption across Domains and Accounts, promoting efficient use of infrastructure. Global default limits can be set or customized for specific Projects, Accounts, or Domains.
Additionally, tags can be assigned to infrastructure components like Hosts and Storage. These tags allow users to allocate resources based on performance or availability needs. With the introduction of Resource Limit Tags in CloudStack 4.20, Administrators can now define limits for specific tagged hardware, such as specialized Compute or Storage resources. This enhancement provides more precise control over resource allocations, especially for Domains and Accounts using specialized hardware, resulting in improved resource management and optimization.
Feature Description
Administrators can define Resource Limit Tags for Compute and Storage resources to manage their usage during resource reservation and allocation. Resource Limit Tags are particularly beneficial when a cloud infrastructure offers specialized hardware resources. This feature allows Administrators to set limits on these resources for both Domains and Accounts, ensuring more tailored resource control. Two global configurations are available:
Name | Description | Resource types supported |
resource.limit.host.tags | For compute or host tags. The global setting will accept a comma-separated list of tag strings. | user_vm, cpu, memory |
resource.limit.storage.tags | For storage tags. The global setting will accept a comma-separated list of tag strings. | volumes, primary_storage |
With Resource Limit Tags in place, it is essential for CloudStack Administrators to monitor the usage and capacity of specialized resources. The listCapacity API has been enhanced to return resource capacity details for specific tags. It provides critical information, including total, used, and allocated capacities, as well as the percentage used for resource types like CPU, memory, and storage. Both the API and UI now offer a comprehensive view of these tagged capacities, helping Administrators manage infrastructure effectively across Zones and Clusters.
For tracking usage across Domains and Accounts, the listDomains and listAccounts APIs have been updated to return tagged limits and usage. Additionally, the listResourceLimits API has been enhanced to provide tagged resource limits. The CloudStack UI now also allows viewing these limits and usage in the respective Domain or Account Limits tab.
Tagged limits for Domains and Accounts can be set using the existing updateResourceLimit API by specifying its new tag parameter. Similarly, the UI now allows Administrators to set both overall limits and tagged limits for compute and storage resource types. By default, tagged limits will inherit the same values as the overall limit for the corresponding resource types.
For accurate accounting of resource limits and usage, CloudStack must properly track tagged resources during reservation and allocation. Several improvements have been made, particularly around Resource Limit Tags and general tag functionality:
- updateResourceCount API now supports recalculating resource count for a specific tag.
- Template tags are more visible and now honoured by all Host allocators.
- listServiceOfferings API has been refactored to list suitable Offerings for a given Template. The Instance deployment wizard in the UI follows this behaviour.
- listDiskOfferings API has been updated to list suitable offerings for an Instance. The “Add Volume to Instance” form in the UI now lists only compatible offerings.
Changes have been added to control Admin operations (migration, deployment, scaling, etc.) when using Host tags, with new Global Settings parameter to control the strictness of Host tag enforcement.
Name | Description | Default value |
vm.strict.host.tags | A comma-separated list of tags which must match during operations such as modifying the Compute Offering for an Instance, and starting or live-migrating an Instance to a specific Host. | <EMPTY> |
To provide greater granularity and enforce strictness of Host Limit Tags for Instance operations, the following global configuration can be used:
Name | Description | Default value |
vm.strict.resource.limit.host.tag.check | If set to true, tags specified in `resource.limit.host.tags` must match during operations such as modifying the Compute Offering for an Instance, and starting or live-migrating an Instance to a specific Host. | true |
Conclusion
The hardware-specific resource limits and Resource Limit Tags, set to be introduced in Apache CloudStack 4.20 bring enhanced flexibility to resource management. Administrators can set granular resource limits for specialized hardware, improving the efficiency of resource allocation across Domains and Accounts. These new capabilities allow for better control and tracking of resource usage, ensuring optimized performance and management of infrastructure. With this feature, administrators can fully leverage CloudStack’s advanced resource management functionalities to streamline cloud operations.
Abhishek Kumar is a software engineer by profession. His personal interests and hobbies are technology, politics and sports. Abhishek is experienced in development and management of a variety of desktop and mobile applications. He has a particular interest in mobile application development, designing and developing highly interactive and intuitive mobile, desktop applications GUI.
Abhishek became part of ShapeBlue in 2019 and is currently an active Apache CloudStack Committer.
You can learn more about Abhishek and his background by reading his Meet The Team blog.