1
0
Fork 0
Commit graph

287 commits

Author SHA1 Message Date
Jaroslav Škarvada
cff5e91056
Merge pull request #647 from superm1/cpb-boost
Add support for controlling amd-pstate core performance boost
2024-07-24 19:26:38 +02: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
Pavol Žáčik
b3b0892d5b
Install script functions and recommend.d to /usr/lib/tuned/
In #615, they were accidentally moved to /usr/lib/tuned/profiles/
where all profiles were migrated.

This also changes the location of `functions` file within
the repository, separating it from the profiles themselves.

Resolves #642.
2024-06-19 15:41:37 +02:00
Jaroslav Škarvada
5512f1df09
Merge pull request #633 from yarda/drop-unused-amd-variable
throughput-performance: dropped unused AMD related variable
2024-05-23 21:29:48 +02:00
Mario Limonciello
c95380a10c Turn on amdgpu panel power savings in balanced-battery
This will be enacted when tuned-ppd detects a change to battery
while in the balanced mode.
2024-05-23 11:20:21 -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
Jaroslav Škarvada
c14e156e63
Merge pull request #620 from yarda/sap-netweaver-vm-max-map-count-fix
sap-netweaver: increased vm.max_map_count
2024-05-23 13:57:07 +02:00
Jaroslav Škarvada
9d145a05aa
throughput-performance: dropped unused AMD related variable
Leftover from c6d6fdcc4c

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2024-05-13 10:32:36 +02:00
Jaroslav Škarvada
04ead944fd
sap-netweaver: increased vm.max_map_count
Resolves: RHEL-31757

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2024-04-08 11:03:47 +02:00
Mario Limonciello
6ef5b58ea8 tuned-ppd: Detect battery change events
power-profiles-daemon has the ability to detect battery change events
using upower and to apply different tuned settings based upon whether
plugged into power or not.

In PPD this is used specifically to set the energy performance preference
differently in the 'balanced' profile, but there is no reason that this
concept can't actually apply to all profiles.

Add support for detecting battery change events and apply a profile
specified in ppd.conf for battery in the different PPD states.
2024-04-04 07:13:06 -05:00
Jaroslav Škarvada
03369da748
network-throughput: increased net.ipv4.tcp_rmem default value
Resolves: RHEL-25847

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2024-02-19 13:44:41 +01:00
Jiri Mencak
14d40cfa6e Do not report errors on systems with no wifi
This change does not attempt to _wifi_set_power_level()
unless /proc/net/wireless exists.

Other changes: fix a typo.

Signed-off-by: Jiri Mencak <jmencak@users.noreply.github.com>
2024-01-24 15:29:52 +01: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
Jaroslav Škarvada
b9e20541ec
Merge pull request #581 from ryanabx/energy-performance-preference
profiles: add energy_performance_preference hints to profiles
2024-01-18 15:56:46 +01:00
Jaroslav Škarvada
e8bede2b67
Merge pull request #550 from yarda/sap-hana-kvm-guest-fix-ws
sap-hana-kvm-guest: fix whitespaces
2024-01-18 10:59:59 +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
Luiz Capitulino
793e6c8319 profiles: Improve 'isolated_cores=' help text
Just explain what isolated_cores= is for and recommend to only have one
isolated_cores= line to avoid wrong system configuration.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2023-11-28 11:15:47 +01:00
Jiri Mencak
158a3e83c9 Return 0 when ksm services do not exist
When ksm or ksmtuned services do not exist, return 0 so that we do not
generate ERRORs in TuneD logs.

Resolves: OCPBUGS-19656

Signed-off-by: Jiri Mencak <jmencak@users.noreply.github.com>
2023-09-24 20:54:34 +02:00
Jaroslav Škarvada
b7c8b19214
sap-hana-kvm-guest: fix whitespaces
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2023-08-21 01:24:45 +02:00
Marcelo Tosatti
cbcd1df901 network-latency: enable rcu_normal_after_boot=1 kernel parameter
The rcu_normal_after_boot=1 kernel parameter (which is enabled by
default on CONFIG_PREEMPT_RT kernels) avoids the use of IPIs
to expedite the runtime of synchronize_rcu_expedited() callers.

