chore: better knowledge in the quest for power efficiency

This commit is contained in:
Michele Cereda
2024-01-12 20:53:50 +01:00
parent dd5bea1cfc
commit 1ad0a14648
6 changed files with 186 additions and 27 deletions

View File

@@ -6,19 +6,29 @@ Default governor is _ondemand_ for older CPUs and kernels and _schedutil_ for ne
```sh
# Install.
sudo apt install 'linux-cpupower'
sudo dnf install 'kernel-tools'
apt install 'linux-cpupower'
dnf install 'kernel-tools'
zypper install 'cpupower'
# List the available governors.
cpupower frequency-info --governors
cpupower -c "3-6" frequency-info --governors
cpupower --cpu "0-$(( $(nproc) - 1 ))" frequency-info --governors
# Get the current active governor.
cpupower frequency-info --policy
cpupower -c '4' frequency-info --policy
cpupower --cpu '4,5' frequency-info --policy
# Set a new governor until reboot.
# Set new governors until reboot.
sudo cpupower frequency-set -g 'performance'
sudo cpupower frequency-set --governor 'powersave'
sudo cpupower frequency-set --governor 'schedutil'
sudo cpupower -c '1' frequency-set --governor 'powersave'
sudo cpupower --cpu '2,4,7' frequency-set --governor 'schedutil'
# Get the current frequency of CPUs.
cpupower frequency-info -f
cpupower -c '4-7' frequency-info -fm
cpupower --cpu '2,5' frequency-info --freq --human
```
## Further readings