Hey there. Inspired by other threads on CPU pinning on Qubes (linked below) I’ve created a solution to dynamically pin VMs’ vCPUs based on which one is currently focused.
Check the project out at: GitHub - Atrate/qubes-window-boost: Dynamically pin Qubes domains to vCPUs based on the focused window . Contributions welcome :).
TLDR:
This script is designed for QubesOS. It automatically reads the current focused window’s parent VM and pins the VM to all CPU cores (or to performance cores, this only needs one line’s worth of changes). The default assumption is that all VMs are by default pinned to E-cores on asymmetrical CPUs and they get given access to all cores when in focus for additional snappiness and performance. See CPU Pinning Alder Lake for information on how to set up the prerequisite core pinning required for this script to run well.