[openstack-dev] Custom Nova scheduler based on CPU queue length

Murray, Paul (HP Cloud) pmurray at hpe.com
Wed Oct 21 10:43:01 UTC 2015

Hi Rahul,

> As I understand a weigher for the filter scheduler that weighs filtered host machines based on the host weight option, 'cpu.percent' can be
> configured to prioritize the hosts based on CPU percentage, but there are only limited options when it comes to filtering of machines in the
> first place, that too using the CPU queue length.
> Also, I understand that IBM has its platform resource scheduler that can be used to build custom plugins to get user defined metrics, is there
> a similar way in pure Openstack which can be used to get the CPU queue length.
> As of now, I am thinking of writing a custom script to be kept in all compute nodes to retrieve the CPU queue length and send it to the Nova
> controller, is this the way to go, or is there a defined approach that I can follow to implement a scheduler that uses CPU queue length to filter
> physical machines.

Nova has metric plugins (monitors) in the resource tracker at the compute manager that will report metric data like this to the scheduler.
Any weigher plugins can use that data.

To see how cpu.percentage is set and used see the following plugins:

You can create new monitor and weigher plugins using these as a model or propose an addition to cpu_monitor.py if you think it is generally useful.


More information about the OpenStack-dev mailing list