I run proxmox on an i7 10700 8c/16t CPU. I have this idea that if I have a gaming VM, I shouldn’t over-provision cores and even leave 2 for the host, but is that really the case. Can I somehow ensure VM is basically pinned to say half the cores, and the other half can be fought over by whatever other VMs I’m running and proxmox itself? Could this affect performance on the gaming VM?

  • @RealBot
    link
    English
    5
    edit-2
    1 year ago

    You definitely shouldn’t overprovision cores (logical cores, 16 in your case), especially for gamming VM. Because you are not going to get more performance, you are only going to increase overhead of context switching. One way to “pin” VM to half of cores is to give your VM 8 vCPU and increase vCPU units value (default is 1000). vCPU units determines VM priority in case of more work than CPU can handle.

    https://forum.proxmox.com/threads/cpu-units.1047/

    Basicaly if you have 2 VMs with default value of 1000 and CPU can’t handle everything, proxmox will give both VMs equal cpu time (50/50).

    But if for example you give first VM 3000 vCPU units, then under heavy load CPU time will be divided 75/25.

    Time on CPU will be proportional to given vCPU units (under load).

    So if you want to “pin” VM to 8 logical cores, then give VM 8 vCPUs and increase vCPU units (depending how big of priority you want).