How to Reduce temperature and save energy for Linux in summer

Source: Internet
Author: User

How to Reduce temperature and save energy for linux in summer

-- Lihn1987)
In the summer, everyone's books will surely be on the verge of collapse, and the desktop CPU fan sound can be combined with the F1 car sound ....

So how can we reduce the CPU usage? Our approach is to save CPU energy.
My practice is as follows:

Test Environment
Operating System: ubuntu10.04
CPU: AMD X4 630 (quad-core processor)
First install
Sudo apt-Get install cpufrequtils
This software can be used to view the cpu running mode and current frequency
Run
Cpufreq-Info
The result is as follows:

Cpufrequtils 006: cpufreq-Info (c) Dominik brodowski 2004-2009
Report errors and bugs to cpufreq@vger.kernel.org, please.
Analyzing CPU 0:
Driver: powernow-k8
CPUs which run at the same hardware frequency: 0
CPUs which need to have their frequency coordinated by software: 0
Maximum transition latency: 8.0 us.
Hardware limits: 800 MHz-2.80 GHz
Available frequency steps: 2.80 GHz, 2.10 GHz, 1.60 GHz, 800 MHz
Available cpufreq governors: Conservative, OnDemand, userspace, powersave, performance
Current policy: frequency shocould be within 800 MHz and 2.80 GHz.
The governor "OnDemand" may decide which speed to use
Within this range.
Current CPU frequency is 2.80 GHz.
Cpufreq stats: 2.80 GHz: 10.37%, 2.10 GHz: 0.14%, 1.60 GHz: 0.56%, 800 MHz: 88.93% (6395)
Analyzing CPU 1:
Driver: powernow-k8
CPUs which run at the same hardware frequency: 1
CPUs which need to have their frequency coordinated by software: 1
Maximum transition latency: 8.0 us.
Hardware limits: 800 MHz-2.80 GHz
Available frequency steps: 2.80 GHz, 2.10 GHz, 1.60 GHz, 800 MHz
Available cpufreq governors: Conservative, OnDemand, userspace, powersave, performance
Current policy: frequency shocould be within 800 MHz and 2.80 GHz.
The governor "OnDemand" may decide which speed to use
Within this range.
Current CPU frequency is 800 MHz.
Cpufreq stats: 2.80 GHz: 37.15%, 2.10 GHz: 0.10%, 1.60 GHz: 0.70%, 800 MHz: 62.04% (3481)
Analyzing CPU 2:
Driver: powernow-k8
CPUs which run at the same hardware frequency: 2
CPUs which need to have their frequency coordinated by software: 2
Maximum transition latency: 8.0 us.
Hardware limits: 800 MHz-2.80 GHz
Available frequency steps: 2.80 GHz, 2.10 GHz, 1.60 GHz, 800 MHz
Available cpufreq governors: Conservative, OnDemand, userspace, powersave, performance
Current policy: frequency shocould be within 800 MHz and 2.80 GHz.
The governor "OnDemand" may decide which speed to use
Within this range.
Current CPU frequency is 800 MHz.
Cpufreq stats: 2.80 GHz: 12.35%, 2.10 GHz: 0.13%, 1.60 GHz: 0.65%, 800 MHz: 86.87% (7569)
Analyzing CPU 3:
Driver: powernow-k8
CPUs which run at the same hardware frequency: 3
CPUs which need to have their frequency coordinated by software: 3
Maximum transition latency: 8.0 us.
Hardware limits: 800 MHz-2.80 GHz
Available frequency steps: 2.80 GHz, 2.10 GHz, 1.60 GHz, 800 MHz
Available cpufreq governors: conservative, ondemand, userspace, powersave, performance
Current policy: frequency shocould be within 800 MHz and 2.80 GHz.
The governor "ondemand" may decide which speed to use
Within this range.
Current CPU frequency is 800 MHz.
Cpufreq stats: 2.80 GHz: 32.48%, 2.10 GHz: 0.12%, 1.60 GHz: 0.35%, 800 MHz: 67.06% (3615)

What we need to do is to adjust the cpu mode.
Use
Suod cpufreq-set-g Mode
PowersaveIn any case, only the so-called "power-saving" mode with the lowest frequency will be maintained;
UserspaceIt is the mode of custom frequency, which is automatically changed when you set a specific frequency;
OnDemand, Default mode. A task with a cpu computing workload will immediately run at the maximum frequency, and return to the minimum frequency immediately after the execution is completed;
Conservative, Translated into a conservative (moderate) pattern that will automatically adjust the upper and lower frequency limits. The difference with ondemand is that it will distribute the frequency as needed, rather than blindly pursuing the highest frequency;
PerformanceAs the name suggests, it only focuses on efficiency and keeps running at the maximum frequency.

If you select a custom mode, you can useSudo cpufreq-set-FThe frequency you need

Note that the frequency here must be a single bit of KHz and can be achieved (that is, the various frequencies viewed with cpufreq-info), and the cpu frequency = frequency x frequency. This applies to all the following frequencies.


Under automatic adjustment, you can also set the upper and lower limits.

Sudo cpufreq-set-D lower frequency limit Sudo cpufreq-set-u frequency limit
This can be used for overclock ~~~~~~
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.