1
0
Fork 0
Commit graph

277 commits

Author SHA1 Message Date
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
Adriaan Schmidt
ca7af667d9 profiles: improve regexes to match kernel threads
* add "^\[" to the start of the regexes, so they only match
    the intended kernel threads, and not processes that have
    the name of a kthread in their cmdline.
  * remove unneccessary ".*" at start/end of regexes

Signed-off-by: Adriaan Schmidt <adriaan.schmidt@siemens.com>
2022-01-10 13:26:05 +00:00
Jaroslav Škarvada
83ee596ef2
cpu_partitioning: fixed no_balance_cores on newer kernels
I.e. kernels without the SD_LOAD_BALANCE.

Resolves: rhbz#1874596

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2022-01-02 20:13:30 +01:00
Jaroslav Škarvada
08f3dbca97
Merge pull request #386 from jmencak/openshift-profile-runtime0
openshift profile: workaround high CPU utilization of [scheduler] plug-in
2021-12-08 23:37:17 +01:00
Jaroslav Škarvada
1cb641bd18
Merge pull request #331 from jmencak/ksmtuned-no-errors
Prevent unnecessary ksm* error log messages.
2021-12-08 23:05:01 +01:00
Jiri Mencak
e25d5b4294 openshift profile: workaround high CPU utilization of [scheduler] plug-in.
The [scheduler] plug-in can be very CPU intensive, especially on the
OpenShift platform.  The bug for this issue is tracked by rhbz#1921738.
Until this is fixed, work around this problem in the openshift
parent profile by adding "runtime=0" [scheduler] plug-in option.

Signed-off-by: Jiri Mencak <jmencak@users.noreply.github.com>
2021-10-13 19:04:04 +02:00
Jiri Mencak
ee3773c62d Add OpenShift profiles.
Signed-off-by: Jiri Mencak <jmencak@users.noreply.github.com>
2021-08-02 16:53:53 +02:00
Jaroslav Škarvada
c6d6fdcc4c
profiles: drop sched_ tuning where appropriate
According to the performance team measurements the sched_ tuning
should be dropped in several profiles.

Resolves: rhbz#1957829

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2021-06-30 22:00:19 +02:00
Jaroslav Škarvada
a936fb8844
scheduler: abstract sched_ and numa_ knobs
New kernels (5.13 and newer) moved some sched_ and numa_ knobs from
the sysctl to the debugfs, thus add and abstract these knobs under the
scheduler plugin. With help of this abstraction it will write
the tuning to the correct place according to the kernel used.

Example:
[scheduler]
sched_migration_cost_ns = 500000

Will work on the old kernel the same way as:
[sysctl]
kernel.sched_migration_cost_ns = 500000

I.e. it will write '500000' to the:
/proc/sys/kernel/sched_migration_cost_ns

And on the new kernel it will write '500000' to the:
/sys/kernel/debug/sched/migration_cost_ns

Also updated TuneD profiles.

Resolves: rhbz#1952687

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2021-06-30 19:45:27 +02:00
Jaroslav Škarvada
7118c9463d
Merge pull request #364 from vianpl/rhbz#1974820
realtime-virtual-*: Set irqaffinity through kernel command line
2021-06-28 20:32:54 +02:00
Nicolas Saenz Julienne
e4a0e48886 realtime-virtual-host: Disable kvm.nx_huge_pages module option
The 'nx_huge_pages' option, will force any executable page mapping to be
performed at 4KiB granularity and requires any existing overlapping
huge-page mapping to be also split in 4KiB chunks[1]. This is due to a HW
bug that doesn't affect our NFV use-cases.

The way a huge-page mapping is dropped is by simply deleting the EPT
entry and flushing TLB caches on all affected CPUs. Next vCPU access to
that address will trigger an EPT_VIOLATION, which will jump into the
host for it to handle the page-fault. In our specific case, this means
all isolated CPUs running oslat will hit an EPT_VIOLATION almost exactly
at the same time. Which is bad enough already, but, given our systems
might have a huge number of isolated CPUs, will also create a lot of
contention over the KVM MMU lock. This has been observed to trigger
~100us latency spikes while testing with oslat.

So let's disable the 'kvm.nx_huge_pages' module option.

[1] see kernel commit b7e8c8303ff28

Resolves: rhbz#1976825
Signed-off-by: Nicolas Saenz Julienne <nsaenzju@redhat.com>
2021-06-28 18:53:38 +02:00