With February’s Aria Automation launch the cloud administrator can now set values that control how resources like CPU, Memory and Storage are allocated for deployments for your entire organization.
While you can today use placement policies on cloud zones and in projects to control the distribution of workloads at deployment time, the methods presented here can be used to prevent overallocation and set limits at the organization level.
Please note that each of the resource checks described in this blog operate independently. They are not dependent on one another.
Prevent Resource Overallocation
To avoid deploying CPU, Memory and Storage resources that you cannot turn on, you can set the below global configuration property to TRUE.
PREVENT_COMPUTE_MEMORY_OVERALLOCATION
PREVENT_COMPUTE_CPU_OVERALLOCATION
PREVENT_COMPUTE_STORAGE_OVERALLOCATION
This change ensures that Aria Automation tracks how much Memory and Number of Virtual CPU Threads is allocated on each host or cluster and the Amount of Storage allocated on each datastore in terms of storage. It then uses that value to prevent provisioning to hosts or clusters or datastores that are fully utilized, preventing overallocation.
The allocated memory and CPUs is calculated by adding up all the managed virtual machines in the host or cluster and the allocated storage is calculated by summing the size of all the managed disks on the datastores. Virtual machines that were provisioned outside Aria Automation, discovered, but have not yet been onboarded are not counted.
Set Resource Allocation Limits
You can set a percentage value that is used as the maximum amount of Memory, Number of Virtual CPU Threads for a host or cluster or the maximum Amount of Storage for a datastore.
This value is the allocation limit with a 100 as the default value . You can set a conservative value of less than 100%. You can also set a value over 100% if you have a clear understanding of how your resources are allocated and want to fine tune the limit.
You can set a global limit property and a host, cluster-specific or datastore-specific limit property .
To set a global limit properties with a percentage value, you can use the following properties :
DEFAULT_MAX_ALLOWED_COMPUTE_CPU_ALLOCATION_PERCENT
DEFAULT_MAX_ALLOWED_COMPUTE_MEMORY_ALLOCATION_PERCENT
DEFAULT_MAX_ALLOWED_STORAGE_ALLOCATION_PERCENT
For the host, cluster-specific or datastore-specific limit property you will have to retrieve the host or cluster ID first then update the following properties accordingly with the percentage value you want :
"maximumAllowedMemoryAllocationPercent": 120
"maximumAllowedCpuAllocationPercent": 120
“maximumAllowedStorageAllocationPercent”:120
Any host, cluster-specific or datastore-specific value setting takes precedence over the global limit setting. This allows you to set a global default value and then set a more refined value for particular hosts, clusters or datastore if needed.
In this blog as an example, we will prevent Memory Overallocation by setting the required property to true and then go to set a global conservative Memory allocation limit value of 80% using Swagger in our Aria Automation (SaaS) organization, but before we do that we will need to do a few things first:
- Make sure you have an Organization Owner role and Cloud Assembly Administrator Service role.
- Need to generate an Authentication API Token (i.e. Refresh Token) within your account that includes as a minimum Organization Owner and Cloud Assembly Administrator. Blog
- Using the API Token you need to generate an Access Token. Documentation or Scripts
- Access Swagger using the link below and Login by clicking Authorize, pasting your Access Token in this this format
Bearer Access_Token
and clicking Authorize then execute the API call needed.
https://www.mgmt.cloud.vmware.com/iaas/api/swagger/ui/
Once you are authenticated in Swagger scroll down to and expand the Property section, Expand the PATCH API call and click Try it out
To prevent memory overallocation, pass the value as true and the key as PREVENT_COMPUTE_MEMORY_OVERALLOCATION then pass in the latest apiVersion “2021-07-15” and click Execute
Once the API call is executed and successful, you should should see a response with Code 200.
To set a global conservative Memory allocation limit value of 80%, pass the value as 80 and the key as DEFAULT_MAX_ALLOWED_COMPUTE_MEMORY_ALLOCATION_PERCENT then pass in the latest apiVersion “2021-07-15” and click Execute
Once the API call is executed and successful, you should should see a response with Code 200
For more information, please make sure to check the our documentation for more details on the new capacity allocation enhancements How to manage capacity for vRealize Automation
Now that you are aware of this new allocation enhancement allowing you to set values that control how resources like CPU, Memory and Storage are allocated for deployments for your entire organization, do you think its something that you will use right away and benefit from the control it provides in your environment ?
Let us know in the comments and thank you for reading, if you made it this far.
Until next time, Stay in control!
For more info or questions on this, reach out to Maher on Twitter