# Capacity Management based on Business Policy – Part 3

Part 1 explained a new concept, where we use Contention as the basis of Capacity Management. Part 2 provided the super metric equation for each charts. Part 3 will provide example of the super metric formula and dashboard screenshots.

# Compute Tier 1 (no over-commit)

To recap, we are implementing the dashboard shown here. We need to create line charts showing the following:

1. The total number of vCPU left in the cluster.
2. The total number of vRAM left in the cluster.
3. Total number of VM left in the cluster.

The screenshot below shows the super metric formula to get the total number of vCPU left in the cluster. Copy-paste the formula below:

\${this, metric=cpu|alloc|actual.capacity} *
(

( \${this, metric=summary|number_running_hosts} 1 ) /
\${this, metric=summary|number_running_hosts}
)
\${this, metric=summary|number_running_vcpus}

In logic, the formula is Supply – Demand, where:

• Supply = No of Physical Cores in Cluster x ((No of Hosts – 1) / No of Hosts)
• Demand = No of running vCPU in cluster

I have to assume there is 1 HA host in the cluster. If you have 2, replace 1 with 2 in the formula above.

I have to calculate the supply manually as vRealize Operations does not have a metric for No of Hosts – HA. Actually, it does, but the metric cannot be enabled.

If you find the formula complex, you can actually split them into 2 super metrics first. Work out Supply, then work out Demand. Let me use the RAM as example.

The screenshot below shows the super metric formula to get the total RAM supply. It is the total RAM in the cluster, after we take into account HA. I have to divide the number by 1024, then again by 2014, to convert from KB to GB.

Notice I always preview it. It’s important to build the habit of always verifying that your formula is correct. Once the Supply side is done, I worked on the Demand side. Demand here does not refer to the Demand metric in vRealize or vCenter. It is simply the word Demand in dictionary, which is request/order/need/want. It’s demand in “supply & demand.” The following screenshot shows the demand. Once I verified that both are correct, it’s a matter of combining them together. You can copy paste the formula below:

(
\${this, metric=mem|alloc|actual.capacity} /1024 /1024 *
(
(
\${this, metric=summary|number_running_hosts} – 1 ) /
\${this, metric=summary|number_running_hosts} )
)
(

Sum (\${adapterkind=VMWARE, resourcekind=VirtualMachine, attribute=mem|guest_provisioned, depth=2}) /
1024/1024)

The screenshot below shows the super metric formula to get the total number of VM left in the cluster. I have to hardcode the maximum number that I allowed. Hope you find useful. In the next post, I cover the super metrics for Tier 2 & 3, and for Network.