5.6. Optimizing CPU frequency scaling
By default, RHEL uses CPU frequency scaling to save power and reduce heat when the CPU is not under heavy load. To prioritize performance over power savings, you can configure the CPU to operate at its maximum clock speed. This ensures that the CPU can handle data deduplication and compression processes with maximum efficiency. By running the CPU at its highest frequency, resource-intensive operations can be executed more quickly, potentially improving the overall performance of LVM-VDO in terms of data reduction and storage optimization.
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 -gChange the scaling governor to prioritize performance:
# cpupower frequency-set -g performanceThis setting persists until reboot.
Optional: To make the persistent change in scaling governor across reboot, create a custom
systemdservice:Create a new
/etc/systemd/system/cpufreq.servicefile 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-reloadEnable the new service:
# systemctl enable cpufreq.service
Verification
Display the currently used CPU frequency policy:
$ cpupower frequency-info -pOptional: If you made the scaling governor change persistent, check if the
cpufreq.serviceis enabled:# systemctl is-enabled cpufreq.service