Linux (debian7) operating base (IV) of the Linux system CPU CPU frequency adjustment frequency adjustment tool

In Linux, the kernel developers define a complete framework model to dynamically adjust CPU frequency for this purpose, it is the system CPU Freq. Some of the following modes of the CPU (Governor parameters):

ondemand: default turbo mode, adjust as needed, provided by the kernel function, it is not very strong, but the effective realization of dynamic frequency adjustment, usually low-speed operation mode, when the system load is automatically increased when the frequency increase. In this mode of operation will not cause performance degradation down, but also to save energy and reduce the temperature. General official kernel mode is the default ondemand.

interactive: interactive mode, directly on the highest frequency, and then look at the CPU load gradually decreases, more power. Interactive CPU scheduling based on the number and frequency adjusted to achieve energy saving. InteractiveX is the CPU load to adjust the CPU frequency, the frequency is not excessively lowered. Therefore, better response than Interactive, but a power saving effect in general.

conservative: a conservative mode, similar to ondemand, but the adjustment is relatively slow, want to use the power saving him. Google official kernel, kang kernel default mode.

smartass: Smart mode is the mode I and C upgrade of the model is not worse than in the interactive mode in response to the premise will do more power.

performance: Performance mode! Only the highest frequency, would never consider power consumption, the performance did not have to say, but power consumption.

powersave power-saving mode, typically the lowest operating frequency.

userspace: user-defined mode, the system decision-making strategy to the inverter user mode application, and provides a corresponding interface for the user mode application CPU running frequency adjusting use. That is a long time in that mode. Can be configured by manually editing configuration files

Hotplug: OnDemand similar, but attempts to turn off a cpu cpu in off-screen, and with a Deep SLEEP , more power.

Before performing CPU frequency optimization, we first need to use the command:

lsmod | grep "acpi_cpufreq"

Check whether the kernel is loaded acpi_cpufreq module, if this module is loaded, in accordance with the general release will be the CPU default setting is "ondemand" mode.

After via the command:

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

To further confirm the CPU power-saving mode, but this time the user can not be modified, need to be modified must use the command to install the cpufreq management software, use the following command in Debian Gnu / Linux:

apt-get install cpufrequtils

Then we can profile by modifying the appropriate system where, Debian Gnu / Linux 8

/etc/init.d/cpufrequtils

Modify Debian Gnu / Linux 8 configuration file:

GOVERNOR="ondemand"
为:

GOVERNOR="performance"

Execute the command: /etc/init.d/cpufrequtils restart to restart cpufreq related management software.

————————————————

Starting kernel 3.9, a new power driver named pstate will be before the drivers automatically enabled as a modern Intel CPU. The drive will take precedence over other drivers, because it is a built-driven, rather than as a module to load.

The drive automatically acting Sandy Bridge and two types Ivy Bridge CPU, the CPU in this mode can only be provided powersave mode or performance. If you encounter problems when using this driver, it is recommended that you disable kernel parameters in Grub (ie modify / etc / default / grub file, add intel_pstate = disable after GRUB_CMDLINE_LINUX_DEFAULT =)


————————————————

Original link: https: //www.cnblogs.com/276815076/p/5434295.html

 

Guess you like

Origin www.cnblogs.com/zhangmingda/p/12168469.html