Ask Your Question

Nova Compute - question about cpu_allocation_ratio [closed]

asked 2014-03-01 11:41:40 -0500

anonymous user


updated 2014-03-02 14:01:12 -0500

sgordon gravatar image

We have of OpenStack Havana Compute node running on Physical server with 40 CPUs. Though cpu_allocation_ratio set to 16 (default), when we check the vPCus count via nova hypervisor stat it only lists 40 vcpus.

Shouldn't it be 640 vcpus ?

[u@h W(keystone_admin)]$ cat /proc/cpuinfo |grep processor |wc -l
[u@h W(keystone_admin)]$ grep  "cpu_allocation_ratio" /etc/nova/nova.conf
[u@h W(keystone_admin)]$ nova hypervisor-stats |grep vcpu |head -1
| vcpus                | 40     |
edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by koolhead17
close date 2014-06-05 08:07:15.297689

2 answers

Sort by ยป oldest newest most voted

answered 2014-03-02 13:59:38 -0500

sgordon gravatar image

updated 2014-03-02 14:20:46 -0500

The Nova API, and as a result the command line client and horizon, do not reflect changes to the cpu_allocation_ratio when returning the number of vCPUs available. Instead they always return the number of actual cores - including those presented as a result of hyperthreading - available.

The cpu_allocation_ratio is internally factored in to the decisions made by the Nova scheduler. As a result while the API only lists 40 vCPUS you will find that you are able to concurrently schedule instances that require significantly more, up to the expected total of 640. This is handled by the CoreFilter filter in the scheduler.

edit flag offensive delete link more


And is there a way to check if the "cpu_allocation_ratio" parameter is really apply ? Thanks

Bada gravatar imageBada ( 2014-03-05 08:16:19 -0500 )edit

Not unless the scheduler logs it when you raise the debug level. What is the issue? Are you scheduling instances and convinced that CoreFilter is incorrectly filtering out hosts without taking this value into account?

sgordon gravatar imagesgordon ( 2014-03-05 13:49:02 -0500 )edit

Well yes :) and it could be nice to know and view where you are between : physical Cpu/allocated vCpu/Overcommit vCpu

Bada gravatar imageBada ( 2014-03-06 05:14:38 -0500 )edit

answered 2014-03-05 16:42:22 -0500

16:1 is the default

edit flag offensive delete link more


is possible to get Horizon dashboard also get updated after done with radio change

ssmarasamy gravatar imagessmarasamy ( 2017-04-06 02:59:00 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2014-03-01 11:41:40 -0500

Seen: 7,820 times

Last updated: Mar 05 '14