On Thu, Oct 6, 2016 at 10:26 PM, Karan <[email protected]> wrote: > Thanks Mikhail for mentioning custom wieghter. Sure I would like to > look at how you've implemented your own weighter. Please share it when > you've it with you.
See [1] for a very simple implementation. > Also, it would be helpful if you can give > pointers on implementing your weighter based on different metrics of > hosts. You can look into what is available through host_state variable if you need to weigh based on something else. See [2] (seems out of date). You can also look/grep through nova scheduler source code. [1] https://github.com/mmedvede/scheduler-weights [2] https://wiki.openstack.org/wiki/Nova-scheduler-HostState > > On Wed, Oct 5, 2016 at 4:11 PM, Mikhail Medvedev <[email protected]> wrote: >> Hi Karan, >> >> On Sep 22, 2016 19:19, "Karan" <[email protected]> wrote: >>> >>> Hi >>> >>> Is it possible to configure openstack scehduler to schedule instances >>> to a host with least number of instances running on it? >>> When multiple hosts are eligible to spawn a new instance, scheduler >>> applies weight multipliers to available RAM and CPU and pick one host. >>> Is there a way to ask scheduler to pick a Host with least number y of >>> instances on it. >>> >> >> Yes, there is a way to select a host with the least number of instances. It >> can be done by writing a custom weighter that returns negated number of >> instances as host weight. I wrote an implementation that has been used for a >> while in our test cloud, but I am not going to be able to share it until >> next week. Let me know if you still need it by then. >> >>> >>> Thanks >>> Karan >>> >>> _______________________________________________ >>> OpenStack-operators mailing list >>> [email protected] >>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators >> >> -- >> Mikhail Medvedev (mmedvede) >> IBM, OpenStack CI for KVM on Power _______________________________________________ OpenStack-operators mailing list [email protected] http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators
