Solved

CPU for vmware

Posted on 2013-06-23
12
555 Views
Last Modified: 2013-06-28
Hi _ I have an infrequent problem CPU  for java.exe hits %99.

Its a VM - Windows shows as 4 CPU's in device manager

for the VM I have 4 sockets and 1 core per socket. Is this the right config. - I see conflicting info on the web. - Can someone advise on best CPU VM setup.

see attach of CPU in vcentre client
Capture.PNG
0
Comment
Question by:philb19
12 Comments
 
LVL 6

Expert Comment

by:Vijay Pratap Singh
ID: 39270219
Try to go with 4 CPU's with 2 core per CPU it will definitely reduce some load.
0
 

Author Comment

by:philb19
ID: 39270225
So thats 4 sockets (which I already have ) and change 1 core to 2 ?
0
 
LVL 23

Expert Comment

by:Nagendra Pratap Singh
ID: 39270240
Best is one vcpu.
0
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 

Author Comment

by:philb19
ID: 39270250
Sorry again confused. :(   So 1 vcpu is 1 socket?

how many core then?
0
 
LVL 23

Expert Comment

by:Nagendra Pratap Singh
ID: 39270322
1 x1

If you have a wide VM ( with many cores ) then it has to wait till the path is wider .

If you have 8 physical CPUs (pcpu) and 2 VMs of 4 vcpu + 1 single vcpu machine then the heavy machines will be slowed down.

Total needs to be <=8 in this case

One site to explain this. Others I will find when I come back.

http://www.virtualinstruments.com/ipm-blog/best-practices/avoiding-the-virtual-cpu-dilemma-overprovisioning-vcpu-to-pcpu-ratios/

another

http://www.gabesvirtualworld.com/how-too-many-vcpus-can-negatively-affect-your-performance/
0
 
LVL 1

Expert Comment

by:NAMEWITHELD12
ID: 39270328
is the assumption that correcting the CPU type is going to correct the problem?

is there a java app that is running on the guest that is doing this ?

is the problem something RUNNING ON THE GUEST?
0
 

Author Comment

by:philb19
ID: 39270338
Sorry from what I have 4 sockets and 1 core. - What do you recommend changing this to?

npsingh123  

should i chnage to 1 socket 4 cores?
0
 
LVL 23

Expert Comment

by:Nagendra Pratap Singh
ID: 39270357
1 socket 1 core.

the cpu usage also depends on the app and the load.
0
 
LVL 23

Expert Comment

by:Nagendra Pratap Singh
ID: 39270358
also install vmtools.
0
 
LVL 19

Expert Comment

by:vmwarun - Arun
ID: 39270384
Ideally, the number of vCPUs allocated to a VM depends on the actual CPU requirement. Just because a physical server had a quad core CPU doesn't justify allocating 4 vCPUs when it is converted to a VM. Check if the VM has a CPU ready value in the performance graphs. CPU ready shows the time a VM has to wait for CPU cycles to be scheduled on the physical hardware layer. The lesser the value, the better it is.
0
 
LVL 119

Accepted Solution

by:
Andrew Hancock (VMware vExpert / EE MVE^2) earned 500 total points
ID: 39270474
vSMP (virtual SMP) can affect virtual machine performance, when adding too many vCPUs to virtual machines that cannot use the vCPUs effectly, e.g. Servers than can use vSMP correctly :- SQL Server, Exchange Server.

This is true, many VMware Administrators, think adding lots of processors, will increase performance - wrong! (and because they can, they just go silly!). Sometimes there is confusion between cores and processors. But what we are adding is additional processors in the virtual machine.

So 4 vCPU, to the VM is a 4 Way SMP (Quad Processor Server), if you have Enterprise Plus license you can add 8, (and only if you have the correct OS License will the OS recognise them all).

If applications, can take advantage e.g. Exchange, SQL, adding additional processors, can/may increase performance.

So usual rule of thumb is try 1 vCPU, then try 2 vCPU, knock back to 1 vCPU if performance is affected. and only use vSMP if the VM can take advantage.

Example, VM with 4 vCPUs allocated!

My simple laymans explaination of the "scheduler!"

As you have assigned 4 vCPUs, to this VM, the VMware scheulder, has to wait until 4 cores are free and available, to do this, it has to pause the first cores, until the 4th is available, during this timeframe, the paused cores are not available for processes, this is my simplistic view, but bottom line is adding more vCPUs to a VM, may not give you the performance benefits you think, unless the VM, it's applications are optimised for additional vCPUs.

See here
http://www.vmware.com/resources/techresources/10131

see here
http://www.gabesvirtualworld.com/how-too-many-vcpus-can-negatively-affect-your-performance/

http://www.zdnet.com/virtual-cpus-the-overprovisioning-penalty-of-vcpu-to-pcpu-ratios-4010025185/

also there is a document here about the CPU scheduler

www.vmware.com/files/pdf/perf-vsphere-cpu_scheduler.pdf
0
 
LVL 55

Expert Comment

by:andyalder
ID: 39270757
As far as I understand the no of virtual sockets and cores per socket doesn't make any difference assuming the total number of vCPUs is the same. If it was physical sockets then for speed you would want everything on the same CPU but it's virtual so although VMware tells the guest there are 4 CPUs with one core each it may actually be running on a single CPU.

On the Java side 100% CPU may be down to a looping process so giving it more resources just allows it to go around the same useless loop faster. There's a troubleshooting guide at http://javaeesupportpatterns.blogspot.co.uk/2012/05/java-high-cpu-troubleshooting-guide.html but not much help unless it's a Java app that you wrote yourself.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
VMware 6.0 3 72
Problem to router 7 56
VMWARE 13 64
VMware 6.5:  USB devices 16 62
HOW TO: Connect to the VMware vSphere Hypervisor 6.5 (ESXi 6.5) using the vSphere (HTML5 Web) Host Client 6.5, and perform a simple configuration task of adding a new VMFS 6 datastore.
In this article, I will show you HOW TO: Install VMware Tools for Windows on a VMware Windows virtual machine on a VMware vSphere Hypervisor 6.5 (ESXi 6.5) Host Server, using the VMware Host Client. The virtual machine has Windows Server 2016 instal…
Teach the user how to install vSphere Update Manager  Console to Windows system:  Install vSphere Update Manager: Configure vSphere Update Manager plug-in in vSphere Client: Verify vSphere Update Manager settings in vSphere Client:
This Micro Tutorial walks you through using a remote console to access a server and install ESXi 5.1. This example is showing remote access and installation using a Dell server. The hypervisor is the very first component of your virtual infrastructu…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question