Enable this in tuned to avoid such IPIs on !CONFIG_PREEMPT_RT kernels
as well.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2023-06-20 14:15:42 -03:00
Marcelo Tosatti
925898b522 remove ktimer_lockless_check sysfs setting from realtime-virtual profiles
The ktimer_lockless_check interface was removed from Red Hat kernels.
Drop the tuned configuration as well.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2023-06-20 14:15:42 -03:00
Marcelo Tosatti
3747701d1c move rtentsk to network-latency profile
The interruptions avoided by the rtentsk logic:

"Add plugin to open a socket with SOF_TIMESTAMPING_OPT_TX_SWHW.

This is for avoiding interruptions due to static key IPIs due
to opening socket with timestamping enabled (by opening a
socket ourselves the static key is kept enabled)."

Are also desired on systems that use cpu-partitioning.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2023-06-20 14:15:42 -03:00
Marcelo Tosatti
c9c81093be move "tsc=reliable" setting from realtime to network-latency tuned configuration
Commit 49cc817871
("realtime: Set tsc as 'reliable'") reads:

"We already disable the clocksource watchdog, it's there to double-check
whether clock results are coherent between reads. But a new reliability
test was introduced in recent kernels[1], tracking tsc drift between
CPUs[2]. It works by programming timers on all CPUs, including isolated
ones, and checks whether the tsc was adjusted in between runs. This
introduces unwarranted latency on real time systems. So let's promote
tsc to 'reliable', which disables both checks."

The timer is also undesired interruption to systems that use cpu-partitioning.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2023-06-20 14:15:42 -03:00
Marcelo Tosatti
4a622d2b5f unify common sysctl settings between realtime and cpu-partitioning profiles
The following sysctl settings are the same between cpu-partitioning and
realtime profiles:

kernel.hung_task_timeout_secs = 600
kernel.nmi_watchdog = 0
vm.stat_interval = 10
kernel.timer_migration = 0

Unify them in the network-latency profile, parent of both profiles.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2023-06-20 14:15:42 -03:00
Jaroslav Škarvada
f65b43d1dd
Merge pull request #529 from newkit/master
Added sap-hana-kvm-guest profile
2023-06-14 10:51:06 +02:00
Jaroslav Škarvada
503540fffb
Merge pull request #525 from uniontech-lilinjie/spell-err
fix typo
2023-06-14 10:45:52 +02:00
Tim Rozet
1c1da2af04 Remove setting ip forwarding via openshift profile
With openshift/machine-config-operator#3676 we
removed globally setting ip forwarding in MCO. We should not be setting
it in the default profile for OpenShift. We now set it on a per
interface basis as needed. However, by setting proc/sys/net/ipv4/forward
rather than (forwarding) it will reset all the values:

"This variable is special, its change resets all configuration
parameters to their default state (RFC1122 for hosts, RFC1812
for routers)"

We suspect this causes upgrade to fail. NTO sets this to 1, which then
resets all the per interface config that OVNK wrote. Then during upgrade
when there is a tuned profile change, the config change is rolled back
so forward is 0, and now there is no connectivity to kapi and upgrade
fails.

Signed-off-by: Tim Rozet <trozet@redhat.com>
2023-05-30 15:42:52 -04:00
Nils Koenig
ac02137019 Added sap-hana-kvm-guest profile
- Corresponding BZ https://bugzilla.redhat.com/show_bug.cgi?id=2173740
    - Updated man page
    - Updated spec file
