Re: [Openstack-operators] [Nova][Scheduler] How to filter and pick Host with least number of instances.

2016-10-10 Thread Mikhail Medvedev
On Thu, Oct 6, 2016 at 10:26 PM, Karan  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  wrote:
>> Hi Karan,
>>
>> On Sep 22, 2016 19:19, "Karan"  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
>>> OpenStack-operators@lists.openstack.org
>>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators
>>
>> --
>> Mikhail Medvedev (mmedvede)
>> IBM, OpenStack CI for KVM on Power

___
OpenStack-operators mailing list
OpenStack-operators@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators


Re: [Openstack-operators] [Nova][Scheduler] How to filter and pick Host with least number of instances.

2016-10-06 Thread Karan
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. Also, it would be helpful if  you can give
pointers on implementing your weighter based on different  metrics of
hosts.

On Wed, Oct 5, 2016 at 4:11 PM, Mikhail Medvedev  wrote:
> Hi Karan,
>
> On Sep 22, 2016 19:19, "Karan"  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
>> OpenStack-operators@lists.openstack.org
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators
>
> --
> Mikhail Medvedev (mmedvede)
> IBM, OpenStack CI for KVM on Power

___
OpenStack-operators mailing list
OpenStack-operators@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators


Re: [Openstack-operators] [Nova][Scheduler] How to filter and pick Host with least number of instances.

2016-10-05 Thread Mikhail Medvedev
Hi Karan,

On Sep 22, 2016 19:19, "Karan"  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
> OpenStack-operators@lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators

--
Mikhail Medvedev (mmedvede)
IBM, OpenStack CI for KVM on Power
___
OpenStack-operators mailing list
OpenStack-operators@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators


[Openstack-operators] [Nova][Scheduler] How to filter and pick Host with least number of instances.

2016-09-22 Thread Karan
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 of
instances on it.


Thanks
Karan

___
OpenStack-operators mailing list
OpenStack-operators@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators