1
0
Fork 0
Commit graph

241 commits

Author SHA1 Message Date
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
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
Nicolas Saenz Julienne
288ac9ba9d realtime-virtual-*: Set irqaffinity through kernel command line
I/O APIC, one of intel's interrupt controllers, can only change the
affinity on an IRQ line during an EOI (end of interrupt)[1]. In other
words, on boot, although tuned will set a preferred IRQ affinity, it
might not be applied until the next time the interrupt is triggered.
This might be right away, or hours later while oslat or a
latency-sensitive workload is running.

To mitigate this set the 'irqaffinity='kernel command-line[2] option to
match the non-isolated CPU mask when running the realtime-virtual-*
profiles. This way we'll get the right affinity regardless of the
situation stated above.

[1] For more reference see kernel's ioapic_ack_level() function and the
    IRQD_SETAFFINITY_PENDING flag.

[2] Actually, this is why irqaffinity was introduced in the first place,
    see kernel commit fbf198030e0b0.

Resolves: rhbz#1974820
Signed-off-by: Nicolas Saenz Julienne <nsaenzju@redhat.com>
2021-06-28 18:49:29 +02:00
P J P
dc8bdeff55 profiles: enable isolate_managed_irq by default
Enable 'isolate_managed_irq' parameter by default. It is important
for -realtime systems. When it is enabled, kernel directs interrupts
to the housekeeping CPUs and thus reduces latencies for the isolated
ones.

Fixes: RHBZ#1820626
2021-06-07 18:28:52 +05:30
Jaroslav Škarvada
31f1d0f45b
Merge pull request #352 from pjps/RHBZ#1817827
RHBZ#1817827 profiles: add isolate_managed_irq & netdev_queue_count variables
2021-06-07 00:36:36 +02:00
P J P
f860e726b9 profiles: add isolate_managed_irq & netdev_queue_count variables
For realtime KVM host and guests it is important to use housekeeping
CPUs for processing interrupts (IRQs) and network packet transmission.
So that isolated CPUs are used for -realtime tasks assigned to them.

The 'isolate_managed_irq' and 'netdev_queue_count' variables help
to configure kernels towards this end. Users can define these
variables via tuned(8) configuration files.

Fixes: RHBZ#1817827
2021-06-04 11:31:08 +05:30
Jaroslav Škarvada
92771e39b7
Merge pull request #354 from superjamie/network-udp-mem
network-throughput: Remove explicit udp_mem amount
2021-06-03 19:53:03 +02:00
Jaroslav Škarvada
7370fe723a
Merge pull request #335 from yarda/mssql-update
mssql: update profile to be in sync with MS recommendations
2021-06-03 18:34:05 +02:00
Jaroslav Škarvada
f9711b147c
mssql: update profile to be in sync with MS recommendations
Resolves: rhbz#1942733

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2021-06-03 17:58:31 +02:00
Jamie
89eef3760d
network-throughput: Remove explicit udp_mem amount
Explicitly setting a value for udp_mem does not make sense.

An explicit value does not take into account how much RAM the user's system
has, so setting values here like "12G 16G 64G" works for few specific use
cases but makes no sense for others.

This actually could cause problems if applied on a system with <16G RAM
and UDP protocol usage is allowed to grow as large as it likes, causing
kernel memory pressure in other areas.

Remove these values for now. If still required, a better way to calculate
a larger value based on system RAM can be implemented later.

Signed-off-by: Jamie Bainbridge <jamie.bainbridge@gmail.com>
2021-06-03 14:35:59 +10:00
Jaroslav Škarvada
01fecec1d1
Merge pull request #344 from yarda/rhbz1957897
cpu-partitioning,realtime: set cpumasks of all workqueues
2021-05-20 10:59:25 +02:00
P J P
6407ca44c6 profiles: improve realtime verify functions
tuned(8) realtime-virtual-{host|guest} profiles set Kernel and
KVM module parameters via script.sh plugin. These parameters are
to be verified in a verify() function, invoked by tuned-adm verify
command.

This patch updates verify() functions to validate KVM module
parameters.

It moves kernel parameters to the tuned.conf file under the
[sysfs] & [sysctl] plugin sections. And removes call to
disable_ksm function, no longer required.

Fixes: RHBZ#1947858
2021-05-13 15:21:48 +05:30
Jaroslav Škarvada
38f7e63611
cpu-partitioning,realtime: set cpumasks of all workqueues
Related: rhbz#1957897

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2021-05-12 21:17:27 +02:00
Jiri Mencak
571a255d57 Prevent unnecessary ksm* error log messages.
Check the presence of ksm and ksmtuned units before (un)masking them.

Signed-off-by: Jiri Mencak <jmencak@users.noreply.github.com>
2021-03-17 18:05:21 +01:00
Nitesh Narayan Lal
c002d93b59 realtime: added support for netdev_queue_count
This allows the user to adjust the queue count for each
network device.

Also add check_net_queue_count built-in function.

The functions check if the user has specified any
queue count value or not. If no value is passed the function
returns the number of housekeeping CPUs as the queue count.

Resolves: rhbz#1846767

Signed-off-by: Nitesh Narayan Lal <nitesh@redhat.com>
2021-01-22 11:55:39 -05:00
Jaroslav Škarvada
2321625400
Merge pull request #289 from yarda/rt-entsk-plugin
Rt entsk plugin
2020-11-13 18:30:42 +01:00
alexey-mr
57efbb2ef2 Added contrail dpdk into ps_blacklist
- https://github.com/redhat-performance/tuned/issues/297
2020-10-14 11:08:15 +03:00
Jaroslav Škarvada
ba7286e375
Merge pull request #290 from kofemann/postgres-profile
added postgresql server profile
2020-08-31 08:47:15 +02:00
Tigran Mkrtchyan
f7ecad0ae0 added postgresql server profile
A new tuned profile for PostgreSQL database server.

