Linux
Table of Contents
1. CPU frequency scaling
- https://www.kernel.org/doc/Documentation/cpu-freq/governors.txt
- https://www.kernel.org/doc/html/latest/admin-guide/pm/cpufreq.html
- https://wiki.archlinux.org/title/CPU_frequency_scaling
- https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/power_management_guide/cpufreq_governors
Command to display the current governor
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
| Distribution | Package providing the cpupower command |
|---|---|
| Debian | https://packages.debian.org/stable/linux-cpupower |
| Fedora | https://packages.fedoraproject.org/pkgs/kernel-tools/kernel-tools/ |
1.1. Debian
Configuring CPU frequency scaling on Debian
sudo apt install linux-cpupower
As of , Debian does not package a .service systemd unit file (see package file list)
Create a modified version of Fedora systemd service unit at /etc/systemd/system/cpupower.service to configure the governor at boot to ondemand
[Unit] Description=Configure CPU power related settings After=syslog.target [Service] Type=oneshot RemainAfterExit=yes ExecStart=/usr/bin/cpupower frequency-set --governor ondemand ExecStop=/usr/bin/cpupower frequency-set --governor ondemand [Install] WantedBy=multi-user.target
Enable the systemd service
sudo systemctl enable cpupower
1.2. Fedora
Configuring CPU frequency scaling on Fedora
sudo dnf install kernel-tools
Change the default configuration from performance to ondemand
sudo sed -i 's/performance/ondemand/' /etc/sysconfig/cpupower
Enable the systemd service
sudo systemctl enable cpupower
2. Filesystem hierarchy
The Filesystem Hierarchy Standard (FHS) can be accessed with the following commands
man hier # shorter descriptions man file-hierarchy # verbose descriptions