The default tuned profile for an oVirt cluster is "virtual-host".
Recently, testing at customer sites and performance labs has shown
that "latency-performance" yields better results. This patch makes
virtual-host profile identical to latency-performance. This seems
better than uniting them since this way we maintain the possibility
to tweak them in different ways in the future according to further
findings.
Change-Id: I1a64fac22364b17de1279a3e1f37a6b7eb0fe61b
Bug-Url: https://bugzilla.redhat.com/1588932
Signed-off-by: Ori_Liel <oliel@redhat.com>
Currently the logrotation is not configurable. On system with large
amount of cpus a tuned start creates a lot of entries and older log
entries are lost.
The rt-entsk application, part of newer rt-setup packages,
worksaround a latency issue with static key
IPI's. What it does it:
/*
* Open a socket, and enable timestamping on it.
*
* This is to avoid Chrony from changing timestamping
* user count from 0->1 and vice-versa, causing
* static key enable/disable IPIs.
*
*/
Start/stop the systemctl service from the realtime-virtual-host
and realtime-virtual-guest profiles.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
KSM disable code is reimplementing systemctl mask command.
Note only that, but it seems a race is possible where the ksm
services may be starting at the same time as disable_ksm()
is running. I believe the mask command should fix that.
There's an important difference in this new version: we don't
try to start KSM when switching away from the cpu-partitioning
profile. This means KSM will probably remain disabled until
the next reboot.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Previously the sorting was done by comparing the objects themselves,
which is not what we want and it doesn't work in Python 3 - TypeError
is raised, e.g:
TypeError: '<' not supported between instances of 'BootloaderPlugin' and 'MountsPlugin'
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
The previous fix was not sufficient, tuned-adm still tracebacks
in cases when options are specified, but an action is not, e.g.:
$ python3 ./tuned-adm.py -a
Traceback (most recent call last):
File "./tuned-adm.py", line 106, in <module>
action_name = options.pop("action")
KeyError: 'action'
The object returned by ArgumentParser.add_subparsers recognizes
a 'required' attribute (at least in Python 3), which is probably
meant to allow to make specifying an action required, but I wasn't
able to make it work properly, I get errors such as
Traceback (most recent call last):
File "./tuned-adm.py", line 98, in <module>
args = parser.parse_args(sys.argv[1:])
File "/usr/lib64/python3.6/argparse.py", line 1730, in parse_args
args, argv = self.parse_known_args(args, namespace)
File "/usr/lib64/python3.6/argparse.py", line 1762, in parse_known_args
namespace, args = self._parse_known_args(args, namespace)
File "/usr/lib64/python3.6/argparse.py", line 1997, in _parse_known_args
', '.join(required_actions))
TypeError: sequence item 0: expected str instance, NoneType found
which I think is not expected. The error is raised here:
6ceab46a60/Lib/argparse.py (L2001)
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
Running tuned-adm without arguments using Python 3 results in
a traceback. This is because in this case parse_args does not
exit with a usage message in Python 3 and the 'action' option
is then undefined. So let's check for this case and print the
usage message ourselves. There may be a better solution to this,
but I wasn't able to come up with anything in a reasonable amount
of time.
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
As noted in the bugzilla ticket
https://bugzilla.redhat.com/show_bug.cgi?id=1554851
The QEMU I/O thread can interrupt the time measurement
of the timer. To avoid this problem, only
pin the vCPU thread.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Reviewed-and-Tested-by: Luiz Capitulino <lcapitulino@redhat.com>
v2:
- Use unix sockets (Luiz)
- Proper numeric output (Luiz)
In the cpu-partitioning profile, IRQ affinity change is already done
as part of the 'isolated_cores' option of the scheduler plugin, so
calling defirqaffinity is, at best, redundant. So let's remove the call.
In the realtime* profiles, it's essentially the same, except that tuna
was used instead of isolated_cores. So let's use built-in functionality
instead of tuna and drop calls to defirqaffinity.
Resolves: rhbz#1590937
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
Previously the irqbalance config was not modified if setting the affinity
of at least one IRQ failed. That does not make much sense to me - it can
result in irqbalance assigning isolated CPUs to IRQs, even if it can be
prevented.
Even if affinity cannot be changed for any of the present IRQs,
hypothetically it can happen (I think) that new hardware is hotplugged,
and the affinity of its IRQ can be changed. So let's always modify the
irqbalance config for good measure.
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
The EIO errno is returned by kernel/irq/proc.c:write_irq_affinity()
if and only if changing SMP affinity of a particular IRQ is not
supported (at least on Linux 3.10 and 4.18). So let's log a failure
to change the affinity only as DEBUG if we get EIO and we are not in
the process of restoring the affinity, because the failure is expected
and there's nothing we can do about it. If we're restoring, use ERROR
log level, so that the user is informed that we failed to restore
the affinity to its original state (this should not happen though).
Other errnos can be significant, so always log them as ERROR.
Resolves: rhbz#1590937
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>