[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
howtos:hardware:cpu_frequency_scaling [2013/12/16 23:49 (UTC)] – [Kernel Config Requirements] metaschima | howtos:hardware:cpu_frequency_scaling [2023/12/11 10:43 (UTC)] (current) – [Introduction] zeebra | ||
---|---|---|---|
Line 3: | Line 3: | ||
====== CPU-frequency scaling on Slackware ====== | ====== CPU-frequency scaling on Slackware ====== | ||
- | ===== Overview | + | ===== Introduction |
- | CPU frequency scaling is carried out by the kernel, | + | CPU frequency scaling is carried out by the kernel, |
+ | \\ | ||
+ | " | ||
+ | \\ | ||
+ | For older computers with " | ||
+ | \\ | ||
- | ===== Kernel Config Requirements ===== | + | **Available governors** and the **currently used driver** can be seen by using the cpufreq |
- | The kernel options for CPU frequency scaling are as follows. You need both a governor (one set to default) and a driver. The Slackware default governor is ' | + | < |
- | | + | \\ |
- | | + | ===== Kernel Configuration ===== |
- | | + | |
- | * ' | + | |
- | * ' | + | |
- | * ' | + | |
- | * ' | + | |
- | * ' | + | |
- | * x86 CPU frequency scaling drivers | + | |
- | * Intel P state control (X86_INTEL_PSTATE [=n])\\ This driver is mutually exclusive with CONFIG_X86_ACPI_CPUFREQ. It is a newer driver for Sandy Bridge processors and [[https:// | + | |
- | * Processor Clocking Control interface driver (CONFIG_X86_PCC_CPUFREQ)\\ This is only required for HP ProLiant servers, which using this interface. Otherwise, disable it. | + | |
- | * ACPI Processor P-States driver (CONFIG_X86_ACPI_CPUFREQ [=y])\\ This is the recommended driver for newer CPUs Intel (Enhanced) Speedstep enabled and AMD K10 and newer. | + | |
- | * AMD Opteron/ | + | |
- | * Intel Enhanced SpeedStep (deprecated) (CONFIG_X86_SPEEDSTEP_CENTRINO [=n])\\ This is a deprecated option that has been superseded by CONFIG_X86_ACPI_CPUFREQ, | + | |
- | * Intel Pentium 4 clock modulation (CONFIG_X86_P4_CLOCKMOD [=n])\\ This is a hack for Pentium 4s that may cause severe slowdowns and noticeable latencies, so disable it. | + | |
- | <note important> | + | Both Kernels (huge/ |
+ | If you want to use a newer Kernel series or your own Kernel, the relevant options are found in the section **" | ||
+ | With AMD you should normally use the acpi-cpufreq driver, but exceptions apply. With Intel you will expose 3 different drivers: **intel_pstate**, | ||
+ | Generally speaking you could say that Intel P-state is performance biased in general and that acpi-cpufreq gives you the maximum control (including performance bias). There are several options you can pass to the Kernel at boot, but if you want to disable p-states and use the acpi-cpufreq driver you pass **intel_pstate=disable** to the Kernel at boot time. These two options are the safe options, while other options could prevent a boot with certain CPU's. However, you might want to use another option depending on your cpu. \\ | ||
+ | \\ | ||
+ | You can pass these options at boot time to the Kernel command line with the bootloader, like Grub2, you add it after the Kernel line, the standard way of passing Kernel parameters at boot. | ||
+ | \\ | ||
+ | |||
+ | <!-- This section was a huge mess, so I removed the content and just added a snip of information here to keep the section. If it needs to be added, it is probably better to add it towards the end of the article to make it look less overwhelming | ||
+ | |||
+ | ===== / | ||
+ | |||
+ | The main way to adjust frequency scaling in Slackware is to do so at boot time by making / | ||
+ | < | ||
+ | And by selecting the governor to use by editing the file / | ||
+ | < | ||
+ | < | ||
+ | # uncomment the line below and edit it to select your choice: | ||
+ | # | ||
+ | </ | ||
+ | |||
+ | <note important> | ||
+ | |||
+ | After the initial setup of CPU frequency scaling at boot, scaling can also be controlled manually in a variety of ways, as described below.\\ | ||
+ | \\ | ||
+ | |||
+ | ====== Handling of CPU frequency scaling with cpufrequtils and /sys ====== | ||
+ | Slackware comes with the '' | ||
===== Checking the CPU frequency settings ===== | ===== Checking the CPU frequency settings ===== | ||
- | Slackware comes with the '' | + | You can check the settings on your system with the command |
<code bash> | <code bash> | ||
Line 40: | Line 59: | ||
===== Setting the CPU frequency settings ===== | ===== Setting the CPU frequency settings ===== | ||
+ | <!-- This section is still outdated and should be worked into how to use /sys and cpufrequtils insted. | ||
The '' | The '' | ||
- | Adding | + | You can set the scaling governor manually if you want, per cpu core. |
<code bash> | <code bash> | ||
- | # CPU-frequency scaling | ||
cpufreq-set --cpu 0 --governor conservative | cpufreq-set --cpu 0 --governor conservative | ||
cpufreq-set --cpu 1 --governor conservative | cpufreq-set --cpu 1 --governor conservative | ||
</ | </ | ||
- | will set the governor to ' | ||
The same can be done using sysfs: | The same can be done using sysfs: | ||
Line 74: | Line 92: | ||
* Originally written by [[wiki: | * Originally written by [[wiki: | ||
* Updated by [[wiki: | * Updated by [[wiki: | ||
+ | * Updated by [[wiki: | ||
<!-- * Contributions by [[wiki: | <!-- * Contributions by [[wiki: | ||
+ | * Additional resources and sources: [[https:// | ||
+ | * Additional resources and sources: [[https:// | ||
+ | * Additional resources and sources: [[https:// | ||
<!-- Please do not modify anything below, except adding new tags.--> | <!-- Please do not modify anything below, except adding new tags.--> | ||
<!-- You must remove the tag-word " | <!-- You must remove the tag-word " | ||
- | {{tag> | + | <!-- Some updates done, more will follow. Specifically a section about /etc/rc.d/ is high priority |
+ | {{tag> |