Ubuntu 16.04 cpu 工作为powersave 并且更改了重启之后会恢复powersave

本文介绍了Ubuntu 16.04系统中CPU默认工作在powersave模式的问题,分析了由ondemand服务导致的这一现象,并提供了解决策略,包括取消ondemand服务、修改sysfsconf配置文件以确保重启后保持performance模式。
摘要由CSDN通过智能技术生成

1. Ubuntu 16.04 cpu 工作为powersave 并且更改了重启之后会恢复powersave

刚安装完有时候CPU频率设置得非常低(powersave模式),用cpufrequtils更改为performance之后重启恢复,使用sysftutils更改启动参数为performance之后仍然会变为powersave

2. 常用命令

2.1. 查看cpu当前工作的频率模式

cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor

2.2. 查看cpu支持的频率模式

cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_available_governors

2.3. 查看cpu当前频率

cat /proc/cpuinfo | grep MHz

3. CPU默认powersave的原因分析

本方法只支持用intel_pstate驱动调节的intel cpu

其实是由于ondemand这个服务的原因

ondemand, userspace, performance 分别是linux系统中三种CPU频率调节方式。

ondemand指的是平时以低速方式运行,当系统负载提高时候自动提高频率。以这种模式运行不会因为降频造成性能降低,同时也能节约电能和降低温度。

以下为ondemand服务启动执行的动作:

cat /etc/init.d/ondemand
#! /bin/sh
### BEGIN INIT INFO
# Provides:          ondemand
# Required-Start:    $remote_fs $all
# Required-Stop:
# Default-Start:     2 3 4 5
# Default-Stop:
# Short-Description: Set the CPU Frequency Scaling governor to "ondemand"
### END INIT INFO

# Don't run if we're going to start an Android LXC container:
[ ! -f /etc/init/lxc-android-config.conf ] 
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值