3

I'm posting this here, because what I've found about the topic is either outdated, incomplete or not suitable for various reasons.

I have wanted for a long time to learn how to map specific vCPUs to a specific VM (that needs the maximum possible CPU performance and the less possible CPU blocking/context switches), while in the same node there are other VMs that can't access the pinned cores (they need to be only accesible to the specific VM), and whose CPU allocation is done by the scheduler as "by default".

My current system of choice is Proxmox (only using KVM), usually the latest version in the pvetest branch and latest 3.X kernel.

For my specific needs, rather than learning how to do this in my current system, I would consider switching to other systems or even hypervisors that allows advanced management of CPU allocation to VMs. My budget for paid solutions is close to none, not excluding them all from the start but they should be very cheap to consider.

Thanks a lot in advance, and hope the (many possible) answers to this are useful to many other people.

This feature could be useful for users/admins of virtualization hosts (for whatever reason, in my case because I use different operating systems) where most VMs needs low CPU time, but there are one (or some) that needs ensured high CPU time.

Benito L.
  • 31
  • 1
  • 5
  • 1
    If you are sensitive enough to CPU usage to be asking this type of question, why not just get rid of the hypervisor altogether? The amount of overhead you'll save by doing this is miniscule. – EEAA May 21 '15 at 01:52
  • Because of the specific usage that I give to the systems on which I'm interested on doing this. They are shared machines, on which most of their hosted VMs (using different operating systems) will normally use little CPU time, but enough (mainly during spikes) to impact the performance of the ones that use more resources and need constant performance. I thought about specifying but forgot it, sorry. – Benito L. May 21 '15 at 02:06
  • oVirt provides CPU pinning out of the box. – dyasny May 21 '15 at 15:19

1 Answers1

1

It seems proxmox already has some similar options.

https://forum.proxmox.com/threads/numa-config-option.21313/

Yes, it will make use of CPU pinning (affinity). It is my understanding that enabling NUMA will change the scheduling algorithm such that it is now aware of NUMA nodes on the underlying physical CPU. Thus will attempt to keep vCPU scheduling within the same NUMA node whenever possible.

BE77Y
  • 2,577
  • 3
  • 17
  • 23
Ben Li
  • 11
  • 1