When reapply_sysctl=1 (default), TuneD re-applies all system sysctl
settings after profile switches. This breaks Kubernetes overlay
networking because CNI plugins set net.ipv4.ip_forward=1 at runtime,
which gets overwritten by static /etc/sysctl.d/ files.
Add reapply_sysctl_exclude config option to protect specific sysctls
from reapplication while maintaining backward compatibility. Supports
shell-style wildcards via fnmatch.
Example config for Kubernetes:
reapply_sysctl_exclude = net.ipv4.ip_forward, net.ipv6.conf.*.forwarding
Fixes: #816
Signed-off-by: Matthew Mattox <mmattox@support.tools>
Timeout in seconds to maximally wait until udev settles. If set to value
bigger than 0, it will either wait until udev settles or the timeout
occurs. Disable with 0.
Resolves: RHEL-88238
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
Dynamic tuning is PoC implementation and it can cause many problems
especially with some networks drivers where it can interrupt network
connections and also with modern CPUs where it can worsen power
consumption by limiting CPUs from entering deeper C-states. Now, when
TuneD is going to replace power-profiles-daemon these problems can
accumulate and cause bad user experience.
RHEL disables dynamic tuning downstream for a long time, so follow it
and also disable it by default upstream. People who knows what they are
doing can still enable it.
Fixes#588
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
Add rollback option to tuned-main.conf file. The option specifies how
TuneD should perform rollbacks. By default, the old behaviour is
preserved (rollback=auto) and settings are rolled back on TuneD daemon
exit and profile switches. Using rollback=not_on_exit will result in
TuneD not performing any rollbacks on the daemon exit, however, on
profile switches, settings rollbacks will still be performed.
Resolves: rhbz#2203142
Signed-off-by: Jiri Mencak <jmencak@users.noreply.github.com>
TuneD is listening on paths specified in config in option unix_socket_paths and send signals to paths in option unix_socket_signal_paths.
Example call:
printf '[{"jsonrpc": "2.0", "method": "active_profile", "id": 1}, 1]' | sudo nc -U /run/tuned/tuned.sock
printf '{"jsonrpc": "2.0", "method": "switch_profile", "params": {"profile_name": "balanced"}, "id": 1}' | sudo nc -U /run/tuned/tuned.sock
This PR also introduce possibility to disable dbus API in main TuneD config.
Resolves: rhbz#2113900
Signed-off-by: Jan Zerdik <jzerdik@redhat.com>
The 'D' is now capital to clarify pronunciation.
DBus service name is kept as '/Tuned' not to break
backward compatibility.
This will also need update of downstream tests
which rely on the specific output strings containing
the name.
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
There should be a way for administrators and testers to force loading of
architecture specific tuning. For example, if there is some specific tuning
for some platforms with specific CPUIDs and the vendor will release new
compatible platform with the new CPUID, there needs to be a way for
administrator to use the tuning on the new platform without waiting for the
Tuned profile update or without the need to customize the profile.
This commit adds two main config options:
uname_string
cpuinfo_string
If unset (commented), which is the default, runtime detection will be used,
i.e. 'uname' will be called and '/proc/cpuinfo' will be read. If set,
content of the variables will be used instead of the runtime detection.
For example by setting:
uname_string = aarch64
It's possible to pretend that Tuned is running on the 64-bit ARM.
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
The reapply_sysctl functionality was originally added to address
rhbz#1302953, which was about Tuned overriding sysctl config files
from /etc, which was deemed undesirable. The bug said nothing about
sysctl config files from /usr/lib/sysctl.d, /lib/sysctl.d or
/usr/local/lib/sysctl.d.
Having sysctl configs from /usr override Tuned profiles causes
problems (rhbz#1759597). Also, it seems reasonable for Tuned profiles
to override sysctl configs from /usr - a Tuned profile is often
explicitly chosen by the user, whereas sysctl configs from /usr are
provided by system packages whether the user wants them or not.
Also, in RHEL-6, tuned used to ignore sysctl config files from /usr,
as far as I can tell.
Resolves rhbz#1759597
Signed-off-by: Ondřej Lysoněk <olysonek@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 udev monitor buffer size was increased to 1MB. Also, a new
configuration option 'udev_buffer_size' can be specified in
/etc/tuned/tuned-main.conf to set a different buffer size.
Values such as '204800', '200KB', '200 KB' (with space) or '1 MB'
are recognized. If no unit is specified, the number is taken as
the number of bytes.
Resolves: rhbz#1442306
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
Resolves: rhbz#1246172
Allow specifying order in which individual plugin instances are to be
executed.
Each instance can be given the 'instance_priority' option
in the profile configuration. The value must be an integer (it can be
negative). If no priority is specified, it is inherited from the parent
profile, or set to the default instance priority, if no parent profile
specifies the priority for that instance.
The default instance priority is by default zero, but it can be set to
a different value using the 'default_instance_priority' option in the
global configuration file.
Creating plugin instances, assigning devices to instances, initializing
instances, applying, updating and verifying tuning are all done in order
from lowest numerical instance priority to highest. Unapplying tuning and
destroying instances is done in reversed order.
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
This can be globally controlled by the 'reapply_sysctl' setting in
tuned-main.conf. If enabled, system systcls (/etc/sysctl.conf,
/etc/sysctl.d, ...) are reapplied after Tuned sysctls are applied,
i.e. Tuned sysctls don't override system sysctls. It's load
system sysctl by executing 'sysctl --system'. It's now by default
enabled.
Resolves: rhbz#1302953
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
Most of the functionality don' work in this mode, it just
applies the settings, no rollback possible.
Disable daemon by setting 'daemon = 0' in /etc/tuned/tuned-main.conf
This settings can be overridden if running tuned with '-d' command line
option. In such case daemon mode will be used.
Resolves: rhbz#1068663
Also fixed interpretation of booleans in main config.
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
On some platforms the 'recommend' functionality doens't make sense
as there is only one product variant. On such platforms the recommend
functionality can be disabled by adding/changing the following in
the global config (/etc/tuned/tuned-main.conf):
recommend_command = 0
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
It allows setting update interval for dynamic tuning in global config.
By default it is 10 seconds.
fixes#6
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
Added initial global config (/etc/tuned/tuned-main.conf) and
possibility to globally enable / disable dynamic tunings.
resolves: rhbz#1006427
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>