This profile is based of information collected from various
presentations about Linux tuning at PGConf.

See: https://www.socallinuxexpo.org/sites/default/files/presentations/scale_kosmodemiansky_linux_internals.pdf

Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
2020-07-31 20:49:11 +02:00
Christophe Fontaine
bac2055e4b realtime-virtual-host profile: exclude ovs-vswitchd pmds
Like the cpu-partitioning profile, exclude all 'pmd' threads
to avoid repinning ovs-vswitchd pmds.

Resolves: rhbz#1861767

Signed-off-by: Christophe Fontaine <cfontain@redhat.com>
2020-07-29 16:44:22 +02:00
Marcelo Tosatti
8aef56287b realtime profile: use rtentsk plugin
Use rt-entsk tuned plugin and drop systemctl service usage.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2020-07-28 12:48:29 +02:00
Marcelo Tosatti
51c50a3a18 realtime-virtual-host profile: remove lapic advancement calculation
The LAPIC advancement improvement is minimal (3 or 4 us) and its
calculation has shown to be problematic under certain
scenarios (for example if qemu-kvm is not installed).

Remove it.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2020-07-22 15:17:48 +02:00
Jaroslav Škarvada
f1516f1a5b
Merge pull request #285 from yarda/ubuntu-path-fix
cpu-partitioning: do not hardcode path to mktemp
2020-07-22 10:12:00 +02:00
Jaroslav Škarvada
766dd06def
Merge pull request #283 from yarda/amd-performance-regression-fix
throughput-performance: fix performance regression on AMD
2020-07-22 10:11:11 +02:00
Jaroslav Škarvada
85f0e3297b
cpu-partitioning: do not hardcode path to mktemp
E.g. Ubuntu uses /bin/mktemp, while e.g. Fedora uses /usr/bin/mktemp.
There is probably no need to hardcode the path, so rely on the system path.

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2020-07-03 22:45:34 +02:00
Jaroslav Škarvada
f511ad5d48
throughput-performance: fix performance regression on AMD
It turned out that disablement of the numa_balancing could result in
upto 20% performance drop on some loads.

Related: rhbz#1746957

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2020-06-30 15:39:18 +02:00
Luis Bolinches
fb06eefe62 Update Spectrum Scale ECE profile
Signed-off-by: Luis Bolinches <luis.bolinches@fi.ibm.com>
2020-06-22 10:53:08 +03:00
Jaroslav Škarvada
af9e64a213
Merge pull request #276 from yarda/marvell-amd
Arch specific tuning for Marvell ThunderX and AMD
2020-06-05 18:29:56 +02:00
Jaroslav Škarvada
0bdf0a2227
Merge pull request #274 from olysonek/irqbalance-plugin
Add irqbalance plugin
2020-06-05 18:29:07 +02:00
Ondřej Lysoněk
0509247f8b realtime: Use the irqbalance plugin
Use the new irqbalance plugin instead of a script to set up
irqbalance.

I'm placing the 'irqbalance' instance before the 'script' instance so
that it's executed at the same time as the script, however I don't
think the 'irqbalance' instance needs to be ordered in any specific
way and could be placed almost anywhere.

Resolves: rhbz#1784645

Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
2020-06-05 10:23:42 +02:00
Ondřej Lysoněk
462df2610c cpu-partitioning: Use the irqbalance plugin
Use the new irqbalance plugin instead of a script to set up
irqbalance.

Note that I'm not setting priority for the 'irqbalance' instance,
whereas the 'script' instance has a priority of 5. However, this was
added just for initrd image generation in commit 843dc8cf5f
and I don't think the irqbalance instance needs to be ordered in any
specific way.

Resolves: rhbz#1784645

Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
2020-06-05 10:23:42 +02:00
Jaroslav Škarvada
f87263ae20
throughput-performance: added arch specific tuning for AMD
Resolves: rhbz#1746957

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2020-06-04 17:17:30 +02:00
Jaroslav Škarvada
5041abf70a throughput-performance: added arch specific tuning for Marvell ThunderX
Resolves: rhbz#1746961

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2020-06-04 17:15:56 +02:00
Jaroslav Škarvada
8fd6b5e220
Added new profile optimize-serial-console
Profile which tunes down I/O activity to the serial console by reducing the
printk value. This should make the serial console more responsive.
This profile is intended to be used as an overlay on other
profiles (e.g. throughput-performance profile), example:
 # tuned-adm profile throughput-performance optimize-serial-console

Also minor fixes to the man page quoting.

Resolves: rhbz#1840689

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2020-05-28 15:26:39 +02:00
Jaroslav Škarvada
491d133495
Merge pull request #261 from bolinches/master
Spectrum Scale ECE profile
2020-05-11 17:29:39 +02:00
Luis Bolinches
7ce1772a78 Spectrum Scale ECE profile
Signed-off-by: Luis Bolinches <luis.bolinches@fi.ibm.com>
2020-05-11 12:22:39 +03:00
Jaroslav Škarvada
621464599b
network-latency: used unique cmdline suffix
related: rhbz#1816168

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2020-05-07 14:16:00 +02:00
Jaroslav Škarvada
0cb964ec26
Merge pull request #260 from jmencak/isolate_managed_irq-inherit
Enable isolate_managed_irq to be defined in child profiles.
2020-04-29 17:29:17 +02:00