performance重启自动恢复为powersave模式的解决方法
1. 安装sysfsutils
sudo apt-get install sysfsutils
2. 查看当前调节器
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
3.关闭ondemand服务
systemctl stop ondemand
systemctl disable ondemand
4.然后更改sysfutils启动文件/etc/sysfs.conf
vim /etc/sysfs.conf
有多少个CPU,就添加对应数量的代码,并更改*为对应的CPU编号
devices/system/cpu/cpu*/cpufreq/scaling_governor = performance
例如,有4个CPU,在sysfs.conf文件中添加如下代码:
devices/system/cpu/cpu0/cpufreq/scaling_governor = performance
devices/system/cpu/cpu1/cpufreq/scaling_governor = performance
devices/system/cpu/cpu2/cpufreq/scaling_governor = performance
devices/system/cpu/cpu3/cpufreq/scaling_governor = performance