1
0
Fork 0
Commit graph

1600 commits

Author SHA1 Message Date
Jan Zerdik
e6dda32f70 Adding support for nvme subsystem block devices and adding tests so it won't throw errors on hdparms commands.
Resolves: rhbz#1854816

Signed-off-by: Jan Zerdik <jzerdik@redhat.com>
2022-01-18 12:20:05 +01:00
Jaroslav Škarvada
bc71399a97
new release (2.17.0-rc.1)
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2022-01-02 22:38:56 +01:00
Jaroslav Škarvada
61e6210fec
Merge pull request #392 from yarda/no-balance-cores-fix
cpu_partitioning: fixed no_balance_cores on newer kernels
2022-01-02 20:50:12 +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
7d62870d7d
Merge pull request #389 from jmencak/cond-profile-loading
Add conditional profile loading
2021-12-08 23:37:59 +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
2cc251c3f1 Add conditional profile loading
Normally, inclusion of any profile that is not found in profile
directories (/etc/tuned and /usr/lib/tuned) will fail at profile
application time.

Conditional profile loading can be useful in situations we do not
necessarily expect a certain included profile to exist.  Profile
application failures are undesirable in such cases.  Augment the
TuneD profile hierarchies by adding a functionality to conditionally
include a profile by prefixing its name by '-' symbol.

Example:
[main]
summary=An example TuneD profile demonstrating conditional loading
include=-profile1,profile2

In this example, the profile "profile1" is conditionally loaded/included
and no error/failure will be reported if the profile does not exist.
Then, the profile "profile2" is unconditionally loaded and errors will be
reported if it is not found in profile directories.

Signed-off-by: Jiri Mencak <jmencak@users.noreply.github.com>
2021-10-27 16:38:52 +02:00
Jaroslav Škarvada
3f4ef89f7d
Merge pull request #384 from RHEmployee/sync-with-upstr-guide
Tests: Be in sync with upstreaming guide.
2021-10-19 01:22:44 +02: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
Robin Hack
00a9d5cde4 Tests: Be in sync with upstreaming guide. 2021-10-13 05:21:08 -04:00
Jaroslav Škarvada
bcbf2a5489
Merge pull request #375 from CZerta/configobj_removal
Removing dependency on python-configobj.
2021-08-19 00:47:56 +02:00
Jan Zerdik
063277a05b Removing dependency on python-configobj.
Resolves: rhbz#1936386

Signed-off-by: Jan Zerdik <jzerdik@redhat.com>
2021-08-18 10:28:27 +02:00
Jaroslav Škarvada
88240b5971
Merge pull request #376 from jmencak/tuned-profiles-openshift
Add OpenShift profiles.
2021-08-04 11:50:29 +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
7ba8d5d694
Merge pull request #368 from yarda/scheduler-ps-cgroup-blacklist
scheduler: new option cgroup_ps_blacklist
2021-07-23 11:29:12 +02:00
Jaroslav Škarvada
438ff4f899
scheduler: new option cgroup_ps_blacklist
This option allows skipping processes belonging to the blacklisted
cgroups. It matches the regular expression against items from the
/proc/PID/cgroups. Items/lines from the /proc/PID/cgroups are separated
by commas ','. Each item consists of the:
hierarchy-ID:controller-list:cgroup-path

Example of the content on which the regular expression is run:
10:hugetlb:/,9:perf_event:/,8:blkio:/

