Home > Blogs > VMware Support Insider


Multicore your vCPUs

Hello again everyone and welcome to my sixth post in our series The Support Outsider, a look into VMware from the point of view of an outsider (that's me), Intern Moses Masih.

Moses MasihThis week was busier than usual but I did come across a cool feature which you can try for your virtual machines. I want to talk about turning single core virtual machines into multicore machines in vSphere and Workstation.

While working on a new video that deals with setting cores in a virtual machine: Setting the number of cores per CPU in a virtual machine (1010184) so that its operating system can recognise the machine as having multi-core CPUs, I found that this process can be used in vSphere and Workstation 8. I tried it and set my single core virtual machines to 4-core machines and also came across some useful details that I will talk about. 

For ESXi 4 and 5 virtual machines the number of cores can be set up with vSphere and the process to do this is explained nicely in the above mentioned article. The article is a good read and will really help you understand the concepts of multi core vCPUs in virtual machines. I recommend reading and understanding the article before performing the steps.

For virtual machines I created in VMware Workstation: Creating virtual machines in VMware Workstation (1018415), the cores can be set by simply going into the virtual machine settings and clicking on processors. There you will see options to change the number of processors as well as the number of cores per processor for you virtual machine.

After restarting my virtual machines, I did not notice a huge difference in speed, but I think that is for two reasons. The application that I am using inside the vm is not very CPU intensive. Another reason I learned is that if your application is very disk intensive, then it doesn't matter how powerful you make your CPU, the disk is what is slowing you down.

When setting the cores for your virtual machines, one of the important issues that came up is that you could end up violating the license of the guest operating system on your virtual machine. You should always check if the new setting are in compliance with your operating systems EULA (End-user license agreement).

Be sure to come back next week to check on my adventures as I go exploring the world of virtualization more.  Thanks for your time.

3 thoughts on “Multicore your vCPUs

  1. Hi, we have around 15 development server. Usually, we followed the recommendation regarding using 1 vcpu per virtual machine. Nevertheless, the host (with 2 quad cores cpus) was always extremely ‘light’ using not more than 20% of the total mhz available.
    Based on that, we decide to add a second VCPU to our virtual machines. We tested it and the web servers response was much better (30% to 40%) better response time.
    The question here is, do you think it will be better to have a 2 vcpu VM or 1 VCPU with 2 cores?

  2. You’d have to test it both ways to be sure. My gut feeling is that probably 1 vCPU with 2 cores will be faster, as cache locality of data will be better. I’m assuming that in a web server, a lot of the requests from different threads will be for the same data.
    On the other hand, if your host ever becomes more heavily loaded, having to schedule both vCPU’s on the same physical core might cause your “Cpu Ready” stats to go up, as it would make it more difficult for the hypervisor to schedule cpu cycles for the vm.

  3. In both cases the vmkernel will schedule 2 ‘cores’ to run. They are scheduled the same way in both scenarios. The corespersocket should only affect the way the GOS sees them (mostly for licensing or other limitations – eg Win2003 Std only supports 2 sockets so to provide 4 cpus worth of power give it 4vcpus but present them as 2×2 cpus to the GOS)