Re: [openstack-dev] [Nova] [Cyborg] why cyborg can not support an accelerators info list for more than one host?
got it, thanks. 2018-03-22 0:50 GMT+08:00 Ed Leafe : > On Mar 21, 2018, at 11:35 AM, 少合冯 wrote: > > > >> By default, hosts are weighed one by one. You can subclass the > BaseWeigher (in nova/weights.py) to weigh all objects at once. > > > > Does that means it require call cyborg accelerator one by one? the > pseudo code as follow: > > for host in hosts: > >accelerator = cyborg.http_get_ accelerator(host) > >do_weight_by_accelerator > > > > Instead of call cyborg accelerators once, the pseudo code as follow : > > accelerators = cyborg.http_get_ accelerator(hosts) > > for acc in accelerators: > >do_weight_by_accelerator > > What it means is that if you override the weigh_objects() method of the > BaseWeigher class, you can make a single call to Cyborg with a list of all > the hosts. That call could then create a list of weights for all the hosts > and return that. So if you have 100 hosts, you don’t need to make 100 calls > to Cyborg; only 1. > > -- Ed Leafe > > > > > > > __ > OpenStack Development Mailing List (not for usage questions) > Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev > __ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
Re: [openstack-dev] [Nova] [Cyborg] why cyborg can not support an accelerators info list for more than one host?
On Mar 21, 2018, at 11:35 AM, 少合冯 wrote: > >> By default, hosts are weighed one by one. You can subclass the BaseWeigher >> (in nova/weights.py) to weigh all objects at once. > > Does that means it require call cyborg accelerator one by one? the pseudo > code as follow: > for host in hosts: >accelerator = cyborg.http_get_ accelerator(host) >do_weight_by_accelerator > > Instead of call cyborg accelerators once, the pseudo code as follow : > accelerators = cyborg.http_get_ accelerator(hosts) > for acc in accelerators: >do_weight_by_accelerator What it means is that if you override the weigh_objects() method of the BaseWeigher class, you can make a single call to Cyborg with a list of all the hosts. That call could then create a list of weights for all the hosts and return that. So if you have 100 hosts, you don’t need to make 100 calls to Cyborg; only 1. -- Ed Leafe __ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
Re: [openstack-dev] [Nova] [Cyborg] why cyborg can not support an accelerators info list for more than one host?
2018-03-22 0:11 GMT+08:00 Ed Leafe : > On Mar 21, 2018, at 10:56 AM, 少合冯 wrote: > > > > Sorry, I did not attend the PTG. > > Is it said there is a conclusion: > > Scheduler weigher will call into Cyborg REST API for each host instead > of one REST API for all hosts. > > Is there some reason? > > By default, hosts are weighed one by one. You can subclass the BaseWeigher > (in nova/weights.py) to weigh all objects at once. > > Does that means it require call cyborg accelerator one by one? the pseudo code as follow: for host in hosts: accelerator = cyborg.http_get_ accelerator(host) do_weight_by_accelerator Instead of call cyborg accelerators once, the pseudo code as follow : accelerators = cyborg.http_get_ accelerator(hosts) for acc in accelerators: do_weight_by_accelerator -- Ed Leafe > > > > > > > __ > OpenStack Development Mailing List (not for usage questions) > Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev > __ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
Re: [openstack-dev] [Nova] [Cyborg] why cyborg can not support an accelerators info list for more than one host?
On Mar 21, 2018, at 10:56 AM, 少合冯 wrote: > > Sorry, I did not attend the PTG. > Is it said there is a conclusion: > Scheduler weigher will call into Cyborg REST API for each host instead of one > REST API for all hosts. > Is there some reason? By default, hosts are weighed one by one. You can subclass the BaseWeigher (in nova/weights.py) to weigh all objects at once. -- Ed Leafe __ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
[openstack-dev] [Nova] [Cyborg] why cyborg can not support an accelerators info list for more than one host?
For today's IRC discussion. There is question about the weigher. Can cyborg support a get list API to get more than one host accelerators info when weigher. Sorry, I did not attend the PTG. Is it said there is a conclusion: Scheduler weigher will call into Cyborg REST API for each host instead of one REST API for all hosts. Is there some reason? INFO: http://eavesdrop.openstack.org/meetings/openstack_cyborg/2018/openstack_cyborg.2018-03-21-14.00.log.html BR Shaohe Feng __ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev