1
0
Fork 0
Commit graph

21 commits

Author SHA1 Message Date
Matthew Mattox
4e300529c9
feat(sysctl): add reapply_sysctl_exclude option
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>
2025-12-16 15:13:58 -06:00
Jaroslav Škarvada
7d061ab06d
tuned-main.conf: added startup_udev_settle_wait option
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>
2025-05-07 12:45:01 +02:00
Pavol Žáčik
6d3aa949b3
Migrate profiles to /etc/tuned/profiles/ and /usr/lib/tuned/profiles/ 2024-04-03 11:01:10 +02:00
Pavol Žáčik
90ea23b8b3
Add an option to configure profile directories
Resolves: RHEL-26157
2024-03-28 10:56:49 +01:00
liuzhilin
61c07b7be5 fix-error 2024-02-27 14:01:01 +08:00
Jaroslav Škarvada
2306cbdced
Disable dynamic tuning by default
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>
2024-02-13 15:30:17 +01:00
Jiri Mencak
7f3a79bbd6 Add rollback option to tuned-main.conf
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>
2023-06-14 14:09:30 +02:00
Jan Zerdik
3e3f4678e8 Expose TuneD API to the Unix Domain Socket.
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>
2023-02-08 12:21:05 +01:00
Jaroslav Škarvada
16d4acbaca
Project renamed to TuneD
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>
2021-05-17 22:09:02 +02:00
Jaroslav Škarvada
6ab5e5e4ab
Allow override of detected architecture
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>
2020-06-04 15:31:41 +02:00
Ondřej Lysoněk
14053bc98a sysctl: Make reapply_sysctl ignore configs from /usr
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>
2019-11-27 16:22:18 +01:00
Ondřej Lysoněk
9574a63e50 Increase max log file size in the default config file
100KB is not a lot, it can fill up quickly.

Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
2019-02-08 14:34:30 +01:00
Lidong Zhong
4791290f9b log: add two options(log_file_count and log_file_maxbytes) in the main config file
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.
2018-09-11 15:42:53 +08:00
Ondřej Lysoněk
36aa31efb4 Increase udev monitor buffer size, make it configurable
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>
2017-08-15 13:04:01 +02:00
Ondřej Lysoněk
363d74815a Implement instance priority
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>
2017-02-17 15:56:11 +01:00
Jaroslav Škarvada
d1986f20f9 plugin_sysctl: reapply system sysctl after Tuned sysctl are applied
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>
2016-07-18 16:00:15 +02:00
Jaroslav Škarvada
4cefd36c87 tuned: added one-shot no daemon mode
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>
2015-07-02 17:17:31 +02:00
Jaroslav Škarvada
c73bc90ae8 recommend: add global config option to disable 'recommend' functionality
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>
2015-06-10 16:26:36 +02:00
Jaroslav Škarvada
1cbd8a9e2c tuned: preset the sleep_interval in the tuned-main.conf
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2013-11-11 11:55:24 +01:00
Jaroslav Škarvada
13bfaf38af tuned: added global option update_interval
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>
2013-10-16 16:43:03 +02:00
Jaroslav Škarvada
f8d89a78c0 refs #40, daemon: added global config for dynamic_tuning
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>
2013-10-15 15:34:55 +02:00