Tuned-ppd worsens performance and efficiency vs power-profiles-daemon

…on the Framework Laptop 13 Pro (Panther Lake), at least.

Based on these benchmarks: https://www.phoronix.com/review/fedora-pantherlake-thermald-tuned/

Example:

By swapping Fedora’s default tuned-ppd with power-profiles-daemon (which was the default until F41), Fedora goes from dead-last-by-far to average in terms of performance.


And takes the lead for power efficiency at the same time!

A bug was recently opened for this: Significant performance drop in F44 · Issue #873 · redhat-performance/tuned · GitHub


So, a couple questions:

I was wondering why Fedora switched from power-profiles-daemon to tuned-ppd.

All I could find was the rationale in this proposal: F40 Change Proposal: Tuned Replaces Power-profiles-daemon (Self-Contained)
It mentions that tuned-ppd is better because it provides more customization. But that seems like not a good trade-off if it causes major performance and efficiency regressions?

Does Fedora have a process in place to benchmark performance impact of changes like this?
I couldn’t find any performance test results in the proposal, and when several users reported concerns or efficiency regressions, not much discussion followed.
If not, should there be such a process?

6 Likes

To make a start, could we put up instructions to switch from tuned to ppd for those that are interested?

1 Like

Thanks for raising this here. I read the two articles on phronix that lead to this analysis and it certainly looks like a problem.

The questions that come to mind are:

What use case does tuned do better on?
Why has no other distro changed to tuned?

2 Likes

With the usual health warnings about making a backup first, and I am in no way responsible if anyone’s system explodes or raises Cthulhu:

sudo dnf swap tuned-ppd power-profiles-daemon

1 Like

Ppd was abandoned by its original author and maintainer. Now it is maintained by other people.

tuned-ppd is just a wrapper for applications that only support ppd API with three hard-coded profiles. You can simply remove it and use other applications, such as Tuned Switcher (sudo dnf install tuned-switcher) or tuned-adm (the official command-line tool), where you can choose any profile you need.

2 Likes

Tuned features an improved DBus API with support for profile switching notifications, developed and maintained by RH, and supports custom profiles with fine-tuning capabilities.

Instead of dropping Tuned, someone need to simply adjust the default profiles.

5 Likes

How hard is it to adjust? Would it be practical for example to make a little program with presets a user can choose from or sliders to adjust weights or some such?

Thanks for the info. But just to clarify: If we want to be able to use GNOME’s Power Mode menu, then we have to keep it, right?

Would this be the problematic profile? tuned/profiles/throughput-performance/tuned.conf at master · redhat-performance/tuned · GitHub
The benchmarking was done under the “Performance” option in GNOME as I understood.
That throughput-performance TuneD profile seems to modify quite a lot besides just telling the intel_pstate driver that you want to use the EPP profile “performance” instead of “balance_performance” - so it should be a matter of finding which of those additional options is causing the performance hit?

1 Like

Profile settings are just simple conf/ini files. The default built-in profiles are located in the /usr/lib/tuned/profiles/ directory. If you want to edit them, simply copy the profile directory contents to the /etc/tuned/profiles/ and edit the tuned.conf file in any text editor.

Example for the desktop profile:

sudo cp -a /usr/lib/tuned/profiles/desktop/ /etc/tuned/profiles/
sudoedit /etc/tuned/profiles/desktop/tuned.conf

You mean a Tuned configuration files generator with a simple and user-friendly GUI?

1 Like

Yes, because tuned-ppd only has three hard-coded profiles: balanced (default), performance, and powersave. If you use alternative Tuned clients and set other profiles, tuned-ppd API apps will throw an error or try to set one of these default profiles again.

You can check the official ppd sources to get information about the changes made to the system and apply them to the throughput-performance Tuned profile.

1 Like

I do indeed, I could see a primary use selector and maybe an option for idle power saving options (core parking, etc), I think it would cover most people’s needs.

I’ve looked at the config files there and the documentation here and do not feel confident to play with them.

Red Hat decided to stop maintaining all software that Bastien had been working on (reference). We employees were told that these were “stop work” projects. We had no say in that. The primary advantage of tuned is probably that it was not a stop work project.

Here’s the public ticket. Judge for yourself whether this was the right choice or not. In retrospect, I’d say probably not.

I would favor switching back, to match GNOME and Ubuntu. Sometimes change turns out to be for the better, and sometimes it just doesn’t. If tuned was a useful improvement, then I would have expected at least one other major distro to have adopted it after Fedora did. That hasn’t happened, and it seems especially unlikely after this week’s performance news.

5 Likes

Out of these profiles listed in the repo (many!), which ones do the three UI power states (energy saver, performance, balanced) map to?

Are these chosen differently based on if the machine is a laptop or a desktop, plugged in or on battery - just trying to understand the logic.

1 Like

The mapping is specified in file “/etc/tuned/ppd.conf”, so you can obviously change it.

2 Likes

Just pointing out my two cents on this topic, I believe you can squeeze a bit more energy efficiency by using powertop2tuned to apply powertop recommended improvements directly to a tuned profile.

I made a tutorial for it a while back but ended up never having the time to look into how to turn it into an actual Docs page. It might be worth looking into that.

2 Likes

It seems like a kernel bug: 2522083 – intel_pstate: powersave governor + setting ebp/epp is significantly faster than the performance governor, TuneD upstream comment: Significant performance drop in F44 · Issue #873 · redhat-performance/tuned · GitHub And it doesn’t seem to be reproducible with the recent kernels. If you have anything (constructive) to add, please comment to either kernel bug or TuneD issue, thanks.

1 Like

Kernel maintainer is aware of this and monitoring Fedor’s PR and testing, so this will be resolved promptly. It’s expected to be in before 7.1.11.

6 Likes

Hmm, Fedor is now saying he can’t reproduce his initial results, and asking for more testing. It’d be great if folks could help. Basically, if you have a system that you think is affected by this, try some different kernels on it and see how they perform in any benchmark that seems to show a difference.