• Some users have recently had their accounts hijacked. It seems that the now defunct EVGA forums might have compromised your password there and seems many are using the same PW here. We would suggest you UPDATE YOUR PASSWORD and TURN ON 2FA for your account here to further secure it. None of the compromised accounts had 2FA turned on.
    Once you have enabled 2FA, your account will be updated soon to show a badge, letting other members know that you use 2FA to protect your account. This should be beneficial for everyone that uses FSFT.

Help me understand vCPUs

joshu

Limp Gawd
Joined
Aug 11, 2011
Messages
160
I've read that in the majority of cases one vCPU is the best practice. I have an Ubuntu Server 10.04 vm that I've setup to use HandbrakeCLI for encoding movies. I know that HandBrake is a multicore app and to speed up encoding I want to add more vCPUs.

The ESXi host has a physical Intel Xeon X3440 2.53GHz which is quadcore with HT.

When changing the virtual machine settings there are two related to CPU:

"Number of virtual sockets"

"Number of cores per virtual socket"

What should I think about when settings these options? Do I increase virtual sockets or cores or a combination of both? Although I have the option of selecting up to 8 sockets and 8 cores I guess that I have to remain with the spec of my physical CPU, right?

Finally, where should I look at the CPU usage: inside the vm using top, or on the esxi host?

Hopefully someone can make me wiser on setting appropriate CPU settings for vms ;)
 
The introduction of virtual sockets satisfies socket or licensing constraints with guest operating systems or applications.

Some applications are more expensive to license against multiple sockets vs no additional cost for multiple cores.

In your case, I don't think it will matter which route you take. The use of virtual sockets requires virtual SMP being supported on the guest OS (and your ESXi infrastructure needs to be licensed for it I believe).

Configuring Multicore Virtual CPUs

VMware multicore virtual CPU support lets you control the number of cores per virtual socket in a virtual machine. This capability lets operating systems with socket restrictions use more of the host CPU's cores, which increases overall performance.

Important

When you configure your virtual machine for multicore virtual CPU settings, you must ensure that your configuration complies with the requirements of the guest operating system EULA.

Using multicore virtual CPUs can be useful when you run operating systems or applications that can take advantage of only a limited number of CPU sockets. Previously, each virtual CPU was, by default, assigned to a single-core socket, so that the virtual machine would have as many sockets as virtual CPUs.

You can configure a virtual machine that runs on an ESXi host to have up to 32 virtual CPUs. A virtual machine cannot have more virtual CPUs than the actual number of logical CPUs on the host. The number of logical CPUs is the number of physical processor cores or two times that number if hyperthreading is enabled. For example, if a host has 32 logical CPUs, you can configure the virtual machine for 32 virtual CPUs.

You configure how the virtual CPUs are assigned in terms of sockets and cores. For example, you can configure a virtual machine with 12 virtual CPUs in the following ways:

¦ 12 virtual sockets with 1 core per socket

¦ 6 virtual sockets with 2 cores per socket

¦ 4 virtual sockets with 3 cores per socket

¦ 3 virtual sockets with 4 cores per socket

¦ 2 virtual sockets with 6 cores per socket

¦ 1 virtual socket with 12 cores per socket

For multicore CPUs, the host must have a license for vSphere Virtual Symmetric Multiprocessing (Virtual SMP). Not all guest operating systems support Virtual SMP, and some that do require reinstallation if the number of CPUs changes.
 
Thank you shnelson. I have a better understanding now.

What's the best or preferred way to check CPU usage on an Ubuntu vm? Do I run top within the guest or do I look at the metrics in the vSphere client?
 
Back
Top