Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Qubes CPU Pinning

License: AGPL v3

Description

This script is designed for QubesOS. It makes use of Qubes tags (qvm-tags) to automatically pin VMs to specified CPUs (e.g. e-cores and p-cores).

Usage

  1. Download cpu-pinning.service and cpu-pinning.py and copy it over to dom0
  2. Inside dom0 copy the service file to /etc/systemd/system and the Python script to /usr/local/bin
  3. Modify the Python script (P_CORES and E_CORES variables) to match your CPU topology. The sudo xenpm get-cpu-topology command can help here.
  4. Also inside dom0, execute sudo chmod +x /usr/local/bin/cpu-pinning.py; sudo systemctl daemon-reload && sudo systemctl enable --now cpu-pinning.
  5. For each VM whose pinnings you want to modify, execute (in dom0): qvm-tags VMNAME add CORES_TAG.

CORES_TAG can be one of:

  • e_cores - have VM only execute on your efficient cores.
  • e_cores_soft - have VM try to execute on efficient cores, using other cores if all e-cores are busy.
  • p_cores - have VM only execute on your performance cores.
  • p_cores_soft - have VM try to execute on performance cores, using other cores if all p-cores are busy.

Credits

The script is expanded from @noskb's and @renehoj's CPU pinning script.

Other Utilities

See the qubes-utils repo for links to other utilities I've written for Qubes.

I recommend also checking out Qubes Window Boost, it works very well in combination with this script.

License

This project is licensed under the AGPL-3.0-or-later.

License: AGPLv3

About

Automatically pin Qubes VMs to CPU cores based on Qubes tags

Topics

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages