[nova] Spec: Standardize CPU resource tracking

Alex Xu soulxu at gmail.com
Wed Jun 19 03:59:44 UTC 2019


Shewale, Bhagyashri <Bhagyashri.Shewale at nttdata.com> 于2019年6月19日周三
上午11:01写道:

> Hi All,
>
>
> After all discussions on mailing thread, I would like to summarize
> concluded points as under:-
>
>    1. If operator sets ``vcpu_pin_set`` in Stein and upgrade it to Train
>    or ``vcpu_pin_set`` is set on a new compute node, then both VCPU and PCPU
>    inventory should be reported to placement.
>    2. User can’t request both ``resources:PCPU`` and ``resources:VCPU``
>    in a single request for Train release. And in future  ‘U’ release,
>    user can request both  ``resources:PCPU`` and ``resources:VCPU`` in a
>    single request.
>    3. In “U” release,  “vcpu_pin_set” config option will be removed. In
>    this case, operator will either need to set “cpu_shared_set” or
>    “cpu_dedicated_set” accordingly on old compute nodes and on new compute
>    nodes, operator can set both the config option “cpu_shared_set” and  “cpu_dedicated_set”
>    if required.
>    4. In Train release, operator will also need to continue retaining the
>    same behavior of host aggregates as that of Stein to differentiate between
>    Numa-awared compute host:
>       - Hosts meant for pinned  instances should be part of the aggregate
>       with metadata “pinned=True”
>       - Hosts meant for non-pinned  instances should be part of the
>       aggregate with metadata “pinned=False”
>    5. In Train release, old flavor can be used as is in which case
>    scheduler pre-filter will map it to the next syntax “resources:PCPU” in
>    case cpu_policy=dedicated.
>
> +1 all above

>
>    1. In Train release, new flavor syntax “resources:PCPU=1 will be
>    accepted  in flavor extra specs but in this case we expect operator
>    will set “aggregate_instance_extra_specs:pinned=True” in flavor extra specs
>    and the hosts are part of the aggregate which has metadata “pinned=True”.
>
> If the user finished the upgrade, and switch to dedicated_cpu_set and
shared_cpu_set, then he needn't aggregate anymore.

For using resources:PCPU directly, I'm not sure. I have talk with Sean few
days ago, we both think that we shouldn't allow the user using "resources"
extra spec directly. Thinking about the future, we have numa on placement,
the resources and traits extra spec can't express all the guest numa info.
Like which numa node is the first one. And it is hard to parse the guest
numa topo from those extra spec, and it isn't human readable. Also "hw:"
provides some abstraction than resources/traits extra spec, allow us to do
some upgrade without asking user update their flavor. But this isn't
critical problem for now, until we have numa on placement.


> Regards,
>
> Bhagyashri Shewale
>
> ------------------------------
> *From:* Stephen Finucane <sfinucan at redhat.com>
> *Sent:* Tuesday, June 18, 2019 6:51:15 PM
> *To:* Shewale, Bhagyashri; openstack-discuss at lists.openstack.org
> *Subject:* Re: [nova] Spec: Standardize CPU resource tracking
>
> On Tue, 2019-06-18 at 06:41 +0000, Shewale, Bhagyashri wrote:
> > > As above, ignore 'cpu_shared_set' but issue a warning. Use the value of
> > > ‘vcpu_pin_set' to report both VCPU and PCPU inventory. Note that
> > > ‘vcpu_pin_set' is already used to calculate VCPU inventory.
> >
> > As mentioned in the spec, If operator sets the ``vcpu_pin_set`` in
> > the Stein and upgrade to Train then both VCPU and PCPU inventory
> > should be reported in placement.
> >
> > As on current master (Stein) if operator sets ``vpcu_pin_set=0-3`` on
> > Compute node A and adds that node A into the host aggregate say
> > “agg1” having metadata ``pinned=true``, then it allows to create
> > both pinned and non-pinned instances which is known big issue.
> > Create instance A having flavor extra specs
> > ("aggregate_instance_extra_specs:pinned": "true") then instance A
> > will float on cpus 0-3
> > Create the instance B having flavor extra specs
> > ("aggregate_instance_extra_specs:pinned": "true", "hw:cpu_policy":
> > "dedicated") then instance B will be pinned to one of the cpu say 0.
> > Now, operator will do the upgrade (Stein to Train), nova compute will
> > report both VCPU and PCPU inventory. In this case if
> > cpu_allocation_ratio is 1, then total PCPU available will be 4
> > (vpcu_pin_set=0-3) and VCPU will also be 4. And this will allow user
> > to create maximum of 4 instances with flavor extra specs
> > ``resources:PCPU=1`` and 4 instances with flavor extra specs
> > ``resources:VCPU=1``.
>
> If the cpu_allocation_ratio is 1.0 then yes, this is correct. However,
> if it's any greater (and remember, the default is 16.0) then the gap is
> much smaller, though still broken.
>
> > With current master code, it’s possible to create only 4 instances
> > where now, by reporting both VCPU and PCPU, it will allow user to
> > create total of 8 instances which is adding another level of problem
> > along with the existing known issue. Is this acceptable?  because
> > this is decorating the problems.
>
> I think is acceptable, yes. As we've said, this is broken behavior and
> things are just slightly more broken here, though not horribly so. As
> it stands, if you don't isolate pinned instances from non-pinned
> instances, you don't get any of the guarantees pinning is supposed to
> provide. Using the above example, if you booted two pinned and two
> unpinned instances on the same host, the unpinned instances would float
> over the pinned instances' cores [*] and impact their performance. If
> performance is an issue, host aggregrates will have been used.
>
> [*] They'll actually float over the entire range of host cores since
> instnace without a NUMA topology don't respect the 'vcpu_pin_set'
> value.
>
> > If not acceptable, then we can report  only PCPU in this case which
> > will solve two problems:-
> > The existing known issue on current master (allowing both pinned and
> > non-pinned instances) on the compute host meant for pinning.
> > Above issue of allowing 8 instances to be created on the host.
> > But there is one problem in taking this decision, if no instances are
> > running on the compute node in case only ``vcpu_pinned_set`` is set,
> > how do you find out this compute node is configured to create pinned
> > or non-pinned instances? If instances are running, based on the Host
> > numa_topology.pinned_cpus, it’s possible to detect that.
>
> As noted previously, this is too complex and too error prone. Let's
> just suffer the potential additional impact on performance for those
> who haven't correctly configured their deployment, knowing that as soon
> as they get to U, where we can require the 'cpu_dedicated_set' and
> 'cpu_shared_set' options if you want to use pinned instances, things
> will be fixed.
>
> Stephen
>
> Disclaimer: This email and any attachments are sent in strictest
> confidence for the sole use of the addressee and may contain legally
> privileged, confidential, and proprietary data. If you are not the intended
> recipient, please advise the sender by replying promptly to this email and
> then delete and destroy this email and any attachments without any further
> use, copying or forwarding.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-discuss/attachments/20190619/1766af95/attachment-0001.html>


More information about the openstack-discuss mailing list