美文网首页
Ubuntu给cpu降频

Ubuntu给cpu降频

作者: blair_liu | 来源:发表于2023-04-18 00:20 被阅读0次

sudo apt-get install cpufrequtils
cpufreq-info
sudo cpufreq-set -g powersave
cpufreq-info
sudo cpufreq-set -c 0 -g powersave
sudo cpufreq-set -c 1 -g powersave
sudo cpufreq-set -c 2 -g powersave
sudo cpufreq-set -c 3 -g powersave
sudo cpufreq-set -c 4 -g powersave
sudo cpufreq-set -c 5 -g powersave
sudo cpufreq-set -c 6 -g powersave
sudo cpufreq-set -c 7 -g powersave
cpufreq-info
cat /etc/init.d/cpufrequtils
vim /etc/init.d/cpufrequtils
sudo vim /etc/init.d/cpufrequtils

找到 GOVERNOR="ondemand" 修改为以下内容
GOVERNOR="powersave"

systemctl daemon-reload
/etc/init.d/cpufrequtils restart
cpufreq-info

conservative   governor 开启一个 timer,定期去计算各个 CPU 的负载。当CPU 负载超过 80% 时,默认会以 5% 的步伐递增;当 CPU 负载少于 20% 的时候,默认会以 5% 的步伐递减。
ondemand       governor 开启一个 timer,定期去计算各个 CPU 的负载。当 CPU 负载超过 80% 时, 就会把 CPU 频率调到最高,其他情况则会根据当前负载按比例计算频率
userspace      用户自定义CPU频率
powersave      CPU跑在最低频率
performance    CPU一直跑在最高频率
schedutil      利用负载变化回调机制, 把各个 CPU 的 capacity 映射到 CPU 频率,来完成调频动作,capacity 越高,当前 CPU 负载越高,所以频率也调的很高

相关文章

网友评论

      本文标题:Ubuntu给cpu降频

      本文链接:https://www.haomeiwen.com/subject/yfivgrtx.html