1
0
Fork 0
Commit graph

1491 commits

Author SHA1 Message Date
Jaroslav Škarvada
1b0573dab2
scheduler: added default_irq_smp_affinity option
The option 'default_irq_smp_affinity' affects what will be written to the
/proc/irq/default_smp_affinity. The option supports the following values:

calc:
  Content of the /proc/irq/default_smp_affinity will be calculated from
  the 'isolated_cores'. Non-isolated cores are calculated as an inversion
  of the 'isolated_cores'. Then the intersection of the non-isolated cores
  and the previous content of the /proc/irq/default_smp_affinity is
  written to the /proc/irq/default_smp_affinity. If the intersection is
  empty set, then just the non-isolated cores are written to the
  /proc/irq/default_smp_affinity. This behavior is the default if
  option 'default_irq_smp_affinity' is not specified.

ignore:
  The /proc/irq/default_smp_affinity is not touched by Tuned.

cpulist like e.g. '1,3-4':
  The cpulist is unpacked and directly written to the
  /proc/irq/default_smp_affinity

Examples:

[scheduler]
isolated_cores = 1, 2
default_irq_smp_affinity = calc

[scheduler]
isolated_cores = 1, 2
default_irq_smp_affinity = ignore

[scheduler]
isolated_cores = 1, 3
default_irq_smp_affinity = 2, 4

Resolves: rhbz#1896348

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2020-11-12 11:00:18 +01:00
Jaroslav Škarvada
c6e8765c63
Merge pull request #305 from yarda/master
spec: added weak dependency on kmod for modprobe
2020-11-09 21:16:25 +01:00
Jaroslav Škarvada
6c448fcda1
spec: added weak dependency on kmod for modprobe
Fixes: #304

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2020-11-09 20:12:57 +01:00
Jaroslav Škarvada
c532d116ac
Merge pull request #301 from progmaticlab/master
Added contrail vrouter dpdk into ps_blacklist
2020-10-19 10:33:21 +02: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
845bdc59c8
Merge pull request #298 from mrksu/sync-rhel-8-docs
Synchronize documentation files from RHEL 8
2020-10-02 11:37:36 +02:00
Marek Suchánek
35abb7fda0 Fix another reference in the documentation 2020-10-01 20:11:03 +02:00
Marek Suchánek
cf229cc807 Fix various documentation issues in the metadata and references 2020-10-01 20:06:55 +02:00
Marek Suchánek
3187cf348f Manually merge documentation changes from RHEL downstream 2020-10-01 19:47:59 +02:00
Jaroslav Škarvada
5444669800
Merge pull request #293 from yarda/service-plugin
Added plugin 'service'
2020-09-03 12:23:48 +02:00
Jaroslav Škarvada
c85f3ab27d
Added plugin 'service'
The service plugin can handle sysvinit, sysv-rc, openrc, systemd.
Syntax is the following:

[service]
service.sendmail = start,enable,file:${i:PROFILE_DIR}/tuned-sendmail.conf

'start' means to start the service, 'stop' to stop, 'enable' to enable,
'disable' to disable, file:FILE is the overlay configuration file
that will be installed for the service. Multiple directives can be
separated by comma ',' or semicolon ';'. If the directives are
conflicting, the last one will be used. The internal variable
${i:PROFILE_DIR} points to the directory from which the profile is
loaded.

The service plugin supports configuration overlays only for the systemd,
for other init systems this directive is ignored. The configuration
overlay files are copied to the /etc/systemd/system/SERVICE_NAME.service.d/
directories. Upon unloading if the directory is empty, it's removed.

With systemd, the 'start' directive is implemented by 'restart' in order
to allow loading of the service configuration file overlay.

With init systems other than systemd, it works only with the current runlevel.

Resolves: rhbz#1869991

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2020-09-02 16:48:58 +02: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
Jaroslav Škarvada
20aac66a88
Merge pull request #291 from christophefontaine/master
realtime-virtual-host profile: exclude ovs-vswitchd pmds
2020-07-31 02:48:23 +02:00
Jaroslav Škarvada
008176d6a1
Merge pull request #284 from yarda/cgroups-isolated-cores-fix
scheduler: fix isolated_cores to work with cgroups
2020-07-31 02:19:33 +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
Jaroslav Škarvada
c6a564865f
Merge pull request #288 from yarda/drop-lapic-calc
Drop lapic calc
2020-07-23 11:24:20 +02:00
Jaroslav Škarvada
6e6f324885
spec: drop qemu-kvm-tools-rhev, tuned-profiles-nfv-host-bin requirements
Without LAPIC tuning we do not need qemu-kvm-tools-rhev and
tuned-profiles-nfv-host-bin requirements.

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2020-07-22 15:23:44 +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
d01dab0f59
Merge pull request #287 from yarda/master
spec: make hdparm dependency weak, because it's not available on s390x
2020-07-22 14:57:53 +02:00
Jaroslav Škarvada
6dd13f7753
spec: make hdparm dependency weak, because it's not available on s390x
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2020-07-22 10:43:18 +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
88b4f7b0bf
Merge pull request #282 from bolinches/master
Update Spectrum Scale ECE profile
2020-07-22 10:10:20 +02:00
Jaroslav Škarvada
b16493a5c5
Merge pull request #281 from yarda/rhel-7-build-fix
Fixed building on RHEL-7/CentOS 7
2020-07-22 10:09:29 +02:00
Jaroslav Škarvada
dab16ac66a
Merge pull request #253 from outSH/change_dmidecode_usage
Replaced python-dmidecode with reading sysfs dmi and dmidecode tool.
2020-07-22 10:08:42 +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
daf02c3805
scheduler: fix isolated_cores to work with cgroups
It seems cpuset.cpus needs to be initialized before writing to tasks.

Related: rhbz#1784648

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2020-07-03 12:17:03 +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
89e670c80a
Fixed building on RHEL-7/CentOS 7
Also fixed building with python-2.7.

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2020-06-19 11:15:12 +02:00
Michal Bajer
d5825a51f4 Replaced python-dmidecode with reading sysfs dmi and dmidecode tool.
Fixes #232
sysfs exports virtual dmi device structs which provides chassis type in numeric form, it should be available in all RHEL6+, so I used it as primary source (not much overhead).
If for some reasons it couldn't be read, dmidecode output will be parsed instead. Removed any references to python-dmidecode module.
chassis type is gathered only once, and only one intance of ProfileRecommender will be created (in daemon).

Signed-off-by: Michal Bajer <outSH@users.noreply.github.com>

Fix whitespace and other minor issues in solution for #232

Signed-off-by: Michal Bajer <outSH@users.noreply.github.com>
2020-06-15 18:30:03 +02:00
Jaroslav Škarvada
1d0dd6e5ae
new release (2.14.0)
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2020-06-15 11:26:48 +02:00
Jaroslav Škarvada
ccc4161f23
new release (2.14.0-rc.1)
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2020-06-08 23:05:49 +02:00
Jaroslav Škarvada
65e818ae8b
Merge pull request #279 from olysonek/tuned-adm-active-post-loaded-profile
[For v2.15] Make tuned-adm indicate which profile is post-loaded
2020-06-08 21:27:48 +02:00
Jaroslav Škarvada
c87df6f5cb
Merge pull request #275 from yarda/cgroups
scheduler: add support for cgroups
2020-06-08 20:26:29 +02:00
Ondřej Lysoněk
9022920883 Make tuned-adm indicate which profile is post-loaded
Currently, the post-loaded profile is shown only among regular active
profiles. For example:

Current active profile: balanced post

This is not entirely user-friendly, because the user may not know why
the post-loaded profile is there, given that they did not specify it
in a 'tuned-adm profile' command and given that it's not present in
/etc/tuned/active_profile.

To give the user a hint about this and also to make it easy to see
exactly which profile is post-loaded, we make 'tuned-adm active' show
the following:

Current active profile: balanced post
Current post-loaded profile: post

Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
2020-06-08 17:58:22 +02:00
Ondřej Lysoněk
eccaf795b9 tuned-adm: Fix profile_info crash when no profile is active
If Tuned is running without any profile applied (e.g. after running
'tuned-adm off'), then 'tuned-adm profile_info' crashes with the
following error:

2020-06-08 17:24:11,998 ERROR    dbus.connection: Unable to set arguments (None,) according to signature 's': <class 'TypeError'>: Expected a string or unicode object
ERROR:dbus.connection:Unable to set arguments (None,) according to signature 's': <class 'TypeError'>: Expected a string or unicode object
dbus[25054]: arguments to dbus_message_get_destination() were incorrect, assertion "message != NULL" failed in file ../../dbus/dbus-message.c line 3678.
This is normally a bug in some application using the D-Bus library.

  D-Bus not built with -rdynamic so unable to print a backtrace
Aborted (core dumped)

To fix it, detect that no profile is applied and print the same
message as in _action_profile_info in this case.

Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
2020-06-08 17:32:59 +02:00
Jaroslav Škarvada
8bf0ef493e
scheduler: add support for cgroups
This commit adds cgroup v1 support to the scheduler plugin. It seems that
cgroup v1 is the default on RHEL-8. Systemd uses it there, so we have to
start with the cgroup v1. On Fedora, systemd has been switched to the
cgroup v2 (tested on f31), but it's still possible to intermix there
with the cgroup v1. We can add cgroup v2 support later (the logic of the
extended syntax will not change).

This commit extends the syntax the following way:

[scheduler]
cgroup_mount_point=/sys/fs/cgroup/cpuset
cgroup_mount_point_init=1
cgroup_groups_init=1
cgroup_for_isolated_cores=group
cgroup.group1=2
cgroup.group2=0,2

group.ksoftirqd=0:f:2:cgroup.group1:ksoftirqd.*

ps_blacklist=ksoftirqd.*;rcuc.*;rcub.*;ktimersoftd.*

isolated_cores=1

--
Legend:

'cgroup_mount_point' is where to mount the cgroup FS or where Tuned
expects it to be mounted. If unset '/sys/fs/cgroup/cpuset' is expected.

'cgroup_groups_init' if set to '1' (the default) it means that Tuned
will create (and remove) all cgroups defined with the 'cgroup*' options.
If set to '0' (or similar boolean) the cgroups need to be preset by
some different tool or by hand.

'cgroup_mount_point_init' if set to '1' (or similar boolean) it means that
Tuned will create (and remove) the cgroup mountpoint. It implies
'cgroup_groups_init = 1'. If set to '0' (the default) the cgroups
mount point needs to be preset by some different tool or by hand.

'cgroup_for_isolated_cores' is the cgroup name used for the
'isolated_cores' functionality. For example here if the system has 4 CPUs,
'isolated_cores=1' means that all threads (except of the blacklisted ones
by the 'ps_blacklist' regexes) will be moved to the CPU cores 0,2,3. It will
be done the way that cgroup 'group' will be set to use the affinity 0,2-3
by the 'cpuset.cpus' control file) and all matching threads will be moved
to this cgroup. If 'cgroup_for_isolated_cores' is unset, classic cpuset
affinity will be used to achieve the goal.

'cgroup.CGROUP_NAME' defines affinities for arbitrary cgroups.
Even hierarchic cgroups can be used, but the hieararchy needs to be
specified in the correct order. Also Tuned doesn't do any sanity checks
here (except that it forces the cgroup to be under the mountpoint).
In the example it defines 'group1' with the affinity set to the CPU 2
and 'group2' with the affinity set to CPUs 0, 2.

'group.' its syntax has been extended, so it's now possible to use
e.g. 'cgroup.group1' instead of the hex affinity and the matching
processes will be moved to the 'group1'. It's also possible to use
cgroups which hasn't been defined by the 'cgroup.' option described
above (e.g. cgroups not managed by Tuned).

Before the usage all cgroup names are sanitized by simple algorithm:
all dots '.' are replaced by slashes '/'. It's to prevent the plugin
to write outside the mount point.

Resolves: rhbz#1784648

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2020-06-08 12:51:26 +02:00
Jaroslav Škarvada
4eebe5f295
Merge pull request #278 from yarda/recommend-fix-indent
recommend: fixed indentation
2020-06-05 23:32:23 +02:00
Jaroslav Škarvada
3e859bd192
recommend: fixed indentation
Related: #259

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2020-06-05 23:28:55 +02:00
Jaroslav Škarvada
9bca523f43
Merge pull request #259 from openSUSE/no_system_cpe_file_error
Avoid error when reading file '/etc/system-release-cpe' on first run
2020-06-05 23:16:58 +02: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
Jaroslav Škarvada
33cca3fe09
Merge pull request #272 from olysonek/post-loaded-profile
Add support for a post-loaded profile
2020-06-05 12:42:13 +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
Ondřej Lysoněk
3c7b4195e3 Add irqbalance plugin
The irqbalance plugin is a replacement for the bash functions
irqbalance_banned_cpus_setup and irqbalance_banned_cpus_clear. It
configures the banned CPUs in /etc/sysconfig/irqbalance. Then it
restarts irqbalance (if and only if it was previously running).

The banned CPUs can be specified as a CPU list. For example:

[irqbalance]
banned_cpus=2,4,9-13

Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>

Resolves: rhbz#1784645
2020-06-05 10:23:24 +02:00
Thomas Renninger
daa01693be Avoid error when reading file '/etc/system-release-cpe' on first run
Not all distros do have /etc/system-release-cpe
2020-06-04 21:45:29 +02:00
Jaroslav Škarvada
d84ac30f9e
Merge pull request #277 from olysonek/cpu-comparison-fix
cpu: Fix string comparisons
2020-06-04 19:32:15 +02:00