歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
您现在的位置: Linux教程網 >> UnixLinux >  >> Linux基礎 >> Linux教程

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)

更多Ubuntu相關信息見Ubuntu 專題頁面 http://www.linuxidc.com/topicnews.aspx?tid=2

Copyright © Linux教程網 All Rights Reserved