zare_N0222
Enthusiast
Enthusiast

cpu ratio

Hi , .

hope everybody is well

I am calculating cpu ratio in my cluster and use this :

(Get-cluster -name MyCluster  | Get-vm | Where Powerstate -eq “PoweredOn” | Measure NumCpu -sum).sum  /  (((Get-cluster -name MyCluster  | Get-vmhost).extensiondata.summary.hardware | Measure -Property numCpuCores -Sum).sum)

but I am not sure should second part of command multiply with 2  because hyper-threading is enabled,  because hyper-threading only increase performance by 30% , don actually increase number of CPUs

0 Kudos
5 Replies
scott28tt
VMware Employee
VMware Employee

Moderator: Thread moved to the PowerCLI area.


-------------------------------------------------------------------------------------------------------------------------------------------------------------

Although I am a VMware employee I contribute to VMware Communities voluntarily (ie. not in any official capacity)
VMware Training & Certification blog
0 Kudos
LucD
Leadership
Leadership

It is a matter of preference.
Most ratios I calculate use in fact the NumCpuThreads property in the Hardware object.
That means that HT is taken into account.

I often provide both, 'CPU Ratio', where I use NumCpuCores, and 'HT Ratio', where I use NumCpuThreads.

But remember that rules of thumb based on ratios are not absolute.
As always, it depends.

Measure what your VM is actually doing (CPU Ready is a good indicator), try to find variations over time, and many more aspects.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
zare_N0222
Enthusiast
Enthusiast

if calculating CPU radio I use NumCpuThreads the result is 6:1 and I need to add more power to the cluster, but if I use NumCpuThreads then is 3:1 them there is no need for expansion. that is what is confusing me

0 Kudos
zare_N0222
Enthusiast
Enthusiast

I find a script to calculate CPU ready in cluster , and get value of 31% is that good or bad. I know for vm cpu ready should be under 5% but for cluster i don know.

0 Kudos
LucD
Leadership
Leadership

Again, it depends and each environment is different.
A CPU% Ready of 30 and higher normally indicates congestion.

Have a look at PERFORMANCE TROUBLESHOOTING – CPU READY TIME


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos