[Suggestion] CPU Pinning in KVM and Docker and CPU Isolation

  • Hi,


    I am currently using cpu isolation and pinning to lower stuttering in my vms. For now I'm using terminal and manual xml editing for that, I set `isolcpus=5-13,19-27` in grub and set cpu selection manually in the xml like the following:



    I would like to see this possible in the gui directly if possible. Systemd can handle the cpu isolation instead of using the command line (example: https://www.reddit.com/r/VFIO/…cpu_pinning_explaination/).


    Thanks.

  • chente

    Hat das Thema freigeschaltet.
    • Offizieller Beitrag

    I would like to see this possible in the gui directly if possible.

    How did you envision entering that info in a GUI? It isn't really possible to make the web interface dynamic based on number of cpu cores. I am curious why you need this though. I have 20+ VMs running on an e5-2697v3 and don't have stuttering problems without this.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.2 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4 | scripts 7.0.1


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • How did you envision entering that info in a GUI? It isn't really possible to make the web interface dynamic based on number of cpu cores. I am curious why you need this though. I have 20+ VMs running on an e5-2697v3 and don't have stuttering problems without this.

    Either through the Change vCPU menu, you can list the thread siblings of each core (that can be listed through this command: cat /sys/devices/system/cpu/*/topology/thread_siblings_list | sort -nu) and in the VM creation page if the advanced section is enabled. It can be shown as a list with threads and check marks:

    Code
    CPU0: Thread 0 [ ] - Thread 14 [ ]
    CPU1: Thread 1 [ ] - Thread 15 [ ]
    ...
    CPU12: Thread 12 [*] - Thread 26 [*]
    CPU13: Thread 13 [*] - Thread 27 [*]

    Isolating CPUs really helps with gaming performances in a VM, I have 2 nvidia GPUs each set for a different VM, if I do not isolate the cpus as before, the frametimes jump to the roof, by isolating the cores/threads, it removes any noise from other processes which leaves them exclusively for the vm (or docker) and leads to better performances.

    For the docker section, it's just an option that you can add for select CPU threads (only works with non-isolated CPUs, meaning they're enabled and shared with the host). I do not have any real world use for it, but some people might need it, so I suggested it (ofc, you have the final word in that, you can also just set a "CPU Set" section where people enter their own thread counts like "1-3,6-8" or the like, it's per container/service basis).

    • Offizieller Beitrag

    Either through the Change vCPU menu, you can list the thread siblings of each core (that can be listed through this command: cat /sys/devices/system/cpu/*/topology/thread_siblings_list | sort -nu) and in the VM creation page if the advanced section is enabled. It can be shown as a list with threads and check marks:

    This is all dynamic form stuff. The OMV 6 framework can't do any of that.

    Isolating CPUs really helps with gaming performances in a VM, I have 2 nvidia GPUs each set for a different VM, if I do not isolate the cpus as before, the frametimes jump to the roof, by isolating the cores/threads, it removes any noise from other processes which leaves them exclusively for the vm (or docker) and leads to better performances.

    Make sense. All you had to say was gaming : )

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.2 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4 | scripts 7.0.1


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!