我们正在做一个:
vi /etc/systemd/system/cpupower.service
[Unit]
Description=CPU powersave
[Service]
Type=oneshot
ExecStart=/usr/bin/cpupower idle-set -D 0
ExecStart=/usr/bin/cpupower frequency-set -g performance
[Install]
WantedBy=multi-user.target
和:
chmod 644 /etc/systemd/system/cpupower.service; systemctl enable cpupower.service
在 SLES12.3 机器上,但重新启动后这不会设置它们!
只有当我们执行“systemctl restart cpupower.service”时它才会被设置手动..
问题:如何使其永久化,以便每次重新启动后都会设置?
答案1
sed -i.$(date +%F-%Hh-%Mm-%Ss) 's/#governor/governor/g; s/#energy_perf_bias/energy_perf_bias/g; s/#min_perf_pct/min_perf_pct/g' /usr/lib/tuned/*/tuned.conf
调整有帮助! (关闭:应该在 /etc/ 中修改,而不是在 /usr 中,因为调整后的更新可能会删除该设置)