CPU Placement in KVM

5,156

What does it mean to be "pinned" to all available physical CPUs?

This means that it will be free to run on any of the CPUs that are physically available on the host system.

The original paragraph from the KVM docs...

The optional attribute placement can be used to indicate the CPU placement mode for domain process, its value can be either static or auto, which defaults to placement, or numatune, or static if cpuset is specified. auto indicates the domain process will be pinned to the advisory nodeset from querying numad, and the value of attribute cpuset will be ignored if it's specified. If both cpuset and placement are not specified, or if placement is static, but no cpuset is specified, the domain process will be pinned to all the available physical CPUs.

Source: 20.4. CPU allocation

References

Share:
5,156

Related videos on Youtube

cheesesticksricepuck
Author by

cheesesticksricepuck

Updated on September 18, 2022

Comments

  • cheesesticksricepuck
    cheesesticksricepuck over 1 year

    I have a configuration of KVM guests where the cpu placement is configured as follows:

    <vcpu placement='static'>1</vcpu>
    

    Now since I don't have a cpuset specified I was reading libvirt documentation and saw the following:

    "If both cpuset and placement are not specified, or if placement is "static", but no cpuset is specified, the domain process will be pinned to all the available physical CPUs."

    What exactly does this mean? I know CPU pinning states that you can only run tasks on a specific CPU that is specified. What does it mean to be "pinned" to all available physical CPUs?

  • cheesesticksricepuck
    cheesesticksricepuck almost 10 years
    Hmm, that's kind of what I thought it might mean. Why do they use the word "pinned" though? Usually pinning is used primarily to demonstrate that you're pinning a workload to a specific core.
  • slm
    slm almost 10 years
    @rainereality - they're pinning the process, just to all the CPUs. It's probably derives from how that code was implemented would be my guess.
  • cheesesticksricepuck
    cheesesticksricepuck almost 10 years
    So is the documentation basically saying that if i don't specify placement it uses something called numatune which I assume tries to place activity on the most numa optimal cpus? I would assume numatune would generally be the best case scenario and we should not be using static placement option at all. The wording is just very confusing I think.
  • slm
    slm almost 10 years
    @rainereality - wording is definitely confusing. Yes NUMA is a reference to the NUMA architecture and would be the best option vs. pinning to a physical CPU statically.