Create Nova Scheduler IO Ops Weighter¶
Add a new nova scheduler weighter, sort the filter hosts according to host io ops number, aims to booting instances on light workload hosts.
Currently, Nova scheduler can use host ram or metrics as hosts weight to choice host to booting instance, but have a large free ram host maybe have this many or more instances currently in build, resize, snapshot, migrate, rescue or unshelve task states, especially in some cases of the ram resource of compute hosts is very uneven. For example, We had two compute hosts, they had large enough free ram(hostA:64G and hostB:10G) to booting instances, by default Nova scheduler always choose hostA to booting instance and don’t consider the concurrent instance task. The io_ops_filter can filter out the heavy workload hosts, but it can’t help us to choose a most free compute host to booting. Using CONF.scheduler_host_subset_size can spread instances on suitable randomly compute hosts, but we think it’s better that consider instance io ops as weight value.
End users can boot instances on light workload compute hosts.
The kilo priorities list is currently not defined. However under the currently proposed list of priorities it would fall under “User Experience”.
Create a new scheduler weighter class ‘IoOpsWeigher’, use host_state.num_io_ops as weigh_object. Add a new CONF.io_ops_weight_multiplier, default value is -1.0.
Data model impact¶
REST API impact¶
Other end user impact¶
The new code itself will introduce some performance impact, new scheduler weighter ‘IoOpsWeigher’ add new calculation logic about hosts weight value. Direct use of the attribute ‘num_io_ops’ of HostState will not bring a big performance impact.
Other deployer impact¶
Add a new weighter class ‘IoOpsWeighter’, it takes effect by default.
Add a new config option CONF.io_ops_weight_multiplier in nova.conf, default value is -1.0, positive numbers mean to prior choose heavy workload compute hosts.
- Primary assignee:
Add new weighter class ‘IoOpsWeighter’.
Add some unit tests and tempest.
New unit tests and tempest about ‘IoOpsWeighter’ will be added.
The docs about ‘IoOpsWeighter’ need to be drafted and new config option ‘io_ops_weight_multiplier’ in nova.conf should be introduced, default value is -1.0, negative numbers mean to preference choose light workload compute hosts, positive numbers mean to the opposite thing.