1
0
Fork 0
Commit graph

20 commits

Author SHA1 Message Date
Ibrahim Ansari
d2adada5aa
profiles: use med_power_with_dipm for SATA ALPM
Using `min_power` can lead to data loss, and `med_power_with_dipm`
delivers similar power savings without the chance of data loss. [1]

`med_power_with_dipm` is the default setting[2] in upstream Linux for
SATA Link Power Management, and should provide significant power
savings on laptops using SATA drives over `medium_power`.

[1] https://hansdegoede.livejournal.com/18412.html
[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/ata/Kconfig?id=5433f0e7427ae4f5b128d89ec16ccaafc9fef5ee

Signed-off-by: Ibrahim Ansari <ansari.ibrahim1@gmail.com>
2025-02-04 13:13:08 +05:30
Hector Martin
e24bfef651 profiles: Correct CPU governor settings
First, always prefer schedutil for balanced/powersave. On platforms
where this governor is available, this enables Energy-Aware-Scheduling
which offers the best power efficiency and performance combination.
There is absolutely no reason to use another governor by default in the
"balanced" profile on these systems, in particular.

Second, swap around "conservative" and "ondemand". "conservative" is
supposed to be lower power and higher latency. The commit that made this
change [1] tested on a single server platform (10 years ago), but came
to the wrong conclusion. Dividing the throughput by power numbers of
that commit, "conservative" did in fact provide better performance/watt,
which is the intent of lower-power modes. The fact that it also
happened to provide better overall performance than "ondemand" is
probably an artifact of suboptimal power-management behavior or a
flawed test.

[1] b2897d9c1c

Signed-off-by: Hector Martin <marcan@marcan.st>
2025-01-21 08:31:13 +09:00
Mario Limonciello
068928e47b Add support for controlling amd-pstate core performance boost
Core performance boost control is added to kernel 6.11.
This sets up the policy to turn it off while in the power saver profile.

Link: https://lore.kernel.org/linux-pm/1a78eeaa-fadd-4734-aaeb-2fe11e96e198@amd.com/T/#m4a0c8917ea8fb033504055bd61512c80c85410c8
2024-06-21 15:31:46 -05:00
Mario Limonciello
40d12e0c01 Modify the video plugin for tuning of the amdgpu panel_power_savings attribute
This attribute accepts a range from 0 through 4 where larger values
will also have larger panel power savings.

Using this has a trade off for color accuracy, and it is only applied
when the system is currently operating on battery.

Intentionally the plugin will check what values are already programmed
to the sysfs file to avoid unnecessary writes.  Writing the sysfs file
will cause a modeset which isn't necessary if writing the same value twice.

The default values are applied to the profiles that are used in
power-profiles-daemon compatbility.  They also match the values used in
that software.

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
2024-05-23 10:16:18 -05:00
Pavol Žáčik
9b72d697df
Add an ACPI plugin
Resolves: RHEL-16966

At this point, the plugin supports setting a single sysfs attribute,
platform_profile.

The 3 basic ACPI platform profiles are low-power, balanced, and
performance. These are mapped to the generic powersave,
balanced, and *-performance TuneD profiles.
2024-01-22 11:29:39 +01:00
Ryan Brue
845c24e692 profiles: add energy_performance_preference hints to profiles
This commit adds 'energy_performance_preference' tunings for some of the premade profiles in TuneD. For more information about energy_performance_preference, see https://www.kernel.org/doc/html/v4.19/admin-guide/pm/intel_pstate.html#energy-vs-performance-hints

Signed-off-by: Ryan Brue <ryanbrue@hotmail.com>
2023-12-11 12:29:17 -06:00
Ondřej Lysoněk
8de59ffee2 balanced: Fallback to the 'powersave' scaling governor
Fallback to the 'powersave' CPU scaling governor if 'conservative' is
not available. This can happen if the intel_pstate driver is active - at
least on newer kernels, the only available governors are 'powersave' and
'performance' if the driver is active.

As far as we can tell, the 'powersave' governor is the closest to the
'conservative' governor.

Resolves: rhbz#1679205

Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
2019-03-06 11:41:56 +01:00
Jaroslav Škarvada
aa5bda3ce1
balanced: added explicit priority to CPU plugin instance
Related: #158

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2019-03-06 11:28:56 +01:00
Thomas Renninger
af269d11ae conservative governor may be compiled as module and needs explicit loading
Tested on an AMD machine with acpi-cpufreq kernel driver providing
ondemand, conservative,... governors.

Without this line, one gets:
tuned.plugins.plugin_cpu: ignoring governor 'conservative' on cpu 'cpu7', it
is not supported

when switching to balanced profile.
With this line you see:
tuned.plugins.plugin_cpu: setting governor 'ondemand' on cpu 'cpu2'

Be careful: Order matters!
tuned seem to read profile config file line by line or section by section
and directly tries to apply things.

If order of these lines are exchanged:
[modules]
cpufreq_conservative=+r

[cpu]
governor=conservative

you fall back to previous error again. Therefore the newly introduced
[modules] section is not put at the end, but nearly at top.
2019-02-13 15:38:49 +01:00
Ondřej Lysoněk
f9f261e820 plugin_video: Prefix DPM states with 'dpm-'
Prefix DPM states with 'dpm-' to prevent future name collisions.
Also, change the state in powersave profiles to 'battery' - there's
no such DPM state as powersave.

Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
2017-09-19 23:03:41 +02:00
Jaroslav Škarvada
eef09f1185
plugin_video: merged radeon 'dpm' into radeon_powersave
Now, in addition to the already supported Radeon power methods, it also
supports:

radeon_powersave=DPM

where DPM can be 'battery', 'balanced', or 'performance'.

It also supports fallback, so one can write:

radeon_powersave=balanced, auto

where it tries 'balanced' DPM profile and if it fails or is not
supported it fallbacks to the non DPM 'auto' profile.

As delimiters colon, semilocon, comma or whitespace can be used.

It also switched upstream profiles to prefer DPM.

https://github.com/redhat-performance/tuned/pull/32

Related: rhbz#1417659

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2017-09-19 14:57:26 +02:00
Jaroslav Škarvada
c24e2ea0ca Added support for 'summary' and 'description' of profiles
Added new tuned-adm functionality 'profile_info'. It has optional parameter
'profile_name'. If called without parameter, active profile is used.
It outputs name of the profile it is querying, profile summary, and profile
description. If there is no profile summary or description available it
outputs empty string(s).

Extended tuned-adm 'list' functionality. It now displays profile summary
in the list (if available).

Added summary to profiles.

Extended D-Bus API to support the new feature and for better Cockpit support:
 - Added 'profile_info' method. It gets profile_name argument and it queries
   the requested profile for information. If profile_name is empty string it
   queries the active/selected profile. It returns tuple of the following
   format (status, profile_name, summary, description), where status is
   boolean. If it is False, the query mechanism failed and the other fields
   don't contain valid data
 - Added 'profiles2' method. It's extension of 'profiles' method. It returns
   list of tuples. Tuples have following format:
   (profile_name, profile_summary)

Related: rhbz#1228356
Fixes: #46

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2016-01-05 11:28:25 +01:00
Jaroslav Škarvada
b6ad363186 plugins: added scsi_host plugin
This plugin handles SCSI hosts. On Linux these are also used for SATA.
Currently it only supports ALPM setting, e.g.:

[scsi_host]
devices=host0
alpm=medium_power

ALPM is set per SATA/SCSI host. If SCSI host doesn't support ALPM
(it is SATA/AHCI specific), it is skipped and message is logged into
Tuned log with 'info' loglevel.

Concurrently the ALPM settings were removed from the 'disk' plugin.

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2015-08-24 16:16:28 +02:00
Hase, Jin
b2897d9c1c balanced: used conservative CPU governor
In my testing, balanced profile's efficiency is almost as same(*1) as
powersave profile on my server using Xeon-E5.

I think tuned should make difference between balanced profile and powersave
profile. IOW, balanced profile should show better performance and worse power
consumption than powersave profile.

One of root causes is that detailed settings of P-State and C-State are
almost same between balanced profile and powersave profile.

This patch proposes that making "balanced"'s CPU governer to be conservative.
This will make difference between balanced and powersave(*2).

[Measurement result]
 - Load testing tool
   JdbcRunner(Database Model)

 - Hardware
   12core(Xeon E5-2650L 1.80GHz)/8GB Memory/SSD 100GB/1Gbit Network
   (But I limit the number of core to "4" by BIOS because of adjusting
    CPU load)

 - Software
   kernel-3.10.0-123.el7.x86_64, tuned-2.3.0-11.el7.noarch

 - Throughput, latency and power consumption
   (power consumption is measured by ipmitool sensor)

                | Throughput |   Latency   | Power Consumption
     Profile    |   (tpm)    |   (msec)    | on Server (Watt)
 --------------------------------------------------------------
 (*1)powersave  |   8,495    |       28    |      111.2
 --------------------------------------------------------------
 (*1)balanced   |   8,340    |       29    |      111.6
 --------------------------------------------------------------
 (*2)This patch |   9,284    |       25    |      118.8
 --------------------------------------------------------------
 throughput-    |  10,464    |       25    |      128.0
 performance    |            |             |
 --------------------------------------------------------------
 latency-       |  10,911    |       23    |      133.2
 performance    |            |             |
 --------------------------------------------------------------

 - P-State and C-State(measured by turbostat)
             | CPU freq|               C-State
   Profile   |  (GHz)  | (%C0) | (%C1) | (%C3) | (%C6) | (%C7)
 --------------------------------------------------------------
 powersave   |  1.31   | 59.45 | 28.55 |  1.72 |    0  | 10.25
 --------------------------------------------------------------
 balanced    |  1.38   | 61.63 | 30.02 |  0.77 |    0  |  7.56
 --------------------------------------------------------------
 This patch  |  1.81   | 51.27 | 39.91 |  1.78 |    0  |  7.04
 --------------------------------------------------------------
 throughput- |  2.25   | 46.14 | 52.44 |  0.43 |    0  |  0.97
 performance |         |       |       |       |       |
 --------------------------------------------------------------
 latency-    |  2.30   | 48.36 | 51.64 |     0 |    0  |    0
 performance |         |       |       |       |       |
 --------------------------------------------------------------

 - CPU utilization(measured by sar)
   Profile   |  %user |  %sys  | %iowait |  %idle
 ---------------------------------------------------
 powersave   |  36.69 |  13.32 |  5.25   |  44.74
 ---------------------------------------------------
 balanced    |  38.94 |  13.88 |  4.07   |  43.12
 ---------------------------------------------------
 This patch  |  42.78 |  14.53 |  5.97   |  36.72
 ---------------------------------------------------
 throughput- |  33.51 |  12.29 |  7.14   |  47.06
 performance |        |        |         |
 ---------------------------------------------------
 latency-    |  34.58 |  11.71 |  7.89   |  45.82
 performance |        |        |         |
 ---------------------------------------------------

Signed-off-by: Jin Hase <hase.jin@jp.fujitsu.com>

1 file changed, 1 insertion(+), 1 deletion(-)
2014-07-22 12:08:28 +02:00
Jaroslav Škarvada
adffbb0ca1 balanced: used medium_power ALPM policy
This policy sets the link to the second lowest power
state (PARTIAL) when there is no I/O on the disk. This
mode is designed to allow transitions in link power states
(for example during times of intermittent heavy I/O and
idle I/O) with as small impact on performance as possible.

This may save significant amount of power in idle periods
of the link, especially on laptops. E.g. on x240 the average
AC power consumption dropped from approx. 5 W to only 2.5 W.

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2014-04-28 14:29:06 +02:00
Jaroslav Škarvada
59e259a3ce plugin_cpu: added support for x86_energy_perf_policy
This feature is controlled by the energy_perf_bias cpu plugin
option.

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2013-10-23 10:44:24 +02:00
Jaroslav Škarvada
f070213c64 utils: fixed packaging of pmqos-static
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2013-10-16 14:34:00 +02:00
Alessandro GUIDO
08a97b00c7 Fix audio settings in standard profiles
The 'balanced' and 'powersave' profiles used incorrect setting names in
the audio section, thus making audio codec power management not being
enabled. Make such profiles use the correct setting names.

This also fixes some warnings:
  WARNING  tuned.plugins.base: Unknown option 'hda_intel_powersave' for plugin 'AudioPlugin'.
  WARNING  tuned.plugins.base: Unknown option 'ac97_powersave' for plugin 'AudioPlugin'.
2013-03-29 14:11:23 +01:00
Jaroslav Škarvada
701da90a02 functions removal: ported some profiles (not all) 2012-10-10 22:36:49 +02:00
Jaroslav Škarvada
f2fa467a12 tuned: added balanced profile and it is the default now
tuned: moved default profile into profiles-compat
2012-03-30 12:53:43 +02:00