VMware Cloud Community
motech
Contributor
Contributor

Understanding the way a CPU Limit functions where a guest has multiple vCPUs

I'm trying to replicate a similar resource profile in a VM guest to that of a physical machine for the purposes of some load testing.I understand that physical vs vm presents issues and it's not like for like; but for my purposes it will suffice. I simply need to see with XYZ CPU resource available, this is the rough number of transactions that the app will cope with.

The physical machine has 2 x 1400 CPUs (with HT enabled). The OS sees 4 logical CPUs and the application I am testing is able to use them.

The VM guest has 4 vCPUs presented, and a vCPU limit applied of 2800mhz.

The Host has 8 x 3Ghz dual core processors available and (for the purposes of this question) no other active VM guests.

My question is in understanding how close I've really got to the physical resources available.

My understanding is that the CPU limit figure applies to the whole guest and I should be setting the limit to 2x1400mhz. Is that right?

How should I take hyperthreading into account? I figure that it may change the way the application behaves so it's important to at least present the right number of logical CPUs.But, should I actually be presenting a limit of 4x1400?

Any information much appreciated.

Tags (3)
Reply
0 Kudos
2 Replies
marcelo_soares
Champion
Champion

In my point of view, with this hardware is very difficult to reproduce the physical into the virtual. Having hyperthreading is not the same thing that have 2 cores, it only forces the application to use an SMP environment taking advantage of the CPU management.

So you have, in the physical machine, the disadvantage oh having the HT, but you are running your SO directly on the metal. In the other hand, in the virtual environment, you have 4 real cpus presented to the VM (if you do not have any other VMs fighting for this same 4 CPUs, you'll have the physical resource entirely available) but you will have the virtualization layer in the disk/memory access. I would try, if possible, disabling the HT on the physical environment and present only 2 vCPUs to the VM in order to have better results on the test.

Hope this helps,

Marcelo Soares

VMWare Certified Professional 310

Technical Support Engineer

Linux Server Senior Administrator

Marcelo Soares
Reply
0 Kudos
AntonVZhbankov
Immortal
Immortal

CPU limit for vCPU machine applies to total VM CPU usage, so 3000 MHz limit fro 4vCPU machine can be 2700 + 100 + 100 + 100 or 1400 + 1400 + 100 + 100 MHz (per vCPU usage).


---

VMware vExpert '2009

http://blog.vadmin.ru

EMCCAe, HPE ASE, MCITP: SA+VA, VCP 3/4/5, VMware vExpert XO (14 stars)
VMUG Russia Leader
http://t.me/beerpanda
Reply
0 Kudos