Each command have independent error counter and use own
hdparm call. The command is disabled if there is more
than the preset limit of successive failures. The error
counter is reset if the command succeed. The limit is
preset to 3 successive failures.
Resolves: rhbz#976725
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
The plugin_bootloader is automatically disabled if the grub2 is not found.
Resolves: rhbz#1150047
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
Currently it is substitution for the rtctl tool,
but there are small differences in the syntax.
Format for the rules is:
group.GROUPNAME=RULE_PRIO:SCHED:PRIO:AFFINITY:REGEX
where RULE_PRIO defines tuned priority of the
rule. Rules are sorted according to priority.
This is needed for inheritence to be able
to reorder previously defined rule. For same
RULE_PRIO, rules should be processed in the order
there were defined (but this is Python interpreter
dependant). To disable inherited rule for GROUPNAME
use:
group.GROUPNAME=
SCHED must be one of:
'f' for FIFO,
'b' for batch,
'r' for round robin,
'o' for other,
'*' means not to change.
AFFINITY is a hex number, see taskset(1) for details
about number of CPUs. The '*' means not to change.
REGEX is Python regex. It must match against output of
ps -eo cmd
Any given process name may match more than one group.
Default priority and scheduling policy are taken from
the last matching rege.
You need to write 'group.' prefix before your
group name. This is because there may be added
other parameters to the plugin later.
Example of usage:
[scheduler]
group.kthreads=0:*:1:*:\[.*\]$
group.watchdog=0:f:99:*:\[watchdog.*\]
Resolves: rhbz#1100826
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
- replaced bash loops with GNU Make loops (can now run in parallel)
- preserved original file timestamps during installation
- used install -D instead of mkdir -p
- fixed typo in plugin_net that caused error during byte compilation
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
This plugin can be used to add parameters to kernel (boot/dracut)
command line. Currently only grub2 bootloader is used and reboot
is required to apply the tunings. The tuning can be only unloaded
by profile change followed by reboot.
It patches grub.cfg at runtime and installs /etc/grub.d/00_tuned
grub2 template. So it's possible to regenerate grub.cfg by
grub2-mkconfig and the tuning persists.
It also patches /etc/default/grub and adds tuned_params grub2 variable
to GRUB_CMDLINE_LINUX. This is probably the only way how to get
variables into kernel command line in grub.cfg. Nothing else is added to
/etc/default and it's patched if the plugin is used for the first
time. It's re-patched on plugin initialization only if the tuned_params
variable is missing.
On subsequent invocation only the tuned_params grub2 variable and
grub.cfg are changed.
Example of use:
[bootloader]
cmdline=quiet
This adds "quiet" parameter to the kernel boot command line (reboot
is required).
EFI is also supported. By default it autodetects redhat and fedora
directories (in this order). Nothing else is touched. If you have
different EFI system and your grub.cfg location is not auto-detected
or your grub.cfg is located on different place you can specify
the grub.cfg location manually:
[bootloader]
grub2_cfg_file=CUSTOM_PATH/grub.cfg
cmdline=quiet
This has precedence over auto-detection. This is used for runtime
patching. In case it is not set correctly, the grub.cfg patching
will not work, but you can still regenerate the config by hand by
grub2-mkconfig.
Resolves: rhbz#1044111
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
E.g.:
[disk]
readahead=256 s
This will be internally transformed to 128 kB and has
same meaning as:
[disk]
readahead=128
Any suffix starting with "s" can be used for sectors,
e.g. "sects" or "sectors", etc. If there is no suffix
or the suffix doesn't start with "s", kB are used.
There must be at least one space between the number
and suffix.
Resolves: rhbz#1127127
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
Now the D-Bus method "switch_profile" returns record
(bool, string), where in case of error, the string
describes the error. The string is also displayed
by tuned-adm, so the user has better overview what's
going there.
Related: rhbz#1068699
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
Made tuned error messages less verbose, but more descriptive if running without
debug option. Also made class from the tuned.utils.commands helper functions.
Its logging can be enabled / disabled.
Resolves: rhbz#1068699
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
In this way only the installed profiles are described in the installed
manual pages. I.e. base profiles are now described in the tuned-profiles.7
manual page and profiles for the Project Atomic are now described
in the tuned-profiles-atomic.7 manual page. Simalarly for the SAP and
compat profiles.
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
These profiles are performance optimized for SAP HANA loads.
There are available in tuned-profiles-sap-hana subpackage.
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
The file system image containing tuned can be prepared offline, thus we
need to check the configuration on the first run. This is also more
clean solution than the previous post install hack.
Resolves: rhbz#1144067
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
This profile is performance optimized for running SAP NetWeaver
based applications on bare metal.
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
So far only the avc_cache_threshold is supported, but more options
may be added in the future as needed.
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
It's optional and there may be more SAP profiles in the future,
hus it's better to have special subpackage for it.
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
These modifiers can specify when to assign new value considering
the old value.
E.g.:
readahead=>4096
means assign readahead 4096 only if the current value of readahaed
is lower than 4096 (i.e. the readahaed will be at least 4096).
Similarly for the < operator, it will assign the value only
if the current value is higher.
The modifiers are part of the value, not part of the equality
operator, thus the following is correct:
readahead= >4096
But the following isn't correct, but will probably also work
due to the nature how the value is parsed:
readahead=> 4096
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
This policy sets the link to the second lowest power
state (PARTIAL) when there is no I/O on the disk. This
mode is designed to allow transitions in link power states
(for example during times of intermittent heavy I/O and
idle I/O) with as small impact on performance as possible.
This may save significant amount of power in idle periods
of the link, especially on laptops. E.g. on x240 the average
AC power consumption dropped from approx. 5 W to only 2.5 W.
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>