Vmware - cpu affinity and hyperthreading

Hello,

I have been using VMware 3.5 Infrastructure for about a year.  I have a virtual machine that is running an accounting program that is very cpu intensive.  I have been getting cpu alerts from  this VM and am looking at the best way to apporach it.  

The ESX (HP Proliant DL160 G5) that the VM is running on has more than enough CPU power (2 physical, 8 logical processors) as the usage never goes above 20% and the 3 other machines never approach the warning threshold.

My assumption was that the ESX would automatically divert CPU resources to the problem VM when the warning levels were tripped, but this is not happening.   I called VM support and was told that I should find out which VMs are assigned to which logical processors and then set the CPU affinity of the problem VM to a free logical processor.  

I also looked into whether hyperthreading may be an answer but it turns out that hyperthreading is "not required" on the G5 models: (http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?lang=en&cc=us&taskId=115&prodSeriesId=3580694&prodTypeId=15351&objectID=c00793902)

My question is, shouldn't the ESX server automatically adjust free CPU resources to a CPU intensive machine?  CPU affinity semes to have some drawbacks so I wanted to get some advice.

Thanks

Todd
GVC_AdminAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

robocatCommented:

First, CPU alerts don't always mean you need to do something about it.

It's an indication that you should investigate this, but the most important question is: do your users actually have a performance problem. If not, there's probably no need to worry about these alerts.

If the VM does has a performance problem, you can increase the CPU priority for this VM in the virtual machine properties, resources, shares. You can set this to "high" on your high priority VM and set this to low/normal on the other VMs. You can also opt to set a reservation.

This will allow more CPU power to go to the VM you want.

Another thing you can do is allocate more virtual CPUs to that VM, though this can have the opposite effect in some cases.


0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
JohnLoCommented:
Todd, How many Virtual CPU's are allocated to the VM?
0
GVC_AdminAuthor Commented:
Hi Robocat and John,

Thanks for the responses.  I should clarify a couple of points.  Users of the accounting software are accessing it through terminal services.  The software is running on Server 2008.  Currently there are 4 VMs in total on that ESX server (2 more Server 2003 standards, and one CentOS).  Users of the accounting program are complaining about the speed, specifically when reports are run the cpu resources shoot up to 100%.  I have set the resource allocation of the Shares to "High.  The program seems to be more responsive (I am going to double check with the accounting staff), but when reports are run (specifically when reports are displayed on the screen) the cpu utilization again goes to 100%.    

I was reading another, similar issue in which the problem was the antivirus software. (It also suggested 2 vCPUs for 2008).    
(http://www.experts-exchange.com/Software/VMWare/Q_24883738.html?sfQueryTermInfo=1+affin+cpu+vmware)

The other thing I guess is that the accounting program is not suitable for this environment (TS and VM).

Any Thoughts?

Cheers,

Todd

 
0
Powerful Yet Easy-to-Use Network Monitoring

Identify excessive bandwidth utilization or unexpected application traffic with SolarWinds Bandwidth Analyzer Pack.

Tech_StigCommented:
In my experience I've seen that a VM with one virtual proc only seems to use one core of a physical processor at a time. When the vm is at 100% the processor usage on the esx box would calculate out to be 100 / n where n = the total number of cores. (given there are no other VMs running)

If the application being run is multi-threaded or there are multiple instances running on the VM I would recommend increasing the virtual cpus. Start with 2 and see if it improves.
0
robocatCommented:

Allocating 2 vCPU shouldn't hurt anything and chances are that the accounting program uses some kind of database that is multithreaded.
0
GVC_AdminAuthor Commented:
Thanks everyone.

I was a little nervous about the warning about increasing the # or processors to a VM but I found a quick how to guide (changing the device properties to support multiple processors)

http://communities.vmware.com/thread/94854

Cheers,

Todd
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
VMware

From novice to tech pro — start learning today.