Last active
December 26, 2017 06:52
-
-
Save flyinprogrammer/6e1cdd7cbdd32d607c07a9ed8059dc1e to your computer and use it in GitHub Desktop.
switch clocksource to tsc on boot - ubuntu 16.04
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
## Step 1) install/ensure sysfsutils is installed | |
sudo apt-get install sysfsutils | |
# --------------------------------- | |
# Manage /sys filesystem. Requires sysfsutils package | |
## Turn off THP | |
sudo tee -a /etc/sysfs.d/thp.conf <<-EOF | |
kernel/mm/transparent_hugepage/enabled = never | |
kernel/mm/transparent_hugepage/khugepaged/defrag = 0 | |
kernel/mm/transparent_hugepage/defrag = never | |
EOF | |
## Set clocksource to tsc to speed everything up https://www.youtube.com/watch?v=agQMFIWr2h4 | |
sudo tee -a /etc/sysfs.d/clocksource.conf <<-EOF | |
devices/system/clocksource/clocksource0/current_clocksource = tsc | |
EOF | |
# --------------------------------- | |
sudo systemctl enable sysfsutils.service | |
sudo systemctl start sysfsutils.service |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment