What is KVM CPU Affinity?

Maher Khalil

Member
Jul 11, 2021
212
10
23
42
Hello
I see on the proxmox VM creation CPU affinity.
Can anyone explain what does it mean? and what is its benefits ?
 
See the documentation:
The third CPU resource limiting setting, affinity, controls what host cores the virtual machine will be permitted to execute on. E.g., if an affinity value of 0-3,8-11 is provided, the virtual machine will be restricted to using the host cores 0,1,2,3,8,9,10, and 11. Valid affinity values are written in cpuset List Format. List Format is a comma-separated list of CPU numbers and ranges of numbers, in ASCII decimal.

CPU affinity uses the taskset command to restrict virtual machines to a given set of cores. This restriction will not take effect for some types of processes that may be created for IO. CPU affinity is not a security feature.

For more information regarding affinity see man cpuset. Here the List Format corresponds to valid affinity values. Visit its Formats section for more examples.
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!