虚拟化

vCPU和pCPU比率

· 209 字 · 约 1 分钟

官方建议

From official doc VMware:

the following vcpu:pcpu ratios can be considered a good starting point for a design:

  1. 1:1 to 3:1 is not typically an issue
  2. With 3:1 to 5:1, you might begin to see performance degradation
  3. 6:1 or greater is often going to cause a significant problem for VM performance

通过脚本计算

I have found this script in VMware Community Site:

1
2
3
4
5
6
Foreach($esx in Get-VMHost){
    $vCPU = Get-VM -Location $esx | Measure-Object -Property NumCpu -Sum | select -ExpandProperty Sum
    $esx | Select Name,@{N=‘pCPU’;E={$_.NumCpu}},
        @{N=‘vCPU’;E={$vCPU}},
        @{N=‘Ratio’;E={[math]::Round($vCPU/$_.NumCpu,1)}}
}

Output is:

NamepCPUvCPURatio
phesx01.pre.lab16261.6