2023-05-09 14:58:20 +02:00
lilinjie
6030c5cbae fix typo
Signed-off-by: lilinjie <lilinjie@uniontech.com>
2023-03-30 15:04:44 +08:00
Evgeni Golov
3854797abb explicitly use /bin/bash for tuned scripts 2023-02-19 15:23:12 +01:00
Jaroslav Škarvada
8e893c4a9a
Merge pull request #491 from yarda/rhbz1998310
throughput-performance: set net.core.somaxconn to at least 2048
2023-02-08 02:05:50 +01:00
Jaroslav Škarvada
592d0ebeb0
Merge pull request #451 from liangxiao1/aws
profiles: added aws profile for aws ec2 instances
2023-02-08 00:32:33 +01:00
Jaroslav Škarvada
097d6294d7
throughput-performance: set net.core.somaxconn to at least 2048
Resolves: rhbz#1998310

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2023-01-30 11:45:06 +01:00
Christophe Fontaine
3bdc7ab381 Add new cpu-partitioning-powersave profile
The new profile sets the intel_acpi driver to passive mode to
be able to set the standard acpi governors (ondemand/userspace)
and provides more flexibility on the C-states, as it is exposed
as a new variable.

Signed-off-by: Christophe Fontaine <cfontain@redhat.com>
2022-11-22 17:50:30 +01:00
Jaroslav Škarvada
a56a2bfb58
Fixed sysvinit path
It's kept for legacy purposes, but the path should be correct.

Resolves: rhbz#2118301

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2022-10-20 15:17:43 +02:00
Jaroslav Škarvada
673260a5c3
Merge pull request #463 from jmencak/hpc-compute-rm-hugepages_treat_as_movable
hpc-compute profile: Remove vm.hugepages_treat_as_movable
2022-10-03 01:14:32 +02:00
Jaroslav Škarvada
190b1a4d26
Merge pull request #454 from dagrayvid/openshift-remove-sched
profiles: drop sched_ tuning from openshift-control-plane
2022-10-03 01:10:23 +02:00
Valentin Schneider
fabcfe858d realtime-virtual-*: Tune priority of new ktimers threads
The PREEMPT_RT upstream tree [1] is reintroducing a per-CPU kthread for
handling timer expiry named ktimers/${cpu}, and RHEL-RT is following this
approach [2].

The recommended priority tuning for that kthread is to simply match that of
ksoftirqd, which is what is implemented here.

Note that ktimersoftd is the predecessor of ktimers, and isn't present on
RT kernels newer than v5.0.19-rt11 / RHEL-RT 7.

[1]: https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git
[2]: https://bugzilla.redhat.com/show_bug.cgi?id=2122220

Resolves: rhbz#2122220
Signed-off-by: Valentin Schneider <vschneid@redhat.com>
2022-09-29 18:55:34 +01:00
Jiri Mencak
f789d17773 hpc-compute profile: Remove vm.hugepages_treat_as_movable
In the old kernels, vm.hugepages_treat_as_movable tunable was aimed at
reducing memory fragmentation.  Things have changed since then and this
tunable is no longer present in recent kernels:
https://lore.kernel.org/lkml/20171003072619.8654-1-mhocko@kernel.org/t/

Its presence in the hpc-compute profile causes TuneD to log errors.
Remove it.

Signed-off-by: Jiri Mencak <jmencak@users.noreply.github.com>
2022-09-14 13:42:26 +02:00
Jiri Mencak
8b57a12efc Profile openshift: increase fs.aio-max-nr tunable
The kernel tunable fs.aio-max-nr specifies the maximum number of events
specified on the io_setup() call for all currently active aio contexts.
On large systems this causes issues with the io_setup() call failing
with EAGAIN.  Libvirt already increases this setting to 1048576:
96e99e4948/src/remote/libvirtd.sysctl

The only potential drawback of a larger limit is that a malicious users
could issue parallel io_setup() requests to cause the kernel to set
aside memory.

Signed-off-by: Jiri Mencak <jmencak@users.noreply.github.com>
2022-09-06 10:00:03 +02:00
David Gray
ffb56f0011 profiles: drop sched_ tuning from openshift-control-plane
According to testing done by the kernel QE and performance teams,
the sched_* tunables should be dropped in several profiles.

