Last week I received a very strange customer inquiry in which they would like to limit the number of physical CPU sockets seen by ESXi. As you can imagine, my interest was piqued as this is usually not the type of request you hear from customers looking to actively reduce the overall computing power of their underlying hardware, especially if they have paid for it. After digging into the details a bit more, it turns out this is related to licensing.

The customer is running an application on a VM which is licensed by the total number of underlying physical CPU sockets of the server, regardless if they are actively being used by the application or not. The vendor shall be left nameless but I am sure some of you can make some educated guesses 🙂 The customer was in the process of performing a hardware refresh where they would be moving from a 4 socket CPU to an 8 socket CPU and they would be negatively impacted by this change from a licensing standpoint. I can understand their concerns, they have now just doubled their application licensing cost without actually benefiting from the actual hardware update.

Unfortunately, after a bit more research, I found that it is not possible to reduce or limit the number of physical CPU sockets from ESXi. The only capability that we do have today around this topic is to limit the number of Logical CPUs that ESXi can see. This capability is exposed as an ESXi Advanced Setting called VMkernel.Boot.maxPCPUS and by default, this is set to unlimited as you would expect. What this setting does is takes the total number of logical CPUs that you wish to expose to ESXi and then evenly distributes that across your physical CPU Sockets as best as it can.

You can change this setting using a variety of methods including the vSphere Web Client, vSphere C# Client, ESXi Embedded Host Client, vSphere API which includes ESXCLI & PowerCLI. One alternative which I have seen some postings online about which is the ability to turn off specific CPU sockets for certain hardware platforms by using the system BIOs, having said that, I have not actually seen any real confirmation that this is in fact possible.

Below are screenshots using the vSphere C# & ESXi Embedded Host.


If you prefer to to use the CLI either locally or remotely, you can run the following ESXCLI commands:

List the current configurations

esxcli system settings kernel list -o maxPCPUS

Set a new configuration

esxcli system settings kernel list -s maxPCPUS -v 4


13 thoughts on “How to limit the number "Logical" CPUs in ESXi?

  1. Let me guess. The licensing trouble starts with Ora and ends with Cle. I’d say if you ask them this, they will say using that parameter is not a valid approach to reduce the number of licensed CPUs. (Unless their own virtualization platform is used, in which case using a parameter like this would be no problem, of course.)

  2. Interesting, although the one company that I’ve had core count issues with would do a CPU ID and charge you based upon the number of cores associated with the CPU ID showed.

    Also, on most of the tier one systems in the server bios there’s a way to disable cores (All, X, … 8,6,4,2,1).

    • Gabe,

      I can’t comment on what would be considered support from a licensing perspective for other vendors. Ultimately, what is accepted in the license agreement is going to be between the customer and the vendor to agree upon.

  3. I don’t know why but in my environment it limits Logical Porcessor not physical one. I have 2 PCPUs, 14 core each. 56 logical processors. When I set VMkernel.Boot.maxPCPUS 1 it boots with: 1PCPU, 1 core, 1 logical. When I set it up to 28 than the host boots with: 2 PCPUs, 7 cores and 28 logical…

    • Yes, I’m getting the same behavior. The setting seems to be for logical processors and not physical.

  4. So they updated their hardware from 4 to 8 CPU but limit it to 4.
    Could you explain the value added of doing so?
    Thank you

  5. The title of this page is somewhat deceiving. In my testing on a DL360 G8 2 socket/8 core/32 logical proc server, it appears that the variable VMkernel.Boot.maxPCPUS controls logical cpus, not physical sockets. If the value is changed to 1, then you will end up with 1 socket and only 1 core & 1 logical proc. If you change the value to 2, you will then have 1 socket, 1 core, 2 logical procs. Change to value 4 and results are 2 sockets / 1 core and 4 logical. VMware licensing looks at the number of processor sockets. The ultimate goal here would be to limit the host to 1 socket / 8 core / 16 logical without physically pulling the second CPU. If this is possible, please chime in with the details. Thanks!!

    • Jeff and uki, i also went for this and ended up in very same conclusion. This setting does not impact physical CPU as the setting implies (PCPU). Reducing logical processors through maxPCPU:s by half probably reduces the computing resources by half as effectively as removing a physical CPU but I want to reduce amount of Processor sockets is shown to ESXi.

      Did you ever find a solution to this? I have trying to achieve this goal without physical intervention to the server itself. Please let me know if this is possible by a setting.

      The value added I am pursuing is the flexibility in licensing.
      -With 2 vmware CPU licenses I can have 2 hosts in redundant setup.
      Another scenario is migration from one site to another.
      -With 4 vmware CPU licenses I could create a ESXi setup in another location and keep both source and target site redundant.
      I know there is trial period but by reducing the amount of sockets I am not limited to a time frame.
      -And the third value added is that I can do all this without travelling to distant sites to physically remove and reattach physical CPU:s.
      -fourth value added comes from Veeam that uses Physical hypervisor CPUs for licensing.
      In large migration procedures this kind of flexibilty is valuable.

      a side note:
      Reducing PCPU is not reducing available memory.


  6. Folks,

    Apologies for the delayed reply. Jeff and others, you are correct that this does not affect the physical CPU socket but rather the logical CPUs. This was my mistake and after reaching out to a few folks, I received confirmation that limiting the CPU socket is not possible. As Jeff said, the only viable option today is to physically remove the CPU. Sorry for the confusion. I’ve gone and edited the article (title+content)

Thanks for the comment!

This site uses Akismet to reduce spam. Learn how your comment data is processed.