Page History

Linux Tweakage

Mark George edited this page on 11 Jun 2019

Clone this wiki locally

Enabling/disabling CPUs

Requires a Kernel with CONFIG_HOTPLUG_CPU to be enabled (enabled by default in Arch):

# check online status
cat /sys/devices/system/cpu/online

# turn cpu1 on
echo 1 > /sys/devices/system/cpu/cpu1/online

# turn cpu1 off
echo 0 > /sys/devices/system/cpu/cpu1/online

Swap

Clear swap. This is useful after a weekend where lots of stuff has been swapped out making everything laggy as it gets swapped back in:

sudo sync; sudo swapoff -a; sudo swapon -a