By default, RHEL uses CPU frequency scaling to save power and reduce heat under low load. To prioritize performance, set the CPU to maximum clock speed. This helps LVM-VDO run deduplication and compression faster and more efficiently.
About this task
Running the CPU at higher frequency allows resource-intensive operations to complete faster. This can improve overall system throughput and storage optimization results.
Warning Tuning CPU frequency scaling for higher performance can increase power consumption and heat generation. In inadequately cooled systems, this can cause overheating and might result in thermal throttling, which limits the performance gains.
Procedure
-
Display available CPU governors:
$ cpupower frequency-info -g
-
Change the scaling governor to prioritize performance:
# cpupower frequency-set -g performance
This setting persists until reboot.
-
Optional: To make the persistent change in scaling governor across reboot, create a custom
systemd service:
-
Create a new
/etc/systemd/system/cpufreq.service file with the following content:
[Unit]
Description=Set CPU scaling governor to performance
[Service]
ExecStart=/usr/bin/cpupower frequency-set -g performance
[Install]
WantedBy=multi-user.target
-
Save the file and exit.
-
Reload the service file:
# systemctl daemon-reload
-
Enable the new service:
# systemctl enable cpufreq.service
Results
- Display the currently used CPU frequency policy:
$ cpupower frequency-info -p
- Optional: If you made the scaling governor change persistent, check if the
cpufreq.service is enabled:
# systemctl is-enabled cpufreq.service