Skip to content

Instantly share code, notes, and snippets.

@johanburati
Last active January 8, 2021 06:39
Show Gist options
  • Save johanburati/b5cd3c42b3182519668d8772370a73ee to your computer and use it in GitHub Desktop.
Save johanburati/b5cd3c42b3182519668d8772370a73ee to your computer and use it in GitHub Desktop.
Disable Hyperthreading
#!/bin/bash
for cpu in $(find /sys/devices/system/cpu/cpu* -name online); do echo "$cpu"; echo 0 > $cpu; done
@johanburati
Copy link
Author

johanburati commented Jan 8, 2021

Run as root:

wget https://gist.github.com/johanburati/b5cd3c42b3182519668d8772370a73ee/raw/cf3a948645f8ddaecfb9ee60170c8cdd1689f640/disable-hyperthreading.sh
chmod +x disable-hyperthreading.sh
sudo ./disable-hyperthreading.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment