A physical core is what it sounds like – an actual physical processor core in your CPU. Each physical core has its own circuitry and its own L1 (and usually L2) cache can read and execute instructions separately (for the most part) from the other physical cores on the chip.
A logical core is more of a programming abstraction than an actual physical entity. A simple definition of a logical core is that it is a processing unit that is capable of executing its own thread in parallel with other logical cores. In fact you could say that a logical core is the same as a thread.
You can have multiple logical cores per physical core. However logical cores share resources with other logical cores operating on the same physical core, so having more logical cores will not necessarily get you the same performance increase as having more physical cores.
The main function of hyper-threading is to increase the number of independent instructions in the pipeline i.e, used to improve parallelization of computations (doing multiple tasks) at once.It takes advantage of superscalar architecture, in which multiple instructions operate on separate data in parallel. With HTT, one physical core appears as two processors to the operating system, allowing concurrent scheduling of two processes per core.
Architecturally, a processor with Hyper-Threading Technology consists of two logical processors per physical core, each of which has its own processor architectural state. Each logical processor can be individually halted, interrupted or directed to execute a specified thread, independently from the other logical processor sharing the same physical core. Ex: quad-(physical) core i7 processor will have eight logical cores
In early stages, CPUs had a single core. That meant the physical CPU had a single central processing unit on it. To increase performance, manufacturers add additional “cores,” or central processing units. A dual-core CPU has two central processing units, so it appears to the operating system as two CPUs. A different process can be using each core at the same time. This speeds up your system, because your computer can do multiple things at once.
Unlike hyper-threading, there are no tricks here — a dual-core CPU literally has two central processing units on the CPU chip. A quad-core CPU has four central processing units, an octa-core CPU has eight central processing units, and so on
How a Virtual Machine Uses Host Logical Processors
A logical processor (LP) is a thread of execution on a host. Let’s look at three example hosts.
|Host Name||Physical Processors||Hyper-threading Enabled?||Logical Processors|
|Host1||Two Intel 4-core(Quad)i.e., Total 8 cores on Host1||No||8|
|Host2||Two Intel 8-core (Octa)i.e, Total 16 cores Host2||Yes||32( 16 cores *2 HT)|
|Host3||Two AMD 12-corei.e Total 24 cores on Host 3||N/A||24|
- Host1 has eight cores with Hyper-threading disabled. There are eight threads of execution i.e, 8 LPs on that host.
- Host2 has 16 cores; each core has two threads thanks to Hyper-threading, so there are a total of 32 LPs on that host.
- Host3 has AMD processors (Hyper-threading is an Intel CPU function) with a total of 24 cores; without Hyper-threading there are 24 LPs on this host
Virtual Processors calculations in Hyper-V
Hyper-V does not allow you to assign CPU cores directly to virtual machines. Instead, virtual machines are provisioned with virtual processors. A virtual processor is not the same thing as a physical CPU or as a physical CPU core
Microsoft does not impose any hard limit on the ratio of logical processors to virtual processors. You are free to create as many virtual processors for each logical processor as you like, so long as you don’t get any of the limits mentioned earlier. The problem with doing so however, virtual server performance can be diminished as the ratio of virtual processors to logical processors increases.
To the best of my knowledge, Microsoft does not have a current recommendation for the maximum virtual processor to logical processor ratio. However, there is an MSDN article that clearly states that you should use a one-to-one ratio in order to achieve the best performance.
A one-to-one ratio would mean that you only create a virtual processor if you have a corresponding CPU core available
In early stages, Hyper-V 2008 R2 Microsoft supports a ratio of 8:1 for servers and 12:1 virtual processors per logical processors for desktops .However, with Hyper-V 2012 & 2012 R2, Microsoft states that the 1vCPU is for 1 LP ratio. Microsoft dropped this ratio with the release of Windows Server 2012 (WS2012) Hyper-V.
A previously state, microsoft does not have and never has had a general rule of having one LP per vCPU. However, some products from Microsoft have issued support guidance. Some products will support 2 vCPUs per LP, and some want a 1:1 assignment. This is a per-product guidance and affects only those virtual machines running those products
Lastly, to recommend never assign a virtual machine a greater number of virtual processors than you have logical processors.
Virtual Machine Limits
|VM & Host Limits||Windows Server 2008 R2||Windows Server 2012 & R2||Windows Server 2016|
|Virtual Processors per VM||4||64||64|
|Memory per VM||64 GB||1 TB||1 TB|
|Maximum Virtual Disk||2 TB||64 TB||64 TB|
|Virtual network adapters per VM||12||12||12|
|Virtual IDE disks||4||4||4|
|Virtual SCSI controllers||4||4||4|
|Virtual SCSI disks||64/Controller||64/Controller||64/Controller|
|Virtual Fibre Channel adapters||NA||4||4|
|Physical Memory per Host||1 TB||4 TB||4 TB|
|Logical Processors Per Host||64||320||320|
|Virtual Processors per Host||512||2048||2048|
|Virtual Machines per Host||384||1024/Host||1024/Host|
|Virtual Machine in a Cluster||1,000||8,000|
|Running virtual machines per server||1024||1024|
|Virtual processors per logical processor||1:8 for Server’s||No ratio imposed by Hyper-V|
|Nodes in a Cluster||16||64||64|
|Running virtual machines per cluster and per node||1,000 per cluster, with a maximum of 384 on any one node||8,000 per cluster||8,000 per cluster|