[openstack-dev] [openstack-dev[[nova] Simple question about sorting CPU topologies

Zhenyu Zheng zhengzhenyulixi at gmail.com
Tue Jun 20 02:43:21 UTC 2017


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/d653b5b1/attachment.html>


More information about the OpenStack-dev mailing list