Solved

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

Posted on 2014-09-19
5
361 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 121

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 121
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

Webinar: Security & Encryption in the MySQL world

Join Percona’s Solutions Engineer, Dimitri Vanoverbeke as he presents “Security and Encryption in the MySQL world” on Thursday, July 6, 2017 at 7:00 am PDT / 10:00 am EDT (UTC-7).

Question has a verified solution.

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

How many times a day do you open, acknowledge, or close an IT incident? What’s your process? Do you have a process depending on the incident, systems involved, and other factors? New Relic Alerts gives you options for how you interact with notifica…
Your data is at risk. Probably more today that at any other time in history. There are simply more people with more access to the Web with bad intentions.
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…
This video shows you how easy it is to boot from ISO images for virtual machines with the ISO images stored on a local datastore on the ESXi host.

707 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