The openshift-control-plane profile is based on other profiles
which have already dropped these tunables (network-latency,
throughput-performance).
2022-08-10 16:31:32 -04:00
Jaroslav Škarvada
f4f4d2b9cf
Merge pull request #453 from yarda/builtin_function_calc_isolated_cores
builtin functions: added calc_isolated_cores function
2022-08-09 16:41:02 +02:00
Jaroslav Škarvada
ba5c604fe2
Merge pull request #372 from adriaan42/profiles-kernel-thread-regexes
profiles: improve regexes to match kernel threads
2022-08-09 16:37:58 +02:00
Jaroslav Škarvada
39e6d14bdf
builtin functions: added calc_isolated_cores function
The calc_isolated_cores function expands to the list of cores to
isolate. It accepts optional argument which specifies how many cores
from each socket reserve for housekeeping. If not specified, one core
from each socket is reserved for housekeeping.

Example:
Machine with 2 sockets, each 4 cores, using the following user variable
configuration file, e.g. /etc/tuned/realtime-variables.conf:
isolated_cores=${f:calc_isolated_cores:2}

It will expand to:
isolated_cores=2, 3, 6, 7

I.e. cores 0, 1 and 4, 5 will be used for housekeeping.

Also updated the TuneD profiles to use this builtin function for
isolated_cores preset.

Resolves: rhbz#2093847

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2022-08-09 13:51:45 +02:00
Xiao Liang
13bc3b5df1 profiles: added aws profile for aws ec2 instances
Resolves: rhbz#1935848

Signed-off-by: Xiao Liang <xiliang@redhat.com>
2022-06-23 19:49:44 +08:00
Jaroslav Škarvada
d04b978c6a
Merge pull request #423 from vianpl/tsc
realtime: Set tsc as 'reliable'
2022-05-17 19:02:32 +02:00
Jiri Mencak
ccff8454de openshift profile: tuning for NVMe devices
AWS Nitro instances need special tuning for NVMe devices:
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nvme-ebs-volumes.html#timeout-nvme-ebs-volumes

[sysfs]
/sys/module/nvme_core/parameters/io_timeout=4294967295
/sys/module/nvme_core/parameters/max_retries=10

This tuning should probably be moved to Cloud Provider-specific profiles
once the functionality is implemented.

Signed-off-by: Jiri Mencak <jmencak@users.noreply.github.com>
2022-04-29 12:03:24 +02:00
Nicolas Saenz Julienne
49cc817871 realtime: Set tsc as 'reliable'
We already disable the clocksource watchdog, it's there to double-check
whether clock results are coherent between reads. But a new reliability
test was introduced in recent kernels[1], tracking tsc drift between
CPUs[2]. It works by programming timers on all CPUs, including isolated
ones, and checks whether the tsc was adjusted in between runs. This
introduces unwarranted latency on real time systems. So let's promote
tsc to 'reliable', which disables both checks.

There shouldn't be any impact on old nor new setups. First, this test
didn't exist in the past, so any eventual drift was left uncorrected.
Second, most telco and HPC use-cases will make heavy use of tsc in
user-space, and its reliability is already assumed in the system's
design.

[1] c7719e793478 x86/tsc: Add a timer to make sure TSC_adjust is always
		 checked
[2] Generally caused by rogue BIOSes adjusting the tsc on a CPU and not
    doing so on the rest

Signed-off-by: Nicolas Saenz Julienne <nsaenzju@redhat.com>
2022-03-29 18:45:21 +02:00
Paolo Abeni
e1b21f23c9 raise the netfilter hash table size in openshift/atomic-{host,guest}
to match the max netfilter conntrack entries, reducing such hash
table load.

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2022-02-09 17:15:46 +01:00
Jaroslav Škarvada
830d7b2d8d
profiles: use cstate.id_no_zero instead of the cstate.id
Related: rhbz#2034069
Related: rhbz#2002744

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2022-02-01 18:35:17 +01:00