Created
July 23, 2021 16:22
-
-
Save CodyKochmann/bf268d2874c029554006f977d816145b to your computer and use it in GitHub Desktop.
how to turn off hyperthreading from a vm with no bios privs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# by: Cody Kochmann | |
# | |
# this program tells the kernel to turn off the | |
# odd cores on a host. This is useful when you | |
# want to disable hypertheading in an ec2 | |
# instance and dont have bios access to do it | |
# at the chip level. | |
seq 0 127 | awk '{print "echo 0 > /sys/devices/system/cpu" $1 * 2 + 1 "/online"}' | bash -x |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment