• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2103
  • Last Modified:

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
0
GVC_Admin
Asked:
GVC_Admin
2 Solutions
 
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
 
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
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
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

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now