linux下cpu的优化,Ubuntu优化CPU的工作频率

Ubuntu优化CPU的工作频率,打开终端:

sudo apt-get install cpufrequtils

然后sudo chmod u+s /usr/bin/cpufreq-set

在系统启动程序startup application里面添加两条命令:

/usr/bin/cpufreq-set   -c   0   -g   conservative

/usr/bin/cpufreq-set   -c   1   -g   conservative

可以在启动后执行如下命令确认是否生效:

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

执行cpufreq-info 得到如下信息(电脑是双核的)nalyzing CPU 0:

driver: acpi-cpufreq

CPUs which run at the same hardware frequency: 0 1

CPUs which need to have their frequency coordinated by software: 0

maximum transition latency: 10.0 us.

hardware limits: 1000 MHz - 2.00 GHz

available frequency steps: 2.00 GHz, 1.67 GHz, 1.33 GHz, 1000 MHz

available cpufreq governors: conservative, ondemand, userspace, powersave, performance

current policy: frequency should be within 1000 MHz and 2.00 GHz.

The governor "conservative" may decide which speed to use

within this range.

current CPU frequency is 1000 MHz.

cpufreq stats: 2.00 GHz:8.28%, 1.67 GHz:1.46%, 1.33 GHz:2.61%, 1000 MHz:87.64%  (35285)

analyzing CPU 1:

driver: acpi-cpufreq

CPUs which run at the same hardware frequency: 0 1

CPUs which need to have their frequency coordinated by software: 1

maximum transition latency: 10.0 us.

hardware limits: 1000 MHz - 2.00 GHz

available frequency steps: 2.00 GHz, 1.67 GHz, 1.33 GHz, 1000 MHz

available cpufreq governors: conservative, ondemand, userspace, powersave, performance

current policy: frequency should be within 1000 MHz and 2.00 GHz.

The governor "conservative" may decide which speed to use

within this range.

current CPU frequency is 1000 MHz.

cpufreq stats: 2.00 GHz:8.88%, 1.67 GHz:0.99%, 1.33 GHz:1.57%, 1000 MHz:88.56%  (35873)

0b1331709591d260c1c78e86d0c51c18.png

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值