3

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?

3

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

  • 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. – rainereality May 9 '14 at 3:03
  • @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. – slm May 9 '14 at 3:05
  • 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. – rainereality May 9 '14 at 3:09
  • 1
    @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. – slm May 9 '14 at 3:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.