Dashboard – Host vCPU to Core Allocation Ratio

With the release of the vRealize Operations Manager 7.0, VMware has changed the capacity planning behavior of the product. The vRealize Operations Manager 7.0 does not anymore make the Host vCPU to Core Allocation Ratio visible for the user.  I know that Host vCPU to Core Allocation Ratio is with vSphere 6.5 and newer not anymore a valid capacity planning indicator but in my opinion, it`s still an interesting SLA.

To learn more about CPU Metrics and Performance SLAs, Iwan ‘e1’ Rahaboks Blog Posts are a good start:

If you want to deep dive into this Topic, the VMware vSphere 6.5 Host Resources Deep Dive from Duncan Epping and Niels Hagoort is a must read.

The vSphere Clusters (Cluster Compute Ressources) does have by default a metric called “vCPUs to Cores Allocation Ratio”. To use a similar Host-Level Metric in Dashboards and Alerts, I have created a new Super Metric:

Host vCPU to Core Allocation Ratio - Super Metric

As long as the Super Metric is enabled in your policies all hosts have the additional metric available:

Host vCPU to Core Allocation Ratio - Host Metrics

And also an Alert Definition with different symptoms based on the consolidation ration can be created with the additional host metric:

Host vCPU to Core Allocation Ratio - Alert Definition

Host vCPU to Core Allocation Ratio Dashboard

The dashboard I have created has three widgets: The list if vSphere Clusters as Object List,  vCPU to Core Allocation Ratio as Top-N and the vCPU to Core Allocation Ratio / CPU Usage as a Heatmap.

The Object List is the provider for other widgets, but the Heatmap also works without a selected Object:

Host vCPU to Core Allocation Ratio Dashboard - Interaction

Host vCPU to Core Allocation Ratio Dashboard - Heatmap

If a vSphere Cluster is selected from the Object list the whole Dashboard looks like that:

Host vCPU to Core Allocation Ratio Dashboard

Download the dashboard

The Super Metric and the Dashboard are both available on the VMware {code} Example Exchange.

Super Metric

The Super Metric as JSON export:

{
  "374218b5-714e-48a7-af30-a86d58d9716f": {
    "resourceKinds": [
      {
        "resourceKindKey": "HostSystem",
        "adapterKindKey": "VMWARE"
      }
    ],
    "modificationTime": 1541600267060,
    "name": "vCPU to Core Allocation Ratio",
    "formula": "${this, metric=summary|number_running_vcpus}/${this, metric=cpu|corecount_provisioned}",
    "description": ""
  }
}

Dashboard

The Dashboard as JSON export:

{
   "dashboards": [{
      "autoswitchEnabled": false,
      "columnCount": 1,
      "columnProportion": "1-1",
      "creationTime": 1543916157253,
      "dashboardNavigations": {},
      "description": "",
      "disabled": false,
      "gridsterMaxColumns": 12,
      "hidden": false,
      "homeTab": false,
      "id": "ba982c2c-256a-4e90-a96e-ffbfd3d0e1d5",
      "importAttempts": 0,
      "importComplete": true,
      "isDefault": false,
      "locked": false,
      "name": "Host vCPU to CPU Allocation Ratio",
      "rank": 98,
      "shared": false,
      "temporary": false,
      "userId": "777dda8e-1653-4617-9827-0bfc5f3d49d7",
      "widgetInteractions": [
         {
            "type": "resourceId",
            "widgetIdProvider": "410a4bf1-7196-4661-8fde-328c9b047ccc",
            "widgetIdReceiver": "d739239b-4400-4ce5-89f0-e8ab5848be80"
         },
         {
            "type": "resourceId",
            "widgetIdProvider": "410a4bf1-7196-4661-8fde-328c9b047ccc",
            "widgetIdReceiver": "3fb4d660-66ef-41e7-9d77-bbf9a8a1155c"
         }
      ],
      "widgets": [
         {
            "collapsed": false,
            "config": {
               "additionalColumns": [],
               "mode": 0,
               "refreshContent": {"refreshContent": false},
               "refreshInterval": 300,
               "selectFirstRow": {"selectFirstRow": false},
               "tagFilter": {
                  "path": ["/source/kind/kind:resourceKind:id:0_::_"],
                  "value": {
                     "adapterInstance": [],
                     "adapterKind": [],
                     "bus": [],
                     "collector": [],
                     "day": [],
                     "exclaim": false,
                     "healthRange": [],
                     "kind": ["resourceKind:id:0_::_"],
                     "maintenanceSchedule": [],
                     "state": [],
                     "status": [],
                     "tag": [],
                     "tier": []
                  }
               },
               "title": "vSphere Cluster"
            },
            "gridsterCoords": {
               "h": 6,
               "w": 6,
               "x": 1,
               "y": 1
            },
            "height": 324,
            "id": "410a4bf1-7196-4661-8fde-328c9b047ccc",
            "states": [{
               "key": "permResGrid_widget_ba982c2c-256a-4e90-a96e-ffbfd3d0e1d5_410a4bf1-7196-4661-8fde-328c9b047ccc",
               "value": "o%3Acolumns%3Da%253Ao%25253Aid%25253Ds%2525253Ah1%25255Ehidden%25253Db%2525253A1%25255Ewidth%25253Dn%2525253A100%255Eo%25253Aid%25253Ds%2525253Ah2%255Eo%25253Aid%25253Ds%2525253Ah3%25255Ehidden%25253Db%2525253A1%25255Ewidth%25253Dn%2525253A100%255Eo%25253Aid%25253Ds%2525253Ah4%255Eo%25253Aid%25253Ds%2525253Ah5%255Eo%25253Aid%25253Ds%2525253Ah6%255Eo%25253Aid%25253Ds%2525253Ah7%25255Ehidden%25253Db%2525253A1%25255Ewidth%25253Dn%2525253A100%255Eo%25253Aid%25253Ds%2525253Ah8%25255Ehidden%25253Db%2525253A1%25255Ewidth%25253Dn%2525253A100%255Eo%25253Aid%25253Ds%2525253Ah9%25255Ehidden%25253Db%2525253A1%25255Ewidth%25253Dn%2525253A100%255Eo%25253Aid%25253Ds%2525253Ah10%25255Ehidden%25253Db%2525253A1%25255Ewidth%25253Dn%2525253A100%255Eo%25253Aid%25253Ds%2525253Ah11%25255Ehidden%25253Db%2525253A1%25255Ewidth%25253Dn%2525253A100%255Eo%25253Aid%25253Ds%2525253Ah12%25255Ehidden%25253Db%2525253A1%25255Ewidth%25253Dn%2525253A100%255Eo%25253Aid%25253Ds%2525253Ah13%25255Ehidden%25253Db%2525253A1%25255Ewidth%25253Dn%2525253A100%255Eo%25253Aid%25253Ds%2525253Ah14%255Eo%25253Aid%25253Ds%2525253Ah15%255Eo%25253Aid%25253Ds%2525253Ah16%25255Ehidden%25253Db%2525253A1%25255Ewidth%25253Dn%2525253A100%255Eo%25253Aid%25253Ds%2525253Ah17%25255Ehidden%25253Db%2525253A1%25255Ewidth%25253Dn%2525253A100%255Eo%25253Aid%25253Ds%2525253Ah18%25255Ehidden%25253Db%2525253A1%25255Ewidth%25253Dn%2525253A100%255Eo%25253Aid%25253Ds%2525253Ah19%25255Ehidden%25253Db%2525253A1%25255Ewidth%25253Dn%2525253A100%255Eo%25253Aid%25253Ds%2525253Ah20%25255Ehidden%25253Db%2525253A1%25255Ewidth%25253Dn%2525253A100%255Eo%25253Aid%25253Ds%2525253Ah21%25255Ehidden%25253Db%2525253A1%25255Ewidth%25253Dn%2525253A100%255Eo%25253Aid%25253Ds%2525253Ah22%25255Ehidden%25253Db%2525253A1%25255Ewidth%25253Dn%2525253A100%255Eo%25253Aid%25253Ds%2525253Ah23%25255Ehidden%25253Db%2525253A1%25255Ewidth%25253Dn%2525253A100%255Eo%25253Aid%25253Ds%2525253Ah24%25255Ehidden%25253Db%2525253A1%25255Ewidth%25253Dn%2525253A100%255Eo%25253Aid%25253Ds%2525253Ah25%25255Ehidden%25253Db%2525253A1%25255Ewidth%25253Dn%2525253A100%255Eo%25253Aid%25253Ds%2525253Ah26%25255Ehidden%25253Db%2525253A1%25255Ewidth%25253Dn%2525253A100%255Eo%25253Aid%25253Ds%2525253Ah27%25255Ehidden%25253Db%2525253A1%25255Ewidth%25253Dn%2525253A100%255Eo%25253Aid%25253Ds%2525253Ah28%25255Ehidden%25253Db%2525253A1%25255Ewidth%25253Dn%2525253A100%255Eo%25253Aid%25253Ds%2525253Ah29%25255Ehidden%25253Db%2525253A1%25255Ewidth%25253Dn%2525253A100%255Eo%25253Aid%25253Ds%2525253Ah30%25255Ehidden%25253Db%2525253A1%25255Ewidth%25253Dn%2525253A100%255Eo%25253Aid%25253Ds%2525253Ah31%25255Ehidden%25253Db%2525253A1%25255Ewidth%25253Dn%2525253A100%255Eo%25253Aid%25253Ds%2525253Ah32%25255Ehidden%25253Db%2525253A1%25255Ewidth%25253Dn%2525253A100%255Eo%25253Aid%25253Ds%2525253Ah33%25255Ehidden%25253Db%2525253A1%25255Ewidth%25253Dn%2525253A100%255Eo%25253Aid%25253Ds%2525253Ah34%25255Ehidden%25253Db%2525253A1%25255Ewidth%25253Dn%2525253A100%255Eo%25253Aid%25253Ds%2525253Ah35%25255Ehidden%25253Db%2525253A1%25255Ewidth%25253Dn%2525253A100%255Eo%25253Aid%25253Ds%2525253Ah36%25255Ehidden%25253Db%2525253A1%25255Ewidth%25253Dn%2525253A100%255Eo%25253Aid%25253Ds%2525253Ah37%25255Ehidden%25253Db%2525253A1%25255Ewidth%25253Dn%2525253A100%255Eo%25253Aid%25253Ds%2525253Ah38%25255Ehidden%25253Db%2525253A1%25255Ewidth%25253Dn%2525253A100%255Eo%25253Aid%25253Ds%2525253Ah39%25255Ehidden%25253Db%2525253A1%25255Ewidth%25253Dn%2525253A100%255Eo%25253Aid%25253Ds%2525253Ah40%25255Ehidden%25253Db%2525253A1%25255Ewidth%25253Dn%2525253A100%255Eo%25253Aid%25253Ds%2525253Ah41%25255Ehidden%25253Db%2525253A1%25255Ewidth%25253Dn%2525253A100%255Eo%25253Aid%25253Ds%2525253Ah42%25255Ehidden%25253Db%2525253A1%25255Ewidth%25253Dn%2525253A100%255Eo%25253Aid%25253Ds%2525253Ah43%25255Ehidden%25253Db%2525253A1%25255Ewidth%25253Dn%2525253A100%255Eo%25253Aid%25253Ds%2525253Ah44%25255Ehidden%25253Db%2525253A1%25255Ewidth%25253Dn%2525253A100%255Eo%25253Aid%25253Ds%2525253Ah45%25255Ehidden%25253Db%2525253A1%25255Ewidth%25253Dn%2525253A100%255Eo%25253Aid%25253Ds%2525253Ah46%25255Ehidden%25253Db%2525253A1%25255Ewidth%25253Dn%2525253A100"
            }],
            "title": "vSphere Cluster",
            "type": "ResourceList"
         },
         {
            "collapsed": false,
            "config": {
               "additionalColumns": [],
               "additionalColumns_resource": [],
               "barsCount": 10,
               "depth": 10,
               "filterMode": "tagFilter",
               "filterOldMetrics": {"filterOldMetrics": false},
               "metricOption": {
                  "metricInfo": {
                     "path": ["/source/GROUP_Super Metric/Super Metric|sm_374218b5-714e-48a7-af30-a86d58d9716f"],
                     "value": "Super Metric|sm_374218b5-714e-48a7-af30-a86d58d9716f"
                  },
                  "resourceKindId": ["resourceKind:id:1_::_"],
                  "tagFilter": null,
                  "value": {"metricOption": "metricsHighestUtilization"}
               },
               "mode": "metric",
               "refreshContent": {"refreshContent": false},
               "refreshInterval": 300,
               "regenerationTime": 15,
               "roundDecimals": 1,
               "selfProvider": {"selfProvider": false},
               "tagOption": {
                  "tagFilter": null,
                  "value": {"tagOption": "leastHealthyApplications"}
               },
               "title": "Top-N vCPU to CPU Allocation Ratio"
            },
            "gridsterCoords": {
               "h": 6,
               "w": 4,
               "x": 7,
               "y": 1
            },
            "height": 324,
            "id": "d739239b-4400-4ce5-89f0-e8ab5848be80",
            "title": "Top-N vCPU to CPU Allocation Ratio",
            "type": "ParetoAnalysis"
         },
         {
            "collapsed": false,
            "config": {
               "configs": [{
                  "attributeKind": {"value": ""},
                  "color": {
                     "maxValue": 8,
                     "minValue": 0,
                     "thresholds": {
                        "colors": [
                           "#00ff00",
                           "#888800",
                           "#ff0000"
                        ],
                        "values": [
                           0,
                           50,
                           100
                        ]
                     }
                  },
                  "colorBy": {
                     "metricKey": "Super Metric|sm_374218b5-714e-48a7-af30-a86d58d9716f",
                     "value": "Super Metric|vCPU to Core Allocation Ratio"
                  },
                  "focusOnGroups": true,
                  "groupBy": {
                     "id": "004null002006VMWAREClusterComputeResource",
                     "parentId": "VMWARE",
                     "parentText": "vCenter Adapter",
                     "text": "Cluster Compute Resource",
                     "type": "resourceKind",
                     "typeId": "resourceKind:id:0_::_"
                  },
                  "mode": {"mode": false},
                  "name": "Host System CPU Usage",
                  "relationalGrouping": false,
                  "resourceKind": "resourceKind:id:1_::_",
                  "sizeBy": {
                     "metricKey": "cpu|usagemhz_average",
                     "value": "CPU|Usage (MHz)"
                  },
                  "solidColoring": false,
                  "tagFilter": {
                     "path": ["/source/kind/kind:resourceKind:id:1_::_"],
                     "value": {
                        "adapterInstance": [],
                        "adapterKind": [],
                        "bus": [],
                        "collector": [],
                        "day": [],
                        "exclaim": false,
                        "healthRange": [],
                        "kind": ["resourceKind:id:1_::_"],
                        "maintenanceSchedule": [],
                        "state": [],
                        "status": [],
                        "tag": [],
                        "tier": []
                     }
                  },
                  "thenBy": null
               }],
               "refreshContent": {"refreshContent": false},
               "refreshInterval": 300,
               "title": "vCPU to CPU Allocation Ratio / CPU Usage",
               "value": 0
            },
            "gridsterCoords": {
               "h": 5,
               "w": 10,
               "x": 1,
               "y": 7
            },
            "height": 267,
            "id": "3fb4d660-66ef-41e7-9d77-bbf9a8a1155c",
            "states": [{
               "key": "perm_HeatMap_widget_ba982c2c-256a-4e90-a96e-ffbfd3d0e1d5_3fb4d660-66ef-41e7-9d77-bbf9a8a1155c",
               "value": "o%3A"
            }],
            "title": "vCPU to CPU Allocation Ratio / CPU Usage",
            "type": "Heatmap"
         }
      ]
   }],
   "entries": {"resourceKind": [
      {
         "adapterKindKey": "VMWARE",
         "internalId": "resourceKind:id:1_::_",
         "resourceKindKey": "HostSystem"
      },
      {
         "adapterKindKey": "VMWARE",
         "internalId": "resourceKind:id:0_::_",
         "resourceKindKey": "ClusterComputeResource"
      }
   ]},
   "uuid": "522638f3-9ee8-418a-93ef-df4f7cdbfa4d"
}

** Update – 12.10.2018

The Link of this blog post had two great responses on Reddit and I want to add them to the original article.

Ghan_04 was wondering about this statement that vCPU to Core Allocation Ratio not anymore a valid capacity planning indicator.

Ghan_04 is right, without context the statement is wrong. I wanted to highlight that a high vCPU to Core ratio is not in all environments a problem in general and there is no formula to calculate when CPU contention occurs. An indicator for CPU contention is, for example, a high %READY counter.

bpitts2 mentioned that I have used SLA in the wrong context.
And also bpitts2 is right. I missed mentioning that in my current environment the vCPU to Core ratio is a not only a KPI, it’s also an SLA for the infrastructure.

Share with:

Leave a Reply