For cgroups v2 the hierarchy-ID is 0 and the controller-list is ''.
For details see man cgroups.7. The only difference from the man
cgroups.7 is that it uses commas for separation of the items instead
of the new lines. The commas are added by the python-linux-procfs
(it's the behavior of the python-linux-procfs-0.6.3).

Multiple regular expressions can be separated by the semicolon ';'.

Examples:
[scheduler]
isolated_cores=1
cgroup_ps_blacklist=:/daemons\b

It will move all processes away from the core 1 except processes which
belongs to the cgroup '/daemons'. The '\b' is regular expression
metacharacter that matches word boundary (i.e. it matches only
'/daemons', not e.g. '/daemonset' or '/group/daemons'). In this example
we do not care about the hierarchy-ID and the controller-list.

[scheduler]
isolated_cores=1
cgroup_ps_blacklist=\b8:blkio:/,|$

In this example it skips processes belonging to the cgroup '/',
with hierarchy-ID 8 and controller-list blkio. The ',|$' is needed
because the '\b' matches word boundary and the non-alphanumeric
character '/' is not taken as a word, thus the '\b' will not match there.

[scheduler]
isolated_cores=1
cgroup_ps_blacklist=:/daemons\b;:/test\b

In this example two regular expressions are used which tries to match
'/daemons' and '/test' cgroup-path. If either matches (i.e. the OR operator),
the process is skipped (i.e. not moved away from the core 1).

Resolves: rhbz#1980715

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2021-07-23 10:55:00 +02:00
Jaroslav Škarvada
e4733cdb63
new release (2.16.0)
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2021-07-21 20:41:55 +02:00
Jaroslav Škarvada
be5d8d60fd
Merge pull request #373 from jmencak/skip_grub_config_true_false
bootloader: make skip_grub_config consistent with initrd_remove_dir
2021-07-21 20:31:13 +02:00
Jiri Mencak
ba08c1737d bootloader: make skip_grub_config consistent with initrd_remove_dir
Currently, skip_grub_config and initrd_remove_dir options in the
bootloader plug-in are inconsistent.  This commit fixes this issue.

The skip_grub_config=VALUE does not change grub configuration if VALUE
is true.  However, cmdline options are still processed, and the result
is used to verify the current cmdline.  Only 'y', 'yes', 't', 'true' and
'1' (case insensitive) are accepted as true values for this option.
Other values are interpreted as false.

Example:

[bootloader]
skip_grub_config=True
cmdline=+systemd.cpu_affinity=1

Signed-off-by: Jiri Mencak <jmencak@users.noreply.github.com>
2021-07-21 11:55:52 +02:00
Jaroslav Škarvada
bc3f737a00
new release (2.16.0-rc.1)
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2021-07-07 23:46:06 +02:00
Jaroslav Škarvada
b48ccbe88e
Merge pull request #332 from CZerta/python_decorator_removal
Removing depedency on python-decorator package.
2021-07-07 14:17:09 +02:00
Jaroslav Škarvada
e4c0daab5d
Merge pull request #361 from adriaan42/bootloader-skip-grub-config
bootloader: support for systems that don't have grub installed
2021-07-07 14:15:10 +02:00
Adriaan Schmidt
8f19120379 bootloader: support for systems that don't have grub installed
This makes some changes to address systems that don't support changing
of grub configurations

* Introduce new option "skip_grub_config". When this is set, no changes to grub
  config are attempted. cmdline options are still processed, and the result is
  used to verify the current cmdline.
* Improve reporting on expected/found/missing cmdline arguments.
* Add "no_error = True" to the call that reads /etc/default/grub in _bls_enabled().

Signed-off-by: Adriaan Schmidt <adriaan.schmidt@siemens.com>
2021-07-07 11:16:08 +00:00
Jan Zerdik
28a4149685 Removing depedency on python-decorator package.
Resolves: rhbz#1936421

Signed-off-by: Jan Zerdik <jzerdik@redhat.com>
2021-07-07 10:40:41 +02:00
Jaroslav Škarvada
7fc63d571a
Merge pull request #330 from CZerta/fixing_active_profile
Wrong signal while switch to nonexisting profile
2021-07-01 22:47:12 +02:00
Jaroslav Škarvada
b0d2456dd0
Merge pull request #359 from CZerta/bootloader_rpm_ostree_support
Adding support for rpm-ostree system to bootloader plugin
2021-07-01 22:01:35 +02:00
Jan Zerdik
835db34f8a Adding support for rpm-ostree system to bootloader plugin.
Resolves: rhbz#1950164

Signed-off-by: Jan Zerdik <jzerdik@redhat.com>
2021-07-01 13:32:42 +02:00
Jaroslav Škarvada
6beca87e84
Merge pull request #365 from yarda/sched-changes
scheduler: abstract sched_ and numa_ knobs
2021-07-01 12:54:25 +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
Jaroslav Škarvada
88ded8d1fc
Merge pull request #363 from vianpl/rhbz#1976825
realtime-virtual-host: Disable kvm.nx_huge_pages module option
2021-06-28 20:32:13 +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
Jaroslav Škarvada
5fbc59c9ba
Merge pull request #360 from yanirq/master
Fix conditional order for setting net device param
2021-06-22 10:11:27 +02:00
Yanir Quinn
f7e7269e92 Fix conditional for setting net device param
The conditional for setting a net device parameter has
a faulty order where it can potentially try to first cast a string to int
in a wrong manner and only then check if the value is a specific integer value.

current order:
1. check if a net device has a combined channel containing 0
2. check if a net device has a combined channel containing 'n/a'

fixed order:
robust check to see if device parameter is either 0 or 'n/a'

Signed-off-by: Yanir Quinn <yquinn@redhat.com>
2021-06-22 10:39:02 +03:00
Jaroslav Škarvada
94892671ee
Merge pull request #357 from yarda/multiple-profiles-loading
profiles: fix loading multiple profiles if there are repeating profiles
2021-06-09 14:08:26 +02:00
Jaroslav Škarvada
bd6697f8f4
profiles: fix loading multiple profiles if there are repeating profiles
The original idea behind this patch is credited to
Jiří Mencák <jmencak@redhat.com>.

Resolves: rhbz#1825882

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2021-06-09 11:00:18 +02:00
Jaroslav Škarvada
d32240c7bb
Merge pull request #356 from pjps/RHBZ#1820626
RHBZ#1820626 profiles: enable isolate_managed_irq by default
2021-06-08 09:21:15 +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
Jaroslav Škarvada
be66dd76a2
Merge pull request #334 from yarda/project-rename
Project renamed to TuneD
2021-06-03 17:41:27 +02:00
Jaroslav Škarvada
78df85affe
Merge branch 'master' into project-rename 2021-06-03 17:20:55 +02:00
Jaroslav Škarvada
91e252aaf8
Merge pull request #355 from yarda/ci-update
tests: added rlRun python detect description to beaker test
2021-06-03 16:42:54 +02:00
Jaroslav Škarvada
871e68bea1
tests: added rlRun python detect description to beaker test
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2021-06-03 16:08:55 +02:00