#!/bin/bash ###### OLD CPUSET SCRIPT, DOESN'T WORK ANYMORE SINCE CGROUPS V2 #OBJECT="$1" #OPERATION="$2" #SUBOPERATION="$3" #EXTRA_ARG="$4" # #case "$OPERATION" in # "prepare") # cset shield -c 1,2,3,4,5,6,7,9,10,11,12,13,14,15 -k on # ;; # "release") # cset shield -r # ;; #esac command=$2 if [[ $command == "started" ]]; then systemctl set-property --runtime -- system.slice AllowedCPUs=0,8 systemctl set-property --runtime -- user.slice AllowedCPUs=0,8 systemctl set-property --runtime -- init.slice AllowedCPUs=0,8 elif [[ $command == "release" ]]; then systemctl set-property --runtime -- system.slice AllowedCPUs=0-15 systemctl set-property --runtime -- user.slice AllowedCPUs=0-15 systemctl set-property --runtime -- init.slice AllowedCPUs=0-15 fi
Comments