Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

regarding cpu allocation to Nova #21

Closed
pinggit opened this issue Oct 3, 2020 · 6 comments
Closed

regarding cpu allocation to Nova #21

pinggit opened this issue Oct 3, 2020 · 6 comments

Comments

@pinggit
Copy link
Owner

pinggit commented Oct 3, 2020

regarding CPU pinning to VM:

CPU allocated to Virtual Machines

Host compute CPUs used for user Virtual Machines are defined into Nova configuration file. Below, we are enforcing Nova CPU assignment:
$ openstack-config --set /etc/nova/nova.conf DEFAULT vcpu_pin_set 3,5,7,9,11-23,27,29,31,33,35-47

$ cat /etc/nova/nova.conf | grep vcpu_pin_set
vcpu_pin_set=3,5,7,9,11-23,27,29,31,33,35-47

In order to get these changes taken into consideration, Nova compute service has to be restarted:
$ sudo docker restart nova_compute

questions:

  1. is this executed in compute node?
  2. how do install this tool "openstack-config". this is not available in centos.
  3. will VM1, VM2, VM3 share these cores?
  4. shall we add a step for cpu pinning to one specific VM, say VM1 use CPU3,5,7; VM2 use CPU9,11,12.
@ldurandadomia
Copy link
Collaborator

  1. vcpu_pin_set is a variable defined into /etc/nova/nova.conf.
    This is a file present on every compute node.

  2. No idea, I do not use this command. This value is configured during OpenStack deployment by TripleO.

  3. Yes. You can check this with taskset -cap .

  4. VM pining in Openstack is out of the scope of this book. In my opinion. This is not so simple. There is Nova conf on one side, and VM enforced configuration provided through specific flavor in which pinning option are defined by the Cloud Administrator.

@pinggit
Copy link
Owner Author

pinggit commented Oct 3, 2020

thanks @ldurandadomia
@kirankn80 do you know how to implement this in your (kolla based) setup?

@kirankn80
Copy link
Collaborator

Yes, IMO, we can ignore cpu pinning in this book. It is an advanced topic.

@PrzemekGrygiel
Copy link
Collaborator

to check VMs CPU allocation the best is
virsh vcpupin [VM id]
this command can be used to relocate CPU allocation as well
virsh vcpupin [VM id] [index] [new core allocation]

@pinggit
Copy link
Owner Author

pinggit commented Oct 5, 2020

@kirankn80 originally my plan is, I need this to be done so I can specify exactly which core the traffic to be sent out.
I want to be specific when introducing the dpdkvifstats and dpdkinfo command, with traffic.
do we know how to implement it (what laurent mentioned in ch4) in your setup?
or, do you want to withdraw ch4 from the book?

@pinggit
Copy link
Owner Author

pinggit commented Oct 7, 2020

here is the file to pin cpu to nova in kolla, will close.

[root@a7s3 ~]# cat /etc/kolla/nova-compute/nova.conf | grep cpu
vcpu_pin_set=1,7,3,9,4,10

@pinggit pinggit closed this as completed Oct 7, 2020
@pinggit pinggit changed the title regarding cpu allocation to VMs regarding cpu allocation to Nova Oct 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants