This commit is contained in:
Zsolt Ero
2023-12-05 21:06:29 +01:00
parent 2fbfe15b85
commit fab71939ad
11 changed files with 17 additions and 17 deletions

21
ssh_lib/kernel.py Normal file
View File

@@ -0,0 +1,21 @@
from ssh_lib.config import templates
from ssh_lib.utils import apt_get_install, apt_get_purge, put, put_str
def setup_kernel_settings(c):
put(c, f'{templates}/sysctl/60-optim.conf', '/etc/sysctl.d/')
def set_cpu_governor(c):
apt_get_install(c, 'cpufrequtils')
apt_get_purge(c, 'linux-tools-*')
# c.run('systemctl disable ondemand') # not working on 22
put_str(
c,
'/etc/default/cpufrequtils',
'GOVERNOR="performance"',
)
# check after reboot
# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor