[openstack-dev] [nova] schedule instance based on CPU frequency ?

Jay Pipes jaypipes at gmail.com
Tue Jun 30 18:58:21 UTC 2015

On 06/30/2015 02:42 AM, ChangBo Guo wrote:
> CPU frequency  is an import performance parameter,  currently  nova
> drivers just  report cpu_info without frequency.   we stored the compute
> node cpu_info in database with colum compute_nodes.cpu_info,  we can add
> the frequency  easily.
> The usage of  cpu frequency  I  can think is used to schedule to meet
> applications which need high frequency.  add a frequency based filter ?
> if we need this , I would like to propose  a spec for this .
> There are two steps to leverage cpu frequency:
> 1.  report cpu frequency  and record the value,  nova hypervisor-show
> will include the value .
> 2.  filter compute nodes based  cpu frequency.
>      add a new scheduler filter to do that
> before I start to do these stuff.  I would like to your  input .
> Do we need leverage CPU frequency  in Nova ?
> if yes, do we need a new filter  or  leverage existing filter to use
> frequency ?

Like Dan B, I question whether CPU frequency really is a useful metric 
for scheduling decisions.

That said, it is already possible to use CPU frequency in the 
MetricsWeigher scheduler weigher. The compute monitor plugin system is 
currently being overhauled [1], but the functionality to monitor 
CPU-related metrics already exists in Nova and can be enabled by doing 
the following in your nova-compute nova.conf:

compute_monitors = ComputeDriverCPUMonitor

Note that with the refactoring of the monitoring plugin interface, the 
above option will change due to using stevedore to load monitor extensions:

compute_monitors = nova.compute.monitors.cpu.virt_driver:Monitor

In your Nova scheduler nova.conf, you will need to add the following in 
the [metrics] section of the file:

weights_setting = cpu.frequency=10.0

Again, I'm not saying that the above will result in any appreciable 
enhancement to the scheduler's decision-making, but it will do what 
you're trying to accomplish :)



More information about the OpenStack-dev mailing list