VMware Cloud Community
CSparrow2011101
Contributor
Contributor

ESXi 4.x - vCPU / pCPU

Hi all

First post on this site. Talk about difficult to do...

Have a query about ESXi 4.x and Processors

Forgive me if I do not use correct terminology but you should understand my point.

Lets say I want to run a Virtual Windows SBS2011 server and a Virtual Windows 2008R2 Terminal Server on the same physical server.

Lets say I have a physical server with a quad core processor running at 2.66GHz.

It also has hyper threading giving me a total of 8 threads.

(at the end of the day a process runs in a thread or multiple threads if the application supports it)

(Side note - I read somewhere that Microsoft only make two applications capable of running in more than two threads - Exchange and SQL)

I believe it is best practice to determine the number of virtual machines that can be run on a physical server is

to allow 1 thread for ESXi, the remaining vCPU's allocated to not surpass the number of physical threads.

It seems to be good or best practice to nearly always assign 2 vCPU to each virtual server in this case.

(Due to the fact that if a process saturates a thread the second thread is available avoiding machine lockup and the fact that some processes simply can run in multiple threads giving better performance)

Is ESXi 4.x actually assigning the vCPU to a physical thread?

Are the remaining threads used at all (threads 6,7 and 8 in this case)?

Does it look more like a single thread capable of 8 x 2.66GHz?

Is processor clock speed more important than the number of cores or threads available?

(ie if i had two physical quad core processors with hyper threading running at 2GHz vs single quad core with hyper threading running at 2.66GHz)

If it is true that Exchange and SQL can use more than two threads should you allocate 4 vCPU to a Windows SBS2011 server?

Tags (3)
0 Kudos
3 Replies
Dave_Mishchenko
Immortal
Immortal

Here's a good document to look through regarding CPU scheduling - http://www.vmware.com/files/pdf/perf-vsphere-cpu_scheduler.pdf.

You're not limited in vCPU count to the number of physical cores in a low load environment you can easily go with 5 - 8 vCPUs per core.  If you're running heavy CPU loads you'll obviously need to go with a lower ratio.   It's the best practise to start with a single vCPU and increase it to 2 if the VM really requires the CPU.  You may have multi-thread apps running, but they may not load down a single vCPU depending on your load.

AndreTheGiant
Immortal
Immortal

Welcome to the community.

Each vCPU is one core. One core can be time shared across diffent vCPU.

HT does not give more core, only handle better the scheduling of at 2 vCPU on the same core.

vCPU sizing must always start from 1 vCPU if is possible, and only more then applications or services require more vCPU.

For more info see:

http://www.vmware.com/files/pdf/perf-vsphere-cpu_scheduler.pdf

http://blog.scottlowe.org/2008/06/30/vmware-esx-cpu-scheduling-information/

Andrew | http://about.me/amauro | http://vinfrastructure.it/ | @Andrea_Mauro
CSparrow2011101
Contributor
Contributor

Thanks for the super quick responses guys.

Was hoping for a little less reading...

The second link provided by AndreTheGiant was probably the most helpful in answering this overall for me.

It had another link to hyper threading.

http://communities.vmware.com/docs/DOC-5101

In this was this statement:

Hyper-Threading (HT) has been supported in ESX Server since version 2. ESX Server's scheduler is aware of the presence of HT and treats logical cores differently from physical cores. Virtual CPUs (vCPUs) requesting resources are assigned first to physical cores until all physical cores are loaded. If there are additional vCPUs requesting CPU resources they will then be assigned to the additional logical cores. By this method HT has no impact on performance until more vCPUs are concurrently executing than there exist physical cores

So in summary:

Is ESXi 4.x actually assigning the vCPU to a physical thread?

It assigns the vCPUs first to physical cores then to logical cores

Are the remaining threads used at all (threads 6,7 and 8 in this case)?

Basically No

Does it look more like a single thread capable of 8 x 2.66GHz?

No

Is processor clock speed more important than the number of cores or threads available?

(ie if i had two physical quad core processors with hyper threading running at 2GHz vs single quad core with hyper threading running at 2.66GHz)

It would now have to - Yes

If it is true that Exchange and SQL can use more than two threads should you allocate 4 vCPU to a Windows SBS2011 server?

Debateable - Should start with 1 vCPU and increase as needed.

Personally I tend to think you cant really go wrong with 2 vCPU in this scenario.

0 Kudos