get_vcpu_total does not account for cpu_allocation_ratio

Bug #1287722 reported by Stephen Gordon
26
This bug affects 5 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
In Progress
Undecided
Song Li

Bug Description

When retrieving the vCPU total via the Nova API the returned value does not account for cpu_allocation_ratio changes. As a result external consumers, such as Horizon and the command line client, can reflect over utilization when a cpu_allocation_ratio > 1 is in use even when the number of vCPUs available has not been exhausted.

For example:

If compute node has 8 cores, and overcommit is 16, that means 128 vCPUs are available from the schedulers point of view. The API call will however continue to return 8.

Obviously it's probably not possible to change the vCPU total behaviour in the current field, but it would be nice for external consumers to be able to determine (possibly via an additional field or extension) how many vCPUs the host is actually exposing for scheduling.

Tags: compute
Tracy Jones (tjones-i)
tags: added: compute
Song Li (lisong-cruise)
Changed in nova:
assignee: nobody → Song Li (lisong-cruise)
status: New → In Progress
Song Li (lisong-cruise)
Changed in nova:
assignee: Song Li (lisong-cruise) → nobody
assignee: nobody → Song Li (lisong-cruise)
Revision history for this message
Song Li (lisong-cruise) wrote :

Hi, are you using the command like 'nova hypervisor-show 1' and get the vcpus?
I also got the vcpus number without accounting cpu_allocation_ratio.

Could you tell me which Nova API you used? Thanks

Revision history for this message
Stephen Gordon (sgordon) wrote :

I used hypervisor-show but my understanding is the same logic applies to all of the API calls in nova that expose the vCPU counts, they don't factor in the overcommit.

The user confusion arises when the API is effectively telling them they have >X vCPUs running on systems that only expose X vCPUs (according to the API). This flows on to the readouts in the dashboard etc.

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.