Quick Quality-of-Life Improvements

Script for dynamically increasing qube performance, by changing the Xen priority for the domain of the active widnow.

#!/bin/bash

CUR_WIN_ID=`xdotool getwindowfocus`
CUR_VM=`xprop _QUBES_VMNAME -id $CUR_WIN_ID |cut -d \" -f2`

xl sched-credit2 -d $CUR_VM -w $1

exit 0

The default weight is 256, if you change it to 512 that domain will be scheduled twice as often as other domains.

The script takes the weight value as an argument, and it assumes you are using credit2, which is the default scheduler.

./script.sh 512 increase priority.
./script.sh 256 reset priority.

6 Likes