vcpu_pin_set policy

Bug #1754704 reported by Michał Ajduk
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Nova Compute Charm
Triaged
Low
Unassigned

Bug Description

Currently the charm setting vcpu-pin-set sets vcpu_pin_set option in nova.conf which defines which pcpus that instance vcpus can or cannot use. For example '^0,^2' to reserve two cpus for the host.

This setting allows only range but fails if the underlaying hosts have various number of pcpu.

Feature porposal would be to allow dynamic range in this setting, something like:

vcpu-pin-set: "7-last" to inform that charm should put eg:

* vcpu_pin_set="7-47" for nodes where there are 48 cores
* vcpu_pin_set="7-55" for nodes where there are 56 cores

Tags: 4010
Revision history for this message
James Page (james-page) wrote :

This sounds quite a sensible approach - the current approach does depend on all compute hosts being the same spec which is not awesome.

Revision history for this message
James Page (james-page) wrote :

Is it possible todo:

vcpu-pin-set: "^0-6"

As that has the same effect as 7-last without the need to calculate the number of CPU's

Changed in charm-nova-compute:
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Michał Ajduk (majduk) wrote :

I have tried using the vcpu-pin-set: "^0-6":

dtadmin@zag0t1a-mgm231control-hr:~$ juju config nova-compute-ext-dpdk vcpu-pin-set="^0-6"
dtadmin@zag0t1a-mgm231control-hr:~$ juju config nova-compute-ext-dpdk vcpu-pin-set
^0-6

This does not work however:

2018-05-22 08:44:20.988 21097 ERROR nova.compute.manager Invalid: No CPUs available after parsing '^0-6'

Revision history for this message
Michał Ajduk (majduk) wrote :

Note that there is no setting to have this behavior. The exclustion requires first a set of cores:

Comment in /usr/lib/python2.7/dist-packages/nova/virt/hardware.py:
    Each element in the list is either a single
    CPU number, a range of CPU numbers, or a
    caret followed by a CPU number to be excluded
    from a previous range.

So there is no way to specify vcpu pin set core "7-last", one has to always specify a range of all cores to be used. So if the core count varies between nodes, each set of nodes have to have separate juju application deployed with separate vcpu-pin-set.

Note also that the parameter description is misleading:
      Sets vcpu_pin_set option in nova.conf which defines which pcpus that
      instance vcpus can or cannot use. For example '^0,^2' to reserve two
      cpus for the host.

That would indicate that ^0-6 should work correctly, reserving cores 0-6 for host only. However if you take into account the comment in hardware.py, this should not work, because you first need to specify a range of all cores first...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.