Skip to content

Instantly share code, notes, and snippets.

@Ara4Sh
Forked from johanburati/disable-hyperthreading.sh
Created January 30, 2020 11:32
Show Gist options
  • Save Ara4Sh/cd9fee1831129180516ea2d787242955 to your computer and use it in GitHub Desktop.
Save Ara4Sh/cd9fee1831129180516ea2d787242955 to your computer and use it in GitHub Desktop.
Disable hyperthreading
#!/bin/bash
for cpu in $(cat /sys/devices/system/cpu/cpu*/topology/thread_siblings_list)
do
echo 0 > /sys/devices/system/cpu/cpu${cpu}/online
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment