Blame

cab8a9 Anonymous 2026-01-31 00:06:22 1
# Cpu Frequency Scaling
2
3
**The CPU frequency scaling feature present in modern computers allows lowering and increasing the processor speed dynamically in runtime so as to save energy while having the possibility of increasing the performance and power consumption if needed. Activating CPU frequency scaling under Slackware is very easy, and requires loading a minimum of two kernel modules and running a simple command. On the one hand, you need to load a specific CPU driver that will activate the frequency scaling feature in your platform. Second, you need to choose a CPU frequency scaling governor, a module that will decide how and when to change the internal processor speed. There are governors to always run at full speed, governors to always run at low speed, governors to increase and decrease the speed based on the CPU load, etc.**
4
5
6
7
__Find available governors__
8
9
<code>cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_available_governors</code>
10
11
12
__Setting a governor__
13
14
<code>nano /etc/default/cpufreq</code>
15
16
__Applying the governor__
17
18
make rc.cpufreq executable
19
20
<code>chmod +x /etc/rc.d/rc.cpufreq</code>
21
make sure its running
22
23
<code>/etc/rc.d/rc.cpufreq restart</code>
24
25
26
__Governor types__
27
28
**Performance**
29
30
The CPUfreq governor "performance" sets the CPU statically to the
31
highest frequency within the borders of scaling_min_freq and
32
scaling_max_freq.
33
34
35
**Powersave**
36
37
The CPUfreq governor "powersave" sets the CPU statically to the
38
lowest frequency within the borders of scaling_min_freq and
39
scaling_max_freq.
40
41
42
**Userspace**
43
44
The CPUfreq governor "userspace" allows the user, or any userspace
45
program running with UID "root", to set the CPU to a specific frequency
46
by making a sysfs file "scaling_setspeed" available in the CPU-device
47
directory.
48
49
50
**Ondemand**
51
52
The CPUfreq governor "ondemand" sets the CPU frequency depending on the
53
current system load. Load estimation is triggered by the scheduler
54
through the update_util_data->func hook; when triggered, cpufreq checks
55
the CPU-usage statistics over the last period and the governor sets the
56
CPU accordingly. The CPU must have the capability to switch the
57
frequency very quickly.
58
59
60
**Conservative**
61
62
The CPUfreq governor "conservative", much like the "ondemand"
63
governor, sets the CPU frequency depending on the current usage. It
64
differs in behaviour in that it gracefully increases and decreases the
65
CPU speed rather than jumping to max speed the moment there is any load
66
on the CPU. This behaviour is more suitable in a battery powered
67
environment.