The number of cores for my OpenShift cluster on console.redhat.com is higher than what it should be

Solution Verified - Updated

Environment

  • Red Hat OpenShift Cluster Manager (console.redhat.com)
  • OpenShift running on a hypervisor
  • Subscriptions based on 1 core 2vCPUs model

Issue

  • The number of cores for my OpenShift cluster on console.redhat.com is higher than what it should be
  • console.redhat.com reports core consumption double what it should be

Resolution

You need to alter the hypervisor so that the OS of the VMs sees vCPUs as grouped per core of at least 2.

OpenShift Cluster Manager (console.redhat.com) pulls telemetry information including the number of cores and vCPUs and meets the requirements of the subscriptions - so for subscriptions based on 1 core 2vCPUs, one is consumed per different core and groups of 2 vCPUs. If on your VMs you have 1 core 1vCPU that consumes one subscription.

This behaviour tends to happen when hyperthreading is involved and doesn't show as enabled on the VM level - and some popular hypervisors do not pass this to VMs.

You can check how the cores and vCPUs are spread using less /proc/cpuinfo ; here are a few examples

Single-processor, Single-core, HT :

processor       0 1
physical id     0 0
siblings        2 2
core id         0 0
cpu cores       1 1

this would consume one "1 core 2 vCPUs" subscription if a hypervisor is configured to present a VM's vCPUs in that manner.

Single-processor, Dual-core, non-HT

processor       0 1
physical id     0 0
siblings        2 2
core id         0 1
cpu cores       2 2

This would consume two "1 core 2 vCPUs" subscription if a hypervisor is configured to present a VM's vCPUs in that manner.

Take note of the "siblings" and "cpu cores" values, they are an indication of how the cores are spread, through you will also see that with vCPUs not sharing similar core IDs.

For a better experience with the subscription assignation, it is best to configure your hypervisor so that it groups vCPUs as your subscription is arranged.

Root Cause

The OpenShift VM reports each vCPU as being a different core.


This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.