VMware Cloud Community
DoDo201110141
Contributor
Contributor

Application performance on multi vCPU machines

Hi All

Over the past 6month I've looked alot into the performance of single thread processes.

My finding are that single thread apps can suffer greatly in a virtual machine.

But before you say "Well then multi thread your apps", I would like to point out that despite my tests focusing on single thread apps, I think that my findings could assist in overall performance in many areas. Using a single thread app is just an easy way to expose the issue.

Here's the problem:

Test1: Windows guest, with 2vcpus (2500mhz). Run a cpu intensive single core process, i.e 7zip

Run a 200meg zip job.

Findings:

As evident by task manager, the process is thrown between both vcpus. The vSPhere performance chart shows only ~1600mhz being used at most.

zip job takes significantly longer than a 2500mhz physical machine.

Test 2: Same setup as test 1. BUT, set the affinity of the 7zip process to just one vcpu, using windows task manager.

FIndings:

Kaboom! vSphere performance chart shows FULL cpu usage: 2500 mhz.

And the job finishes in expected time, similar to that of a physical machine.

Can any one else reporduce these result?

Am I the only one who sees this as a concern??

My point is this: If someone of sufficient expertise investigates this, I beleive that we may find that the CPU scheduling of guest OS's could be greatly improved for virtual environments.

For example, if i am using my laptop, then yes, I want the OS to be nice to each core. But on a VM, where resources and power are already shared, then it's just a waste.

Cheers

Michael

Fyi, if you want more detail, I posted some time ago about my findings: http://communities.vmware.com/message/1683965#1683965

Tags (1)
0 Kudos
1 Reply
DoDo201110141
Contributor
Contributor

I came across this information, from the bestpractices document: (www.vmware.com/pdf/Perf_Best_Practices_vSphere4.1.pdf )


"In SMP virtual machines the guest operating system can migrate processes from one vCPU to another.
This migration can incur a small CPU overhead. If the migration is very frequent it might be helpful to
pin guest threads or processes to specific vCPUs. (Note that this is another reason not to configure virtual
machines with more vCPUs than they need.)"

(I was kinda already aware of the 'migration' of a process from one vCPU to the other.)

So, vmware is ofcourse aware of the issue, BUT... It states "small CPU overhead".

I am noticing a performance hit of something like 40 percent!! ( i.e I get 1500mhz, instead of 2400mhz... im not very good with percentages)

Does anyone else notice/experience this??

Cheers

0 Kudos