[openstack-dev] [openstack-dev[[nova] Simple question about sorting CPU topologies
Zhenyu Zheng
zhengzhenyulixi at gmail.com
Tue Jun 20 02:45:59 UTC 2017
Sorry, The mail sent accidentally by mis-typing ...
My question is, what is the benefit of the above preference?
BR,
Kevin
On Tue, Jun 20, 2017 at 10:43 AM, Zhenyu Zheng <zhengzhenyulixi at gmail.com>
wrote:
> Hi,
>
> In https://github.com/openstack/nova/blob/master/
> nova/virt/hardware.py#L396 we calculated every possible CPU topologies
> and sorted by:
> # We want to
> # - Minimize threads (ie larger sockets * cores is best)
> # - Prefer sockets over cores
> possible = sorted(possible, reverse=True,
> key=lambda x: (x.sockets * x.cores,
> x.sockets,
> x.threads))
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20170620/b9e99906/attachment.html>
More information about the OpenStack-dev
mailing list