4

There seems to have been some (stupid) change to the Linux kernel, where the CPU are stymied to a low power setting.

running cpufreq-info I get: The governor "ondemand" may decide which speed to use

I see that I can change one core like this: sudo cpufreq-set -c95 -g performance

But how do I set ALL cpu cores to PERFORMANCE permanently (persist across reboots)?

1
  • This question seems to arise from a misconception. The CPU is not “stymied to a low power setting”. It will ramp up after a few seconds of activity. ondemand or powersave are the correct choice for most users, including CPU-heavy workloads. Setting the governor to performance will make your computer a lot hotter with little tangible benefit. Commented May 30, 2024 at 16:18

3 Answers 3

4

In the file:

/etc/default/cpufrequtils 

Make a setting like this:

GOVERNOR="performance" 

Then restart the service:

sudo systemctl restart cpufrequtils 

You can later check your settings with:

cpufreq-info 
0

I would use tuned which is a systemd service. It would solve an issues regarding not persisting after reboots.

Below are the profiles that are shown from tuned-2.22.1-4.el8_10.1.noarch installed in RHEL-8.10.

I would do tuned-adm profile latency-performance

tuned-adm list Available profiles: - accelerator-performance - Throughput performance based tuning with disabled higher latency STOP states - atomic-guest - Optimize virtual guests based on the Atomic variant - atomic-host - Optimize bare metal systems running the Atomic variant - aws - Optimize for aws ec2 instances - balanced - General non-specialized tuned profile - cpu-partitioning - Optimize for CPU partitioning - cpu-partitioning-powersave - Optimize for CPU partitioning with additional powersave - default - Legacy default tuned profile - desktop - Optimize for the desktop use-case - desktop-powersave - Optmize for the desktop use-case with power saving - enterprise-storage - Legacy profile for RHEL6, for RHEL7, please use throughput-performance profile - epyc-eda - Optimize for EDA compute workloads on AMD EPYC CPUs - hpc-compute - Optimize for HPC compute workloads - intel-sst - Configure for Intel Speed Select Base Frequency - laptop-ac-powersave - Optimize for laptop with power savings - laptop-battery-powersave - Optimize laptop profile with more aggressive power saving - latency-performance - Optimize for deterministic performance at the cost of increased power consumption - mssql - Optimize for Microsoft SQL Server - network-latency - Optimize for deterministic performance at the cost of increased power consumption, focused on low latency network performance - network-throughput - Optimize for streaming network throughput, generally only necessary on older CPUs or 40G+ networks - optimize-serial-console - Optimize for serial console use. - oracle - Optimize for Oracle RDBMS - postgresql - Optimize for PostgreSQL server - powersave - Optimize for low power consumption - server-powersave - Optimize for server power savings - spindown-disk - Optimize for power saving by spinning-down rotational disks - throughput-performance - Broadly applicable tuning that provides excellent performance across a variety of common server workloads - virtual-guest - Optimize for running inside a virtual guest - virtual-host - Optimize for running KVM guests Current active profile: latency-performance 
-1

I'm not sure if it'll work on x86 computers, but it does work on the RaspberryPi:

echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor 

Please note that this won't persist across reboots. So you'll have to run this again every time (See comment to my answer).

1
  • 2
    Changing something under /sys does not persist across reboots. /sys is a live-only filesystem that exposes kernel interfaces. What you read and write there exists only in memory. Commented May 30, 2024 at 16:16

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.