Ask Your Question

How to change cpu_allocation_ratio

asked 2014-02-12 05:51:03 -0500

DaveJ gravatar image

Hi, I've installed a multi-node Openstack deployment. At install time I configured the cpu_allocation_ratio=1.0, which has been applied to all hypervisors.

I would now like to change that ratio on one of my hyper-visors. I updated the settings in the nova.conf on the compute node and restarted the service but it hasn't taken affect. i.e the machine has 24 Cores. When I change cpu_allocation_ratio to 4.0 and restart I see the following in the compute.log

14-02-12 11:49:12.756 26381 AUDIT nova.compute.resource_tracker [-] Free ram (MB): 47742 2014-02-12 11:49:12.756 26381 AUDIT nova.compute.resource_tracker [-] Free disk (GB): 231 2014-02-12 11:49:12.756 26381 AUDIT nova.compute.resource_tracker [-] Free VCPUS: 24

Do I need to configure something else, or restart another service ?


edit retag flag offensive close merge delete


Considering you have more than one compute node, did you configure the ratio change is correct VM. Just curious.

koolhead17 gravatar imagekoolhead17 ( 2014-02-12 09:33:21 -0500 )edit

Do you mean in the correct compute node? Yes I have configured it in the nova.conf of the compute node I want to change, although it's not clear if this is all that is required, or if there are other steps.

DaveJ gravatar imageDaveJ ( 2014-02-13 03:37:21 -0500 )edit

2 answers

Sort by ยป oldest newest most voted

answered 2014-02-13 06:36:37 -0500

RomilGupta gravatar image

Hi ,

First you need add 'CoreFilter' in the following flag in nova.conf of controller :


and restart the nova-scheduler.

Hopefully this will resolve the problem.

edit flag offensive delete link more


Thanks I had tried that, although I have a number of filters so perhaps there is a ordering issue? scheduler_default_filters=AggregateInstanceExtraSpecsFilter,RetryFilter,AvailabilityZoneFilter,RamFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,CoreFilter

DaveJ gravatar imageDaveJ ( 2014-02-14 03:46:07 -0500 )edit

I removed all the filters and left only AggregateCoreFilter Then on each Aggregate (through horizon) you can include a new metadata with cpu_allocation_ratio and set it to 16.0 (for example). It's the only way it works.

animaletdesequia gravatar imageanimaletdesequia ( 2016-02-17 07:52:38 -0500 )edit

answered 2015-05-13 14:25:54 -0500

Jet gravatar image

updated 2015-05-13 14:28:15 -0500

Thanks to Raul at Mirantis for this explanation of what is happening: The Horizon dashboard is presenting the total that is physically available, and now that you have modified the over-subscription ratio the current or in-use count will increase as you deploy more instances and surpass the available number. The reason for this is because the nova scheduler is the component that uses the cpu_allocation_ratio to schedule instances and ultimately oversubscribe a host. The figure you are seeing in Horizon is retrieved using the nova API which lists the physically available cores.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools



Asked: 2014-02-12 05:51:03 -0500

Seen: 6,117 times

Last updated: May 13 '15