vSphere Cluster CPU Overcommit Ratio metrics have been around for years and can be found directly on Cluster Compute Resource object types.
As shown, Cluster CPU Overcommit Ratio is defined as follows:
Number of vCPUs allocated to powered on VMs / Number of physical CPUs (Cores)
I've created a Dashboard (and View) highlighting these metrics below.
As indicated, my Cluster CPU Overcommit Ratios are in fact vCPUs allocated to powered on VMs / Physical CPU Cores on ESXi Hosts
1487 / 468 = 3.18
287 / 168 = 1.71
54 / 72 = .75
...
But what if Hyperthreading is enabled on the ESXi Hosts? Well, the amount of extra CPU that gives you is debatable but for for the sake of this exercise, we'll just assume it doubles. What does that do to my Cluster CPU Overcommit Ratio?
We can recalculate a new Cluster CPU Overcommit Ratio by taking 2x the number of Physical CPU Cores on ESXi Hosts and using that in our conversion. I've done this via a Super Metric that looks like this, it's the one called cluster_overcommit_ratio_v3.json, available on GitHub here.
count({Host System: Configuration|Hyperthreading|Active, depth=1, where=($value equals 'true')}) > 0 ? {This Resource: cpu|vcpus_allocated_on_all_powered_on_vms}/({This Resource: cpu|corecount_provisioned}*2) : ({This Resource: cpu|vcpus_to_cores_allocation_ratio})
It's an if/then Super Metric that goes like this:
if Hyperthreading is Active on an ESXi Host in the Cluster (I assume it's Active for all)
then
Cluster CPU Overcommit Ratio = vCPUs allocated on all powered on VMs / (Physical CPU Cores on ESXi Hosts x 2)
else
Cluster CPU Overcommit Ratio = vCPUs allocated on all powered on VMs / Physical CPU Cores on ESXi Hosts
Enabling this Super Metric on the Cluster Compute Resource and using in our previous Dashboard (and View), now looks like this.
You'll notice the newly calcuated Cluster CPU Overcommit Ratios for Clusters with ESXi Hosts that Hyperthreading is Active on, are now half what they were previously. Adjust the Super Metric multiplier however you'd like in your environment.