On 06/19/2017 10:45 PM, Zhenyu Zheng wrote:
Sorry, The mail sent accidentally by mis-typing ...

My question is, what is the benefit of the above preference?

Hi Kevin!

I believe the benefit is so that the compute node prefers CPU topologies that do not have hardware threads over CPU topologies that do include hardware threads.

I'm not sure exactly of the reason for this preference, but perhaps it is due to assumptions that on some hardware, threads will compete for the same cache resources as other siblings on a core whereas cores may have their own caches (again, on some specific hardware).

Best,
-jay

On Tue, Jun 20, 2017 at 10:43 AM, Zhenyu Zheng <[email protected] <mailto:[email protected]>> wrote:

    Hi,

    In
    https://github.com/openstack/nova/blob/master/nova/virt/hardware.py#L396
    <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))




__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: [email protected]?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: [email protected]?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to