When tuned is running in containerized environments such as OpenShift, dracut
is not being used. Ignore errors when trying to run dracut as it might not
exist on the system. Therefore, do not report ERRORs when running a custom
profile script. This will prevent Tuned profiles in OpenShift going degraded.
Resolves: OCPBUGS-79018
Signed-off-by: Jiri Mencak <jmencak@users.noreply.github.com>
Commit 068928e ("Add support for controlling amd-pstate core
performance boost") started setting the newly-introduced `boost`
parameter in the balanced and powersave profiles, but forgot to do the
same in the performance profiles. The net result was that transitioning
directly from the powersave profile to a performance profile would leave
boosting disabled.
Fix this by setting boost=1 explictly in all performance-oriented
profiles (i.e., those with a min_perf_pct of 100).
Fixes: 068928e ("Add support for controlling amd-pstate core performance boost")
Apply specific kernel network tuning parameters to the OpenShift profile
(/profiles/openshift/tuned.conf) to support high bandwidth-delay product links.
The following TCP settings are added:
net.ipv4.tcp_notsent_lowat=131072: Sets tcp_notsent_lowat to a value intended to balance throughput and latency while limiting total socket memory usage.
net.ipv4.tcp_slow_start_after_idle=0: Disables slow start after a connection has been idle, allowing immediate maximum throughput upon resuming data transfer.
net.ipv4.tcp_rmem="4096 131072 16777216": Increases the maximum TCP receive buffer size to improve performance on high-bandwidth-delay product connections.
net.ipv4.tcp_wmem="4096 16384 16777216": Increases the maximum TCP send buffer size for similar reasons.
These changes are based on work done by Cloudflare for improving TCP
performance on high bandwidth-delay product links but are more conservative in adjusting rmem and wmem
Reference: https://blog.cloudflare.com/optimizing-tcp-for-high-throughput-and-low-latency/
Signed-off-by: Graham Heffern <gheffern@gmail.com>
Wrong hook directory can make the machine unbootable:
https://issues.redhat.com/browse/RHEL-119889
Also added workaround for currently non-functional systemd plugin
which doesn't include the systemd config into the initrd image.
Resolves: RHEL-40619
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
Same for dirty_background_ratio and dirty_background_bytes.
Using both the ratio and the bytes is not compatible with
the current profile inheritance implementation, because it
is not possible for dirty_bytes in a child profile to override
dirty_ratio in its parent profile.
Resolves: RHEL-101578
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>
Before the `scheduler` plugin, `tuna` was used for CPU isolation.
There is a leftover use in the verification of the `realtime` profile.
Removing that, the dependency on the `tuna` package, and now-empty
scripts from the realtime profiles.
closes#594
Signed-off-by: Adriaan Schmidt <adriaan.schmidt@siemens.com>
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.
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>
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.
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>
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.
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>
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>
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>
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>
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>
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>
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>