OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins as a part of the Git hosting and code review systems migration detailed in these mailing list posts: http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html Attempts have been made to correct repository namespaces and hostnames based on simple pattern matching, but it's possible some were updated incorrectly or missed entirely. Please reach out to us via the contact information listed at https://opendev.org/ with any questions you may have.
|1 month ago|
|doc/source||4 years ago|
|nova_solverscheduler||3 years ago|
|.coveragerc||3 years ago|
|.gitignore||4 years ago|
|.gitreview||1 month ago|
|.mailmap||4 years ago|
|.testr.conf||4 years ago|
|CONTRIBUTING.rst||4 years ago|
|HACKING.rst||4 years ago|
|LICENSE||5 years ago|
|MANIFEST.in||4 years ago|
|README.rst||3 years ago|
|babel.cfg||4 years ago|
|openstack-common.conf||4 years ago|
|requirements.txt||4 years ago|
|setup.cfg||4 years ago|
|setup.py||4 years ago|
|solver_scheduler.rst||4 years ago|
|test-requirements.txt||4 years ago|
|tox.ini||4 years ago|
A new OpenStack Nova scheduler driver based on constraints-based optimization solvers.
Solver Scheduler is an OpenStack Nova scheduler driver that provides smart, efficient, and optimization based compute resource scheduling in Nova. It is a pluggable scheduler driver, that can leverage existing constraint solvers available in open source such as PULP, CVXOPT, Google OR-TOOLS, etc. It can be easily extended to add complex constraint models for various use cases, and to solve complex scheduling problems with pulggable solving frameworks.
The nova-solver-scheduler works in a similar (but different) way as Nova's default filter-scheduler. It is designed to have the following 3-layer pluggable architecture, compared with filter-scheduler's 2-layer architecture.
While it appears to the user that the solver scheduler with costs/constraints provides similar functionalities as filter scheduler with weights/filters, solver scheduler can be more efficient in large scale high amount scheduling problems (e.g. placing 500 instances in a 1000 node cluster in a single request), the scheduling solution from the solver scheduler is also more optimal compared with that from filter scheduler due to its more flexible designs.
In order to enable nova-solver-scheduler, we need to have the following minimal configurations in the "[default]" section of nova.conf. Please overwrite the config options' values if the option keys already exist in the configuration file.
[DEFAULT] # ... (other options) scheduler_driver=nova_solverscheduler.scheduler.solver_scheduler.ConstraintSolverScheduler scheduler_host_manager=nova_solverscheduler.scheduler.solver_scheduler_host_manager.SolverSchedulerHostManager
We provide 2 solvers that can plug-in-and-solve the scheduling problems by satisfying all the configured constraints: FastSolver (default), and PulpSolver. The FastSolver runs a fast algorithm that can solve large scale scheduling requests efficiently while giving optimal solutions. The PulpSolver translates the scheduling problems into standard LP (Linear Programming) problems, and invokes a 3rd party LP solver interface (coinor.pulp >= 1.0.4) to solve the scheduling problems. While PulpSolver might be more flexible for complex constraints (which might happen in the future), it works slower than the FastSolver especially in large scale scheduling problems.
We recommend using FastSolver at the current stage, as it covers all (currently) known constraint requirements, and scales better. The following option in the "[solver_scheduler]" section of nova config should be used to specify which solver to use. Please add a new section title called "[solver_scheduler]" if it (probably) doesn't already exist in the nova config file.
Solver-scheduler uses "costs" and "constraints" to configure the behaviour of scheduler. They can be set in a similar way as "weights" and "filters" in the filter-scheduler.
Here is an example for setting which "costs" to use, pleas put these options in the "[solver_scheduler]" section of nova config, each "cost" has a multiplier associated with it to specify its weight in the scheduler decision:
[solver_scheduler] # ... (other options) scheduler_solver_costs=RamCost,AffinityCost,AntiAffinityCost ram_cost_multiplier=1.0 affinity_cost_multiplier=2.0 anti_affinity_cost_multiplier=0.5
The followings is an example of how to set which "constraints" to be used by the solver-scheduler.
[solver_scheduler] # ... (other options) scheduler_solver_constraints=ActiveHostsConstraint,RamConstraint,NumInstancesConstraint
In the following section we will discuss the detailed cost and constraint classes.
The table below lists supported constraints and their counterparts in filter scheduler. Those costs and constraints can be used in the same way as the weights/filters in the filter scheduler except the above option-setting. Please refer to [OpenStack Configuration Reference](http://docs.openstack.org/icehouse/config-reference/content/section_compute-scheduler.html) for detailed explanation of available weights and filters and their usage instructions.
Some of the above constraints directly invoke their filter counterparts to check host availability, others (in the following list) are implemented with improved logic that may result in more optimal placement decisions for multi-instance requests: