You can now specify the python runtime using the PYTHON variable.
E.g. you can use
make PYTHON=python3 install
to install tuned modules to the python3 directory and rewrite
shebangs on executable Python files to use Python3.
For some reason this fixes the following errors during mockbuild:
sh: /usr/bin/python: No such file or directory
The versioned macro is provided by python-devel.
This fixes Pylint errors such as the following:
tuned/logs.py:39: [E1003(bad-super-call), TunedLogger.__init__] \
Bad first argument 'self.__class__' given to super()
This prevents infinite recursion errors, see
https://stackoverflow.com/a/18208725
This does introduce name duplication, but when we drop python2 support
in the future, we can use super() without arguments.
Drop TunedLogger.set_level(). It doesn't appear to be used anywhere
and it causes problems with Python3, because logging._levelNames
doesn't exist anymore.
The x86_energy_perf_policy program changed its interface in the 4.13
kernel. The value 'power' now has to be used instead of 'powersave'.
Resolves: rhbz#1508468
Helper state file for cpu-partitioning script was moved to /run/tuned.
Code for flags manipulation has been simplified.
The /run/tuned directory is explicitly cleared upon uninstallation
of Tuned to get rid of all leftovers / helper files before the reboot.
Added STORAGE_PERSISTENT variable pointing to /var/lib/tuned into
functions to be consistent.
Related: rhbz#1497182
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
As cpu-partitioning doesn't use isolcpus=, isolated CPUs can incur
very high latency due to load balancing performed by the kernel
scheduler.
This patch introduces a new configuration option called
no_rebalance_cores=. This options allow users to set a range
of CPUs to have load balancing disabled from /proc. It is
expected that users will only disable load balancing on CPUs
which run PMD threads (or vCPU threads running PMD threads),
since disabling this for all isolated CPUs can cause certain
performance problems for OpenStack.
Here are some numbers:
- Without using no_rebalance_cores=, I can easily get 40us+
in load balancing isolated CPUs:
<...>-14140 [001] 1656.121155: funcgraph_entry: + 43.927 us | rebalance_domains();
<...>-14140 [001] 1660.117150: funcgraph_entry: + 41.587 us | rebalance_domains();
<...>-14140 [001] 1658.119152: funcgraph_entry: + 41.565 us | rebalance_domains();
<...>-14140 [001] 1668.110140: funcgraph_entry: + 40.539 us | rebalance_domains();
- When using no_rebalance_cores=, the maximum latency I
get is ~ 1us:
<...>-2440 [012] 1705.078076: funcgraph_entry: 1.024 us | rebalance_domains();
<...>-2438 [008] 2021.065218: funcgraph_entry: 0.995 us | rebalance_domains();
<...>-2447 [010] 2223.057289: funcgraph_entry: 0.991 us | rebalance_domains();
IMPORTANT: 10 minutes run only.
This solution was developed by Andrew Theurer <atheurer@redhat.com>,
I'm merely integrating it into the profile.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Variables in the 'devices' option were not being expanded. This is
bad. It shows that the current variable expansion system is broken.
We need to come up with a consistent, well-defined way of expanding
variables. Preferably it should be done all in one place.
The expansion is probably still not done for options 'type', 'enabled',
'replace', 'devices_udev_regex', 'script_pre' and 'script_post'. Let's
deal with that later, as we don't need it in our profiles right now.
Related: rhbz#1490399
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
KSM is enabled by default when the qemu-kvm-common-rhev package is
installed. We don't want KSM to run in KVM-RT nor cpu-partitioning
hosts, as it can cause spikes or packet drops.
This series disables KSM in those profiles when they are activated.
Likewise, we re-enable KSM when the profile is de-activated in
case it's enabled by default in systemd.
Luiz Capitulino (3):
profiles: functions: add functions to disable/enable KSM
realtime-virtual-host: disable KSM
cpu-partitioning: disable KSM
profiles/cpu-partitioning/script.sh | 2 ++
profiles/functions | 37 ++++++++++++++++++++++++++++++++
profiles/realtime-virtual-host/script.sh | 3 +++
3 files changed, 42 insertions(+)
--
2.9.5
Return-Path: lcapitulino@redhat.com
Received: from zmta04.collab.prod.int.phx2.redhat.com (LHLO
zmta04.collab.prod.int.phx2.redhat.com) (10.5.81.11) by
zmail22.collab.prod.int.phx2.redhat.com with LMTP; Tue, 3 Oct 2017 15:54:02
-0400 (EDT)
Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12])
by zmta04.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 46F2FD0310
for <jskarvad@mail.corp.redhat.com>; Tue, 3 Oct 2017 15:54:02 -0400 (EDT)
Received: by smtp.corp.redhat.com (Postfix)
id 3FBC860F82; Tue, 3 Oct 2017 19:54:02 +0000 (UTC)
Delivered-To: jskarvad@redhat.com
Received: from localhost (ovpn-117-159.phx2.redhat.com [10.3.117.159])
by smtp.corp.redhat.com (Postfix) with ESMTP id 3A51A60F81;
Tue, 3 Oct 2017 19:53:59 +0000 (UTC)
From: Luiz Capitulino <lcapitulino@redhat.com>
To: jskarvad@redhat.com
Cc: kvm-rt@redhat.com
Subject: [PATCH 1/3] profiles: functions: add functions to disable/enable KSM
Date: Tue, 3 Oct 2017 15:53:50 -0400
Message-Id: <20171003195352.22910-2-lcapitulino@redhat.com>
In-Reply-To: <20171003195352.22910-1-lcapitulino@redhat.com>
References: <20171003195352.22910-1-lcapitulino@redhat.com>
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12
They will be used by the next commits.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
The net plugin can now be given the boolean 'dynamic'
option, which is used to determine, whether dynamic tuning
should be enabled.
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
The 'tuned-adm profile' command can now (once again) be given multiple
profile names. In case of conflicting settings in the profiles, the
setting from the last profile specified is used.
E.g.:
tuned-adm profile powersave balanced
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
We should register to dbus after a profile is fully applied when
starting up. This makes systemd services depending on some tunings
performed by tuned (with After=tuned.service in their service file)
to start only after all tunings were applied.
Resolves: https://github.com/redhat-performance/tuned/issues/23
Resolves: rhbz#1443142
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
Prefix DPM states with 'dpm-' to prevent future name collisions.
Also, change the state in powersave profiles to 'battery' - there's
no such DPM state as powersave.
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>