VMware Cloud Community
MSpriya
Contributor
Contributor

Determine whether a resource pool has sufficient resource for a set of VMs demanding N vCPUs

Is there any PowerCLI command which will return how much CPU resources are available in a particular resource pool in terms of number of vCPUs? Or whether a resource pool has sufficient CPU resources for a set of VMs that need N vCPUs?

0 Kudos
5 Replies
LucD
Leadership
Leadership

Not sure exactly what you want to do.

A Resourcepool uses (abstract) shares to distribute resources between resourcepools.

A 2nd characteristics of a resourcepool is how many of the resources you want to Reserve for a resourcepool.

For CPU resources that is expressed in MHz, not number of vCPU.

You can calculate on the cluster-level how many slots (CPU & memory) are in theory available.

But there you can, and most probably should, use over-commitment.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
MSpriya
Contributor
Contributor

The requirement is to first check compute capacity of resource pool before powering-on a set of VMs. Get-VM returns the number of vCPUs configured for a VM. As you had mentioned, resource-pool compute capacity is in terms of MHz. Is there a way to compare these two quantities?

Also when you say over-commitment, what is the recommended limit for over-committing both memory and CPU resources. In case of CPU, is there a way to determine number of vCPUs allowed depending on number of logical processors or maximum compute capacity of resource pool in terms of MHz?

0 Kudos
LucD
Leadership
Leadership

Note that the CPU value on a resourcepool is the Reservation value.

That is not necessarily what is actually used by VMs in that resourcepool.

There are, imho, no rules of thumb for over-committing.

You have to determine that yourself for your unique workload.

That's why measuring and monitoring is a important part of managing a vSphere environment.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
MSpriya
Contributor
Contributor

Thanks LucD for the information.

I understand that at resource pool level we cannot determine if the compute capacity available is sufficient or not.

Is there a way to find the available compute/memory capacity atleast from cluster level? Given a set of VMs, I want to first determine if sufficient CPU/memory resources are available in cluster before powering them on. Can you please suggest a way to achieve this?

0 Kudos
LucD
Leadership
Leadership

For a cluster you can find the CPU and memory that is available.

If you know the CPU and memory specs for the VMs to be added, you could check if there are sufficient available resources.

But this is a very simplified test, and doesn't take over-commitment into account.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos