Ask Your Question

Vcpu allocation to instances

asked 2015-09-22 04:58:50 -0500

abhishek-talwar gravatar image

Hi Folks,

I have a doubt regarding Vcpu that are assigned to an instance in OpenStack.

When we say that we are assigning 5 Vcpus to an instance, does that mean that the instance will be using all those 5 vcpus together or it is on the load on it.

So the question is are the Vcpus consecutively used or it is used one by one.

Also if they are used one by one how can we get to know how many Vcpus is the VM currently using.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2015-09-22 06:27:42 -0500

mathias gravatar image

A VM with 2 vCPUs has access to and uses 2 vCPUs at all times. vCPUs are mapped to pCPUs/cores by the hypervisor. vCPUs of different VMs can share a single core but it is the hypervisor's choice to do the mapping:

Example: VM A: vCPU A1, vCPU A2 VM B: vCPU B1, vCPU B2 Hypervisor: Core C1, C2 (single socket, dual core system)

In this case the hypervisor has to choice but to run 2 vCPUs per core, for example A1 and B1 on C1 while A2 and B2 on C2. vCPUs share time on cores.

Hope that helps.

edit flag offensive delete link more


Hi Mathias ,

Thanks a lot for the reply. I still have some doubts : 1. When you say "A VM with 2 vCPUs has access to and uses 2 vCPUs at all times." does that mean that the alloted Vcpus and used Vcpus are same all the time. If a VM has been given 2 Vcpus are both used together all the time.

abhishek-talwar gravatar imageabhishek-talwar ( 2015-09-23 00:56:37 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2015-09-22 04:58:50 -0500

Seen: 875 times

Last updated: Sep 22 '15