Solved

Can a vm with 1 vCPU use more CPU computing resources than entitled during CPU-intensive spikes?

Posted on 2014-09-19
5
353 Views
Last Modified: 2014-09-19
So my boss asked a question today that I did not know the answer to offhand. I am not a certified VMWare VCP, etc so I apologize if this is a dumb question. Here goes:

Say I have a VM that is assigned 1 vCPU. Given that the cores of the pCPU are 2GHz, what would happen if the VM suddenly ran at max CPU utilization for a relatively sustained period? For instance, the VM requires 2.5GHz of processing power for 5 minutes. Is there a feature in vSphere that would allow that VM to "steal" some CPU cycles from the pool of CPU resources on the host in order to not be maxed out for those 5 minutes?

We have VMs that typically barely bump 1 vCPU, but on occasion, they may get hammered by some sustained CPU intensive process. As such we don't want to have to permanently assign 2 vCPUs to these VMs and have them sit barely above 1% for the majority of the time when they only really require those resources for short, heavy bursts. Is there a way to make this work?

Thanks,
JAK
0
Comment
Question by:SimplyGeeky
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 120

Accepted Solution

by:
Andrew Hancock (VMware vExpert / EE MVE^2) earned 500 total points
ID: 40333573
When you assign 1 vCPU (socket) in the VM, it's allocated against 1 core of the physical hosts processor, if the physical core is 2GHz, the vCPU MAX is 2000 clock cycles.

This is simplified, because this process, is time sliced across all the cores in the physical host, so the assigned vCPU to physical Core, may not be the same core throughout the process.

Your VM can only use the resources it has been assigned, it cannot use more than what is has been assigned, e.g. DYNAMIC CPU MHz does not exist.

You will find that your VM, should be MAX OUT (CPU) for 5 minutes, so I would give it another vCPU (if it needs it!).

Assign another vCPU.
0
 
LVL 62

Expert Comment

by:gheist
ID: 40333617
First it will use cores on one socket, then add cores on next socket, and in the end hyperthreads (count all the VCPUs running in full)
Once you exceed 2 completely loaded vCPUs per core it becomes visibly slower for interactive users.
But you really need enormous amounts of RAM to get there.
2 vcpus is good minimum for any system. One archaic runaway process will not hurt your system (example: Antivirus)
0
 
LVL 62

Expert Comment

by:gheist
ID: 40333762
Indeed dynamic CPU MHZ do exist called turbo mode...
0
 
LVL 120
ID: 40333784
We don't yet have them in the virtual world.....

e.g. like dynamic memory in Hyper-V!

Maybe Hot Add, but it's not automatic!
0
 
LVL 62

Expert Comment

by:gheist
ID: 40333811
Outside VM you see more than nominal GHz per vCPU, and inside VM you can detect it with linux turbostat...
0

Featured Post

Edgartown IT Case Study

Learn about Edgartown's quest to ensure the safety and security of the entire town's employee and citizen data. Read the case study!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
vm size discrepency 2 53
Can CPU usage be related to low memory? 8 64
esxi host, bios screen, time appears to be UTC 15 105
Migrating hosts to new vCenter server 5 63
There's a better way to communicate time sensitive or critical info.
This article outlines why you need to choose a backup solution that protects your entire environment – including your VMware ESXi and Microsoft Hyper-V virtualization hosts – not just your virtual machines.
Teach the user how to install log collectors and how to configure ESXi 5.5 for remote logging Open console session and mount vCenter Server installer: Install vSphere Core Dump Collector: Install vSphere Syslog Collector: Open vSphere Client: Config…
Teach the user how to use vSphere Update Manager to update the VMware Tools and virtual machine hardware version Open vSphere Client: Review manual processes for updating VMware Tools and virtual hardware versions: Create a new baseline group in vSp…

730 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