1
0
Fork 0

Merge pull request #693 from zacikpa/autodocs

Automatic generation of plugin docs from their docstrings
This commit is contained in:
Jaroslav Škarvada 2024-12-11 20:39:03 +01:00 committed by GitHub
commit 297e240834
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
31 changed files with 262 additions and 492 deletions

1
.gitignore vendored
View file

@ -3,3 +3,4 @@
tuned-*.tar.bz2
*~
*.html
doc/manual/modules/performance/ref_available-tuned-plug-ins.adoc

View file

@ -70,7 +70,7 @@ release-cp: release-dir
tuned-adm.bash dbus.conf recommend.conf tuned-main.conf 00_tuned \
92-tuned.install bootcmdline modules.conf com.redhat.tuned.policy \
tuned-gui.py tuned-gui.glade tuned-ppd.py \
tuned-gui.desktop functions $(VERSIONED_NAME)
tuned-gui.desktop functions compile_plugin_docs.py $(VERSIONED_NAME)
cp -a doc experiments libexec man profiles systemtap tuned contrib icons \
tests $(VERSIONED_NAME)

36
compile_plugin_docs.py Normal file
View file

@ -0,0 +1,36 @@
import argparse
import os
import inspect
from tuned.utils.plugin_loader import PluginLoader
from tuned.plugins.base import Plugin
class DocLoader(PluginLoader):
def __init__(self):
super(DocLoader, self).__init__()
def _set_loader_parameters(self):
self._namespace = "tuned.plugins"
self._prefix = "plugin_"
self._interface = Plugin
parser = argparse.ArgumentParser()
parser.add_argument("intro")
parser.add_argument("out")
args = parser.parse_args()
with open(args.intro, "r") as intro_file:
intro = intro_file.read()
all_plugins = sorted(DocLoader().load_all_plugins(), key=lambda x: x.__module__)
with open(args.out, "w") as out_file:
out_file.write(intro)
for plugin in all_plugins:
plugin_file = inspect.getfile(plugin)
plugin_name = os.path.basename(plugin_file)[7:-3]
out_file.write("\n")
out_file.write(f"== **{plugin_name}**\n")
out_file.write(inspect.cleandoc(plugin.__doc__))
out_file.write("\n")

View file

@ -1,10 +1,12 @@
.PHONY: clean
index.html: master.adoc assemblies/*.adoc meta/*.adoc modules/performance/*.adoc
index.html: master.adoc assemblies/*.adoc meta/*.adoc modules/performance/*.adoc ../../tuned/plugins/plugin_*.py
python3 ../../compile_plugin_docs.py modules/performance/ref_available-tuned-plug-ins_intro.adoc modules/performance/ref_available-tuned-plug-ins.adoc
asciidoctor -o index.html master.adoc || asciidoc -o index.html master.adoc
install: index.html
install -Dpm 0644 index.html $(DESTDIR)$(DOCDIR)/manual/index.html
clean:
rm -f modules/performance/ref_available-tuned-plug-ins.adoc
rm -f *.html

View file

@ -1,5 +1,5 @@
:revnumber: 2.10.0
:revdate: 2019-01-04
:revnumber: 2.24.1
:revdate: 2024-10-09
:keywords: documentation, tuned, performance, power, linux
:toc:

View file

@ -1,241 +0,0 @@
:_module-type: REFERENCE
[id="available-tuned-plug-ins_{context}"]
= Available TuneD plug-ins
[role="_abstract"]
This section lists all monitoring and tuning plug-ins currently available in *TuneD*.
[discrete]
== Monitoring plug-ins
Currently, the following monitoring plug-ins are implemented:
`disk`::
Gets disk load (number of IO operations) per device and measurement interval.
`net`::
Gets network load (number of transferred packets) per network card and measurement interval.
`load`::
Gets CPU load per CPU and measurement interval.
[discrete]
== Tuning plug-ins
Currently, the following tuning plug-ins are implemented. Only some of these plug-ins implement dynamic tuning. Options supported by plug-ins are also listed:
`cpu`::
Sets the CPU governor to the value specified by the [option]`governor` option and dynamically changes the Power Management Quality of Service (PM QoS) CPU Direct Memory Access (DMA) latency according to the CPU load.
+
If the CPU load is lower than the value specified by the [option]`load_threshold` option, the latency is set to the value specified by the [option]`latency_high` option, otherwise it is set to the value specified by [option]`latency_low`.
+
You can also force the latency to a specific value and prevent it from dynamically changing further. To do so, set the [option]`force_latency` option to the required latency value.
`eeepc_she`::
Dynamically sets the front-side bus (FSB) speed according to the CPU load.
+
This feature can be found on some netbooks and is also known as the ASUS Super Hybrid Engine (SHE).
+
If the CPU load is lower or equal to the value specified by the [option]`load_threshold_powersave` option, the plug-in sets the FSB speed to the value specified by the [option]`she_powersave` option. If the CPU load is higher or equal to the value specified by the [option]`load_threshold_normal` option, it sets the FSB speed to the value specified by the [option]`she_normal` option.
+
Static tuning is not supported and the plug-in is transparently disabled if *TuneD* does not detect the hardware support for this feature.
`net`::
Configures the Wake-on-LAN functionality to the values specified by the [option]`wake_on_lan` option. It uses the same syntax as the `ethtool` utility. It also dynamically changes the interface speed according to the interface utilization.
`sysctl`::
Sets various `sysctl` settings specified by the plug-in options.
+
The syntax is ``[replaceable]__name__=[replaceable]__value__``, where [replaceable]_name_ is the same as the name provided by the `sysctl` utility.
+
Use the `sysctl` plug-in if you need to change system settings that are not covered by other plug-ins available in *TuneD*. If the settings are covered by some specific plug-ins, prefer these plug-ins.
`usb`::
Sets autosuspend timeout of USB devices to the value specified by the [option]`autosuspend` parameter.
+
The value `0` means that autosuspend is disabled.
`vm`::
Enables or disables transparent huge pages depending on the Boolean value of the [option]`transparent_hugepages` option.
+
Valid values of the [option]`transparent_hugepages` option are:
+
--
* "always"
* "never"
* "madvise"
--
`audio`::
Sets the autosuspend timeout for audio codecs to the value specified by the [option]`timeout` option.
+
Currently, the `snd_hda_intel` and `snd_ac97_codec` codecs are supported. The value `0` means that the autosuspend is disabled. You can also enforce the controller reset by setting the Boolean option [option]`reset_controller` to `true`.
`disk`::
Sets the disk elevator to the value specified by the [option]`elevator` option.
+
It also sets:
+
--
* APM to the value specified by the [option]`apm` option
* Scheduler quantum to the value specified by the [option]`scheduler_quantum` option
* Disk spindown timeout to the value specified by the [option]`spindown` option
* Disk readahead to the value specified by the [option]`readahead` parameter
* The current disk readahead to a value multiplied by the constant specified by the [option]`readahead_multiply` option
--
+
In addition, this plug-in dynamically changes the advanced power management and spindown timeout setting for the drive according to the current drive utilization. The dynamic tuning can be controlled by the Boolean option [option]`dynamic` and is enabled by default.
`scsi_host`::
Tunes options for SCSI hosts.
+
It sets Aggressive Link Power Management (ALPM) to the value specified by the [option]`alpm` option.
`mounts`::
Enables or disables barriers for mounts according to the Boolean value of the [option]`disable_barriers` option.
`scheduler`::
Allows tuning of scheduling priorities, processes/threads/IRQs affinities, and CPU cores isolation.
+
The scheduler plugin uses perf event loop to catch newly created processes. By default it listens to perf.RECORD_COMM and
perf.RECORD_EXIT events. By setting `perf_process_fork` parameter to `true`, perf.RECORD_FORK events will be also listened to.
In other words, child processes created by the fork() system call will be processed. Since child processes inherit CPU affinity
from their parents, the `scheduler` plugin usually does not need to explicitly process these events. As processing perf events
can pose a significant CPU overhead, the `perf_process_fork` parameter is set to `false` by default and child processes
are not processed by the scheduler plugin.
+
For perf events mmapped buffer is used. Under heavy load the buffer may overflow. In such cases the `scheduler` plugin
may start missing events and not process some newly created processes. Increasing the buffer size may help. The buffer size
can be set with the `perf_mmap_pages` parameter. Value of this parameter has to be power of 2. If it is not the power of 2,
the nearest bigger power of 2 value is calculated from it and this calculated value is used. If the `perf_mmap_pages`
parameter is omitted, the default kernel value is used, which should be 128 for the recent kernels (tested on kernel-5.9.8).
+
The `default_irq_smp_affinity` parameter controls the values *TuneD* writes to `/proc/irq/default_smp_affinity`.
The following values are supported:
+
--
`calc`::
Content of `/proc/irq/default_smp_affinity` will be calculated from the `isolated_cores` parameter.
Non-isolated cores are calculated as an inversion of the `isolated_cores`. Then the intersection of the non-isolated cores
and the previous content of `/proc/irq/default_smp_affinity` is written to `/proc/irq/default_smp_affinity`.
If the intersection is an empty set, then just the non-isolated cores are written to `/proc/irq/default_smp_affinity`.
This behavior is the default if the parameter `default_irq_smp_affinity` is omitted.
`ignore`::
*TuneD* will not touch `/proc/irq/default_smp_affinity`.
cpulist such as `1,3-4`::
The cpulist is unpacked and written directly to `/proc/irq/default_smp_affinity`.
--
`script`::
Executes an external script or binary when the profile is loaded or unloaded. You can choose an arbitrary executable.
+
IMPORTANT: The `script` plug-in is provided mainly for compatibility with earlier releases. Prefer other *TuneD* plug-ins if they cover the required functionality.
+
*TuneD* calls the executable with one of the following arguments:
+
--
** `start` when loading the profile
** `stop` when unloading the profile
--
+
You need to correctly implement the `stop` action in your executable and revert all settings that you changed during the `start` action. Otherwise, the roll-back step after changing your *TuneD* profile will not work.
+
Bash scripts can import the [filename]`/usr/lib/tuned/functions` Bash library and use the functions defined there. Use these functions only for functionality that is not natively provided by *TuneD*. If a function name starts with an underscore, such as `_wifi_set_power_level`, consider the function private and do not use it in your scripts, because it might change in the future.
+
Specify the path to the executable using the `script` parameter in the plug-in configuration.
+
.Running a Bash script from a profile
====
To run a Bash script named `script.sh` that is located in the profile directory, use:
----
[script]
script=${i:PROFILE_DIR}/script.sh
----
====
`sysfs`::
Sets various `sysfs` settings specified by the plug-in options.
+
The syntax is ``[replaceable]__name__=[replaceable]__value__``, where [replaceable]_name_ is the `sysfs` path to use.
+
Use this plugin in case you need to change some settings that are not covered by other plug-ins. Prefer specific plug-ins if they cover the required settings.
`video`::
Sets various powersave levels on video cards. Currently, only the Radeon cards are supported.
+
The powersave level can be specified by using the [option]`radeon_powersave` option. Supported values are:
+
--
* `default`
* `auto`
* `low`
* `mid`
* `high`
* `dynpm`
* `dpm-battery`
* `dpm-balanced`
* `dpm-perfomance`
--
+
For details, see link:http://www.x.org/wiki/RadeonFeature#KMS_Power_Management_Options[www.x.org]. Note that this plug-in is experimental and the option might change in future releases.
`bootloader`::
Adds options to the kernel command line. This plug-in supports only the GRUB 2 boot loader.
+
Customized non-standard location of the GRUB 2 configuration file can be specified by the [option]`grub2_cfg_file` option.
+
The kernel options are added to the current GRUB configuration and its templates. The system needs to be rebooted for the kernel options to take effect.
+
Switching to another profile or manually stopping the `tuned` service removes the additional options. If you shut down or reboot the system, the kernel options persist in the [filename]`grub.cfg` file.
+
The kernel options can be specified by the following syntax:
+
[subs=+quotes]
----
cmdline=[replaceable]_arg1_ [replaceable]_arg2_ ... [replaceable]_argN_
----
+
--
.Modifying the kernel command line
====
For example, to add the [option]`quiet` kernel option to a *TuneD* profile, include the following lines in the [filename]`tuned.conf` file:
----
[bootloader]
cmdline=quiet
----
The following is an example of a custom profile that adds the [option]`isolcpus=2` option to the kernel command line:
----
[bootloader]
cmdline=isolcpus=2
----
====
--
`acpi`::
Configures the ACPI driver.
+
The only currently supported option is
[option]`platform_profile`, which sets the ACPI
platform profile sysfs attribute,
a generic power/performance preference API for other drivers.
Multiple profiles can be specified, separated by `|`.
The first available profile is selected.
+
--
.Selecting a platform profile
====
----
[acpi]
platform_profile=low-power|quiet
----
Using this option, *TuneD* will try to set the platform profile
to `low-power`. If that fails (e.g, because the system does not
support the profile), it will try to set it to `quiet`.
====
--

View file

@ -0,0 +1,6 @@
:_module-type: REFERENCE
[id="available-tuned-plug-ins_{context}"]
= Available TuneD plug-ins
[role="_abstract"]
This section lists all monitoring and tuning plug-ins currently available in *TuneD*.

View file

@ -10,18 +10,15 @@ log = tuned.logs.get()
class ACPIPlugin(base.Plugin):
"""
`acpi`::
Configures the ACPI driver.
+
The only currently supported option is
[option]`platform_profile`, which sets the ACPI
platform profile sysfs attribute,
a generic power/performance preference API for other drivers.
Multiple profiles can be specified, separated by `|`.
The first available profile is selected.
+
--
.Selecting a platform profile
====
----
@ -31,7 +28,6 @@ class ACPIPlugin(base.Plugin):
Using this option, *TuneD* will try to set the platform profile
to `balanced`. If that fails, it will try to set it to `low-power`.
====
--
"""
def __init__(self, *args, **kwargs):
super(ACPIPlugin, self).__init__(*args, **kwargs)

View file

@ -13,12 +13,10 @@ cmd = commands()
class AudioPlugin(hotplug.Plugin):
"""
`audio`::
Sets audio cards power saving options. The plug-in sets the auto suspend
timeout for audio codecs to the value specified by the [option]`timeout`
option.
+
Currently, the `snd_hda_intel` and `snd_ac97_codec` codecs are
supported and the [option]`timeout` value is in seconds. To disable
auto suspend for these codecs, set the [option]`timeout` value
@ -26,7 +24,7 @@ class AudioPlugin(hotplug.Plugin):
[option]`reset_controller` to `true`. Note that power management
is supported per module. Hence, the kernel module names are used as
device names.
+
.Set the timeout value to 10s and enforce the controller reset
====
----

View file

@ -14,42 +14,40 @@ log = tuned.logs.get()
class BootloaderPlugin(base.Plugin):
"""
`bootloader`::
Adds options to the kernel command line. This plug-in supports the
GRUB 2 boot loader and the Boot Loader Specification (BLS).
+
NOTE: *TuneD* will not remove or replace kernel command line
parameters added via other methods like *grubby*. *TuneD* will manage
the kernel command line parameters added via *TuneD*. Please refer
to your platform bootloader documentation about how to identify and
manage kernel command line parameters set outside of *TuneD*.
+
Customized non-standard location of the GRUB 2 configuration file
can be specified by the [option]`grub2_cfg_file` option.
+
The kernel options are added to the current GRUB configuration and
its templates. Reboot the system for the kernel option to take effect.
+
Switching to another profile or manually stopping the `tuned`
service removes the additional options. If you shut down or reboot
the system, the kernel options persist in the [filename]`grub.cfg`
file and grub environment files.
+
The kernel options can be specified by the following syntax:
+
[subs="+quotes,+macros"]
----
cmdline__suffix__=__arg1__ __arg2__ ... __argN__
----
+
Or with an alternative, but equivalent syntax:
+
[subs="+quotes,+macros"]
----
cmdline__suffix__=+__arg1__ __arg2__ ... __argN__
----
+
Where __suffix__ can be arbitrary (even empty) alphanumeric
string which should be unique across all loaded profiles. It is
recommended to use the profile name as the __suffix__
@ -59,59 +57,51 @@ class BootloaderPlugin(base.Plugin):
is the same behavior as any other plug-in options. The final kernel
command line is constructed by concatenating all the resulting
[option]`cmdline` options.
+
It is also possible to remove kernel options by the following syntax:
+
[subs="+quotes,+macros"]
----
cmdline__suffix__=-__arg1__ __arg2__ ... __argN__
----
+
Such kernel options will not be concatenated and thus removed during
the final kernel command line construction.
+
.Modifying the kernel command line
====
For example, to add the [option]`quiet` kernel option to a *TuneD*
profile, include the following lines in the [filename]`tuned.conf`
file:
----
[bootloader]
cmdline_my_profile=+quiet
----
An example of a custom profile `my_profile` that adds the
[option]`isolcpus=2` option to the kernel command line:
----
[bootloader]
cmdline_my_profile=isolcpus=2
----
An example of a custom profile `my_profile` that removes the
[option]`rhgb quiet` options from the kernel command line (if
previously added by *TuneD*):
----
[bootloader]
cmdline_my_profile=-rhgb quiet
----
====
+
.Modifying the kernel command line, example with inheritance
====
For example, to add the [option]`rhgb quiet` kernel options to a
*TuneD* profile `profile_1`:
----
[bootloader]
cmdline_profile_1=+rhgb quiet
----
In the child profile `profile_2` drop the [option]`quiet` option
from the kernel command line:
----
[main]
include=profile_1
@ -119,10 +109,8 @@ class BootloaderPlugin(base.Plugin):
[bootloader]
cmdline_profile_2=-quiet
----
The final kernel command line will be [option]`rhgb`. In case the same
[option]`cmdline` suffix as in the `profile_1` is used:
----
[main]
include=profile_1
@ -130,35 +118,34 @@ class BootloaderPlugin(base.Plugin):
[bootloader]
cmdline_profile_1=-quiet
----
It will result in the empty kernel command line because the merge
executes and the [option]`cmdline_profile_1` gets redefined to just
[option]`-quiet`. Thus there is nothing to remove in the final kernel
command line processing.
====
+
The [option]`initrd_add_img=IMAGE` adds an initrd overlay file
`IMAGE`. If the `IMAGE` file name begins with '/', the absolute path is
used. Otherwise, the current profile directory is used as the base
directory for the `IMAGE`.
+
The [option]`initrd_add_dir=DIR` creates an initrd image from the
directory `DIR` and adds the resulting image as an overlay.
If the `DIR` directory name begins with '/', the absolute path
is used. Otherwise, the current profile directory is used as the
base directory for the `DIR`.
+
The [option]`initrd_dst_img=PATHNAME` sets the name and location of
the resulting initrd image. Typically, it is not necessary to use this
option. By default, the location of initrd images is `/boot` and the
name of the image is taken as the basename of `IMAGE` or `DIR`. This can
be overridden by setting [option]`initrd_dst_img`.
+
The [option]`initrd_remove_dir=VALUE` removes the source directory
from which the initrd image was built if `VALUE` is true. Only 'y',
'yes', 't', 'true' and '1' (case insensitive) are accepted as true
values for this option. Other values are interpreted as false.
+
.Adding an overlay initrd image
====
----
@ -166,17 +153,16 @@ class BootloaderPlugin(base.Plugin):
initrd_remove_dir=True
initrd_add_dir=/tmp/tuned-initrd.img
----
This creates an initrd image from the `/tmp/tuned-initrd.img` directory
and and then removes the `tuned-initrd.img` directory from `/tmp`.
====
+
The [option]`skip_grub_config=VALUE` does not change grub
configuration if `VALUE` is true. However, [option]`cmdline`
options are still processed, and the result is used to verify the current
cmdline. Only 'y', 'yes', 't', 'true' and '1' (case insensitive) are accepted
as true values for this option. Other values are interpreted as false.
+
.Do not change grub configuration
====
----

View file

@ -17,8 +17,6 @@ cpuidle_states_path = "/sys/devices/system/cpu/cpu0/cpuidle"
class CPULatencyPlugin(hotplug.Plugin):
"""
`cpu`::
Sets the CPU governor to the value specified by the [option]`governor`
option and dynamically changes the Power Management Quality of
Service (PM QoS) CPU Direct Memory Access (DMA) latency according
@ -30,11 +28,6 @@ class CPULatencyPlugin(hotplug.Plugin):
character is meant to represent a logical 'or' operator. Note that the
same syntax is used for the [option]`energy_perf_bias` option. *TuneD*
will set the first governor that is available on the system.
+
For example, with the following profile, *TuneD* will set the 'ondemand'
governor, if it is available. If it is not available, but the 'powersave'
governor is available, 'powersave' will be set. If neither of them are
available, the governor will not be changed.
+
.Specifying a CPU governor
====
@ -42,6 +35,11 @@ class CPULatencyPlugin(hotplug.Plugin):
[cpu]
governor=ondemand|powersave
----
*TuneD* will set the 'ondemand'
governor, if it is available. If it is not available, but the 'powersave'
governor is available, 'powersave' will be set. If neither of them are
available, the governor will not be changed.
====
`sampling_down_factor`:::
@ -104,10 +102,10 @@ class CPULatencyPlugin(hotplug.Plugin):
`latency_low, latency_high, load_threshold`:::
+
If the CPU load is lower than the value specified by
the[option]`load_threshold` option, the latency is set to the value
the [option]`load_threshold` option, the latency is set to the value
specified either by the [option]`latency_high` option or by the
[option]`latency_low` option.
+
`force_latency`:::
You can also force the latency to a specific value and prevent it from
dynamically changing further. To do so, set the [option]`force_latency`
@ -115,14 +113,16 @@ class CPULatencyPlugin(hotplug.Plugin):
+
The maximum latency value can be specified in several ways:
+
* by a numerical value in microseconds (for example, `force_latency=10`)
* as the kernel CPU idle level ID of the maximum C-state allowed
(for example, force_latency = cstate.id:1)
* as a case sensitive name of the maximum C-state allowed
(for example, force_latency = cstate.name:C1)
* by using 'None' as a fallback value to prevent errors when alternative
C-state IDs/names do not exist. When 'None' is used in the alternatives
pipeline, all the alternatives that follow 'None' are ignored.
--
* by a numerical value in microseconds (for example, `force_latency=10`)
* as the kernel CPU idle level ID of the maximum C-state allowed
(for example, force_latency = cstate.id:1)
* as a case sensitive name of the maximum C-state allowed
(for example, force_latency = cstate.name:C1)
* by using 'None' as a fallback value to prevent errors when alternative
C-state IDs/names do not exist. When 'None' is used in the alternatives
pipeline, all the alternatives that follow 'None' are ignored.
--
+
It is also possible to specify multiple fallback values separated by '|' as
the C-state names and/or IDs may not be available on some systems.
@ -146,8 +146,8 @@ class CPULatencyPlugin(hotplug.Plugin):
[cpu]
force_latency=cstate.name:XYZ|None
----
In this case, if C-state with the name `XYZ` does not exist
[option]`force_latency`, no latency value will be written into the
In this case, if C-state with the name `XYZ` does not exist,
no latency value will be written into the
kernel's PM QoS file, and no errors will be reported due to the
presence of 'None'.
====
@ -165,31 +165,40 @@ class CPULatencyPlugin(hotplug.Plugin):
Limit the minimum P-State that will be requested by the driver. It states
it as a percentage of the max (non-turbo) performance level.
====
+
`pm_qos_resume_latency_us`:::
This option allow to set specific latency for all cpus or specific ones.
+
.Configuring resume latency
====
----
[cpu]
pm_qos_resume_latency_us=n/a
----
Special value that disables C-states completely.
====
----
[cpu]
pm_qos_resume_latency_us=0
----
Allows all C-states.
====
----
[cpu]
pm_qos_resume_latency_us=100
----
Allows any C-state with a resume latency less than value.
Allows any C-state with a resume latency less than 100.
====
`boost`:::
The [option]`boost` option allows the CPU to boost above nominal
frequencies for shorts periods of time.
+
.Allowing CPU boost
====
----
[cpu]
boost=1
----
CPU is allowed to boost above nominal frequencies for short periods of time.
====
"""
def __init__(self, *args, **kwargs):

View file

@ -11,29 +11,26 @@ log = tuned.logs.get()
class DiskPlugin(hotplug.Plugin):
"""
`disk`::
Plug-in for tuning various block device options. This plug-in can also
dynamically change the advanced power management and spindown timeout
setting for a drive according to the current drive utilization. The
dynamic tuning is controlled by the [option]`dynamic` and the global
[option]`dynamic_tuning` option in `tuned-main.conf`.
+
The disk plug-in operates on all supported block devices unless a
comma separated list of [option]`devices` is passed to it.
+
.Operate only on the sda block device
.Operate only on the `sda` block device
====
----
[disk]
# Comma separated list of devices, all devices if commented out.
devices=sda
----
====
+
The [option]`elevator` option sets the Linux I/O scheduler.
+
.Use the bfq I/O scheduler on xvda block device
.Use the bfq I/O scheduler on the `xvda` block device
====
----
[disk]
@ -41,21 +38,21 @@ class DiskPlugin(hotplug.Plugin):
elevator=bfq
----
====
+
The [option]`scheduler_quantum` option only applies to the CFQ I/O
scheduler. It defines the number of I/O requests that CFQ sends to
one device at one time, essentially limiting queue depth. The default
value is 8 requests. The device being used may support greater queue
depth, but increasing the value of quantum will also increase latency,
especially for large sequential write work loads.
+
The [option]`apm` option sets the Advanced Power Management feature
on drives that support it. It corresponds to using the `-B` option of
the `hdparm` utility. The [option]`spindown` option puts the drive
into idle (low-power) mode, and also sets the standby (spindown)
timeout for the drive. It corresponds to using `-S` option of the
`hdparm` utility.
+
.Use a medium-agressive power management with spindown
====
----
@ -64,7 +61,7 @@ class DiskPlugin(hotplug.Plugin):
spindown=6
----
====
+
The [option]`readahead` option controls how much extra data the
operating system reads from disk when performing sequential
I/O operations. Increasing the `readahead` value might improve
@ -73,7 +70,7 @@ class DiskPlugin(hotplug.Plugin):
can be adjusted to sectors by specifying the suffix 's'. If the
suffix is specified, there must be at least one space between the
number and suffix (for example, `readahead=8192 s`).
+
.Set the `readahead` to 4MB unless already set to a higher value
====
----

View file

@ -8,8 +8,6 @@ log = tuned.logs.get()
class EeePCSHEPlugin(base.Plugin):
"""
`eeepc_she`::
Dynamically sets the front-side bus (FSB) speed according to the
CPU load. This feature can be found on some netbooks and is also
known as the Asus Super Hybrid Engine. If the CPU load is lower or

View file

@ -18,37 +18,37 @@ class IrqInfo(object):
class IrqPlugin(hotplug.Plugin):
r"""
`irq`::
Allows tuning of IRQ affinities, and thus re-implements functionality
already present in the `scheduler` plugin. However, this plugin offers
more flexibility, as it allows tuning of individual interrupts with
different affinities. When using the `irq` plugin, make sure to disable
IRQ processing in the `scheduler` plugin by setting its option
[option]`irq_process=false`.
The plugin handles individual IRQs as `devices`, and multiple plugin
The plugin handles individual IRQs as devices and multiple plugin
instances can be defined, each addressing different devices/irqs.
The `device` names used by the plugin are `irq<n>`, where `<n>` is the
IRQ number. The special `device` `DEFAULT` controls values written to
The device names used by the plugin are `irq<n>`, where `<n>` is the
IRQ number. The special device `DEFAULT` controls values written to
`/proc/irq/default_smp_affinity`, which applies to all non-active IRQs.
===
The option [option]`affinity` controls the IRQ affinity to be set. It is
a string in "cpulist" format (such as 1,3-4). If the configured affinity
a string in "cpulist" format (such as `1,3-4`). If the configured affinity
is empty, then the affinity of the respective IRQs is not touched.
===
The option [option]`mode` is a string which can either be `set` (default)
or `intersect`. In `set` mode the [option]`affinity` is always written
as configured, whereas in `intersect` mode, the new affinity will be
calculated as the intersection of the current and the configured affinity.
If that intersection is empty, the configured affinity will be used.
--
.Example moving all IRQs to CPU0, except irq16, which is directed to CPU2
.Moving all IRQs to CPU0, except irq16, which is directed to CPU2
====
----
[irq_special]
type=irq
devices=irq16
affinity=2
[irq]
affinity=0
----

View file

@ -10,16 +10,14 @@ log = tuned.logs.get()
class IrqbalancePlugin(base.Plugin):
"""
`irqbalance`::
Plug-in for irqbalance settings management. The plug-in
configures CPUs which should be skipped when rebalancing IRQs in
`/etc/sysconfig/irqbalance`. It then restarts irqbalance if and
only if it was previously running.
+
The banned/skipped CPUs are specified as a CPU list via the
[option]`banned_cpus` option.
+
.Skip CPUs 2,4 and 9-13 when rebalancing IRQs
====
----

View file

@ -11,16 +11,14 @@ log = tuned.logs.get()
class ModulesPlugin(base.Plugin):
"""
`modules`::
Plug-in for applying custom kernel modules options.
+
This plug-in can set parameters to kernel modules. It creates
`/etc/modprobe.d/tuned.conf` file. The syntax is
`_module_=_option1=value1 option2=value2..._` where `_module_` is
the module name and `_optionx=valuex_` are module options which may
or may not be present.
+
.Load module `netrom` with module parameter `nr_ndevs=2`
====
----
@ -28,9 +26,10 @@ class ModulesPlugin(base.Plugin):
netrom=nr_ndevs=2
----
====
Modules can also be forced to load/reload by using an additional
`+r` option prefix.
+
.(Re)load module `netrom` with module parameter `nr_ndevs=2`
====
----
@ -38,11 +37,12 @@ class ModulesPlugin(base.Plugin):
netrom=+r nr_ndevs=2
----
====
The `+r` switch will also cause *TuneD* to try and remove `netrom`
module (if loaded) and try and (re)insert it with the specified
parameters. The `+r` can be followed by an optional comma (`+r,`)
for better readability.
+
When using `+r` the module will be loaded immediately by the *TuneD*
daemon itself rather than waiting for the OS to load it with the
specified parameters.

View file

@ -11,13 +11,12 @@ cmd = commands()
class MountsPlugin(base.Plugin):
"""
`mounts`::
Enables or disables barriers for mounts according to the value of the
[option]`disable_barriers` option. The [option]`disable_barriers`
option has an optional value `force` which disables barriers even
on mountpoints with write back caches. Note that only extended file
systems (ext) are supported by this plug-in.
boolean option [option]`disable_barriers`. The option additionally allows
the special value `force`, which disables barriers even on mountpoints with
write back caches.
NOTE: Only extended file systems (ext) are supported by this plug-in.
"""
@classmethod

View file

@ -13,14 +13,13 @@ WOL_VALUES = "pumbagsd"
class NetTuningPlugin(hotplug.Plugin):
"""
`net`::
Configures network driver, hardware and Netfilter settings.
Dynamic change of the interface speed according to the interface
utilization is also supported. The dynamic tuning is controlled by
the [option]`dynamic` and the global [option]`dynamic_tuning`
option in `tuned-main.conf`.
+
`wake_on_lan`:::
The [option]`wake_on_lan` option sets wake-on-lan to the specified
value as when using the `ethtool` utility.
+
@ -32,7 +31,8 @@ class NetTuningPlugin(hotplug.Plugin):
wake_on_lan=g
----
====
+
`coalesce`:::
The [option]`coalesce` option allows changing coalescing settings
for the specified network devices. The syntax is:
+
@ -40,10 +40,11 @@ class NetTuningPlugin(hotplug.Plugin):
----
coalesce=__param1__ __value1__ __param2__ __value2__ ... __paramN__ __valueN__
----
+
Note that not all the coalescing parameters are supported by all
network cards. For the list of coalescing parameters of your network
device, use `ethtool -c device`.
+
+
.Setting coalescing parameters rx/tx-usecs for all network devices
====
----
@ -51,7 +52,8 @@ class NetTuningPlugin(hotplug.Plugin):
coalesce=rx-usecs 3 tx-usecs 16
----
====
+
`features`:::
The [option]`features` option allows changing
the offload parameters and other features for the specified
network devices. To query the features of your network device,
@ -65,6 +67,8 @@ class NetTuningPlugin(hotplug.Plugin):
features=tx off gso off gro off
----
====
`pause`:::
The [option]`pause` option allows changing the pause parameters for
the specified network devices. To query the pause parameters of your
network device, use `ethtool -a device`. The syntax of the option
@ -77,12 +81,13 @@ class NetTuningPlugin(hotplug.Plugin):
pause=autoneg off
----
====
+
`ring`:::
The [option]`ring` option allows changing the rx/tx ring parameters
for the specified network devices. To query the ring parameters of your
network device, use `ethtool -g device`. The syntax of the option
is the same as the [option]`coalesce` option.
+
+
.Change the number of ring entries for the Rx/Tx rings to 1024/512 respectively
=====
-----
@ -90,7 +95,8 @@ class NetTuningPlugin(hotplug.Plugin):
ring=rx 1024 tx 512
-----
=====
+
`channels`:::
The [option]`channels` option allows changing the numbers of channels
for the specified network device. A channel is an IRQ and the set
of queues that can trigger that IRQ. To query the channels parameters of your
@ -104,12 +110,13 @@ class NetTuningPlugin(hotplug.Plugin):
channels=combined 16
-----
=====
+
+
A network device either supports rx/tx or combined queue
mode. The [option]`channels` option automatically adjusts the
parameters based on the mode supported by the device as long as a
valid configuration is requested.
+
`nf_conntrack_hashsize`:::
The [option]`nf_conntrack_hashsize` option sets the size of the hash
table which stores lists of conntrack entries by writing to
`/sys/module/nf_conntrack/parameters/hashsize`.
@ -121,7 +128,8 @@ class NetTuningPlugin(hotplug.Plugin):
nf_conntrack_hashsize=131072
----
====
+
`txqueuelen`:::
The [option]`txqueuelen` option allows changing txqueuelen (the length
of the transmit queue). It uses `ip` utility that is in package iproute
recommended for TuneD, so the package needs to be installed for its correct
@ -135,7 +143,8 @@ class NetTuningPlugin(hotplug.Plugin):
txqueuelen=5000
----
====
+
`mtu`:::
The [option]`mtu` option allows changing MTU (Maximum Transmission Unit).
It uses `ip` utility that is in package iproute recommended for TuneD, so
the package needs to be installed for its correct functionality. To query

View file

@ -10,11 +10,11 @@ log = tuned.logs.get()
class RTENTSKPlugin(base.Plugin):
"""
`rtentsk`::
A plug-in for avoiding inter-processor interrupts caused by enabling
or disabling static keys.
Plugin for avoiding interruptions due to static key IPIs due
to opening socket with timestamping enabled (by opening a
socket ourselves the static key is kept enabled).
The plug-in has no options; when included, **TuneD** will keep an open
socket with timestamping enabled, thus keeping the static key enabled.
"""
def _instance_init(self, instance):

View file

@ -136,11 +136,9 @@ class SchedulerUtilsSchedutils(SchedulerUtils):
class SchedulerPlugin(base.Plugin):
r"""
`scheduler`::
Allows tuning of scheduling priorities, process/thread/IRQ
affinities, and CPU isolation.
+
To prevent processes/threads/IRQs from using certain CPUs, use
the [option]`isolated_cores` option. It changes process/thread
affinities, IRQs affinities and it sets `default_smp_affinity`
@ -154,11 +152,11 @@ class SchedulerPlugin(base.Plugin):
cmd`) are matched against that expression. Profile rollback allows
all matching processes and threads to run on all CPUs and restores
the IRQ settings prior to the profile application.
+
Multiple regular expressions for [option]`ps_whitelist`
and [option]`ps_blacklist` options are allowed and separated by
`;`. Quoted semicolon `\;` is taken literally.
+
.Isolate CPUs 2-4
====
----
@ -169,23 +167,24 @@ class SchedulerPlugin(base.Plugin):
Isolate CPUs 2-4 while ignoring processes and threads matching
`ps_blacklist` regular expressions.
====
The [option]`irq_process` option controls whether the scheduler plugin
applies the `isolated_cores` parameter to IRQ affinities. The default
value is `true`, which means that the scheduler plugin will move all
possible IRQs away from the isolated cores. When `irq_process` is set
to `false`, the plugin will not change any IRQ affinities.
====
The [option]`default_irq_smp_affinity` option controls the values
*TuneD* writes to `/proc/irq/default_smp_affinity`. The file specifies
default affinity mask that applies to all non-active IRQs. Once an
IRQ is allocated/activated its affinity bitmask will be set to the
default mask.
+
The following values are supported:
* `calc`
+
--
`calc`::
Content of `/proc/irq/default_smp_affinity` will be calculated
The content of `/proc/irq/default_smp_affinity` will be calculated
from the `isolated_cores` parameter. Non-isolated cores
are calculated as an inversion of the `isolated_cores`. Then
the intersection of the non-isolated cores and the previous
@ -194,13 +193,16 @@ class SchedulerPlugin(base.Plugin):
an empty set, then just the non-isolated cores are written to
`/proc/irq/default_smp_affinity`. This behavior is the default if
the parameter `default_irq_smp_affinity` is omitted.
`ignore`::
*TuneD* will not touch `/proc/irq/default_smp_affinity`.
explicit cpulist::
The cpulist (such as 1,3-4) is unpacked and written directly to
`/proc/irq/default_smp_affinity`.
--
* `ignore`
+
*TuneD* will not touch `/proc/irq/default_smp_affinity`.
* an explicit cpulist
+
The cpulist (such as `1,3-4`) is unpacked and written directly to
`/proc/irq/default_smp_affinity`.
.An explicit CPU list to set the default IRQ smp affinity to CPUs 0 and 2
====
----
@ -209,48 +211,49 @@ class SchedulerPlugin(base.Plugin):
default_irq_smp_affinity=0,2
----
====
To adjust scheduling policy, priority and affinity for a group of
processes/threads, use the following syntax.
+
[subs="+quotes,+macros"]
----
group.__groupname__=__rule_prio__:__sched__:__prio__:__affinity__:__regex__
----
+
where `__rule_prio__` defines internal *TuneD* priority of the
Here, `__rule_prio__` defines internal *TuneD* priority of the
rule. Rules are sorted based on priority. This is needed for
inheritence to be able to reorder previously defined rules. Equal
`__rule_prio__` rules should be processed in the order they were
defined. However, this is Python interpreter dependant. To disable
an inherited rule for `__groupname__` use:
+
[subs="+quotes,+macros"]
----
group.__groupname__=
----
+
`__sched__` must be one of:
*`f`* for FIFO,
*`b`* for batch,
*`r`* for round robin,
*`o`* for other,
*`*`* do not change.
+
`__affinity__` is CPU affinity in hexadecimal. Use `*` for no change.
+
`__prio__` scheduling priority (see `chrt -m`).
+
`__regex__` is Python regular expression. It is matched against the output of
+
`__regex__` is Python regular expression. It is matched against the output of:
[subs="+quotes,+macros"]
----
ps -eo cmd
----
+
Any given process name may match more than one group. In such a case,
the priority and scheduling policy are taken from the last matching
`__regex__`.
+
.Setting scheduling policy and priorities to kernel threads and watchdog
====
----
@ -259,7 +262,7 @@ class SchedulerPlugin(base.Plugin):
group.watchdog=0:f:99:*:\[watchdog.*\]
----
====
+
The scheduler plug-in uses perf event loop to catch newly created
processes. By default it listens to `perf.RECORD_COMM` and
`perf.RECORD_EXIT` events. By setting [option]`perf_process_fork`
@ -271,14 +274,14 @@ class SchedulerPlugin(base.Plugin):
pose a significant CPU overhead, the [option]`perf_process_fork`
option parameter is set to `false` by default. Due to this, child
processes are not processed by the scheduler plug-in.
+
The CPU overhead of the scheduler plugin can be mitigated by using
the scheduler [option]`runtime` option and setting it to `0`. This
will completely disable the dynamic scheduler functionality and the
perf events will not be monitored and acted upon. The disadvantage
ot this approach is the procees/thread tuning will be done only at
profile application.
+
.Disabling the scheduler dynamic functionality
====
----
@ -287,7 +290,7 @@ class SchedulerPlugin(base.Plugin):
isolated_cores=1,3
----
====
+
NOTE: For perf events, memory mapped buffer is used. Under heavy load
the buffer may overflow. In such cases the `scheduler` plug-in
may start missing events and failing to process some newly created
@ -297,24 +300,24 @@ class SchedulerPlugin(base.Plugin):
of 2, the nearest higher power of 2 value is calculated from it
and this calculated value used. If the [option]`perf_mmap_pages`
option is omitted, the default kernel value is used.
+
The scheduler plug-in supports process/thread confinement using
cgroups v1.
+
[option]`cgroup_mount_point` option specifies the path to mount the
cgroup filesystem or where *TuneD* expects it to be mounted. If unset,
`/sys/fs/cgroup/cpuset` is expected.
+
If [option]`cgroup_groups_init` option is set to `1` *TuneD*
will create (and remove) all cgroups defined with the `cgroup*`
options. This is the default behavior. If it is set to `0` the
cgroups need to be preset by other means.
+
If [option]`cgroup_mount_point_init` option is set to `1`,
*TuneD* will create (and remove) the cgroup mountpoint. It implies
`cgroup_groups_init = 1`. If set to `0` the cgroups mount point
needs to be preset by other means. This is the default behavior.
+
The [option]`cgroup_for_isolated_cores` option is the cgroup
name used for the [option]`isolated_cores` option functionality. For
example, if a system has 4 CPUs, `isolated_cores=1` means that all
@ -324,24 +327,24 @@ class SchedulerPlugin(base.Plugin):
the specified cgroup and move all the matching processes/threads to
this group. If this option is unset, classic cpuset affinity using
`sched_setaffinity()` will be used.
+
[option]`cgroup.__cgroup_name__` option defines affinities for
arbitrary cgroups. Even hierarchic cgroups can be used, but the
hieararchy needs to be specified in the correct order. Also *TuneD*
does not do any sanity checks here, with the exception that it forces
the cgroup to be under [option]`cgroup_mount_point`.
+
The syntax of the scheduler option starting with `group.` has been
augmented to use `cgroup.__cgroup_name__` instead of the hexadecimal
`__affinity__`. The matching processes will be moved to the cgroup
`__cgroup_name__`. It is also possible to use cgroups which have
not been defined by the [option]`cgroup.` option as described above,
i.e. cgroups not managed by *TuneD*.
+
All cgroup names are sanitized by replacing all all dots (`.`) with
slashes (`/`). This is to prevent the plug-in from writing outside
[option]`cgroup_mount_point`.
+
.Using cgroups v1 with the scheduler plug-in
====
----
@ -367,6 +370,7 @@ class SchedulerPlugin(base.Plugin):
CPU affinity 0,2-3 to the `cpuset.cpus` control file of the `group`
and move all the matching processes/threads to this cgroup.
====
Option [option]`cgroup_ps_blacklist` allows excluding processes
which belong to the blacklisted cgroups. The regular expression specified
by this option is matched against cgroup hierarchies from
@ -374,10 +378,10 @@ class SchedulerPlugin(base.Plugin):
are separated by commas ',' prior to regular expression matching. The
following is an example of content against which the regular expression
is matched against: `10:hugetlb:/,9:perf_event:/,8:blkio:/`
+
Multiple regular expressions can be separated by semicolon ';'. The
semicolon represents a logical 'or' operator.
+
.Cgroup-based exclusion of processes from the scheduler
====
----
@ -385,20 +389,18 @@ class SchedulerPlugin(base.Plugin):
isolated_cores=1
cgroup_ps_blacklist=:/daemons\b
----
The scheduler plug-in will move all processes away from core 1 except processes which
belong to cgroup '/daemons'. The '\b' is a regular expression
metacharacter that matches a word boundary.
----
[scheduler]
isolated_cores=1
cgroup_ps_blacklist=\b8:blkio:
----
The scheduler plug-in will exclude all processes which belong to a cgroup
with hierarchy-ID 8 and controller-list blkio.
====
Recent kernels moved some `sched_` and `numa_balancing_` kernel run-time
parameters from `/proc/sys/kernel`, managed by the `sysctl` utility, to
`debugfs`, typically mounted under `/sys/kernel/debug`. TuneD provides an
@ -412,7 +414,7 @@ class SchedulerPlugin(base.Plugin):
[option]`numa_balancing_scan_size_mb`.
Based on the kernel used, TuneD will write the specified value to the correct
location.
+
.Set tasks' "cache hot" value for migration decisions.
====
----

View file

@ -8,42 +8,37 @@ log = tuned.logs.get()
class ScriptPlugin(base.Plugin):
"""
`script`::
Executes an external script or binary when the profile is loaded or
unloaded. You can choose an arbitrary executable.
+
IMPORTANT: The `script` plug-in is provided mainly for compatibility
with earlier releases. Prefer other *TuneD* plug-ins if they cover
the required functionality.
+
*TuneD* calls the executable with one of the following arguments:
+
--
** `start` when loading the profile
** `stop` when unloading the profile
--
+
* `start` when loading the profile
* `stop` when unloading the profile
You need to correctly implement the `stop` action in your executable
and revert all settings that you changed during the `start`
action. Otherwise, the roll-back step after changing your *TuneD*
profile will not work.
+
Bash scripts can import the [filename]`/usr/lib/tuned/functions`
Bash library and use the functions defined there. Use these
functions only for functionality that is not natively provided
by *TuneD*. If a function name starts with an underscore, such as
`_wifi_set_power_level`, consider the function private and do not
use it in your scripts, because it might change in the future.
+
Specify the path to the executable using the `script` parameter in
the plug-in configuration.
+
.Running a Bash script from a profile
====
To run a Bash script named `script.sh` that is located in the profile
directory, use:
----
[script]
script=${i:PROFILE_DIR}/script.sh

View file

@ -11,17 +11,15 @@ log = tuned.logs.get()
class SCSIHostPlugin(hotplug.Plugin):
"""
`scsi_host`::
Tunes options for SCSI hosts.
+
The plug-in sets Aggressive Link Power Management (ALPM) to the value specified
by the [option]`alpm` option. The option takes one of three values:
`min_power`, `medium_power` and `max_performance`.
+
NOTE: ALPM is only available on SATA controllers that use the Advanced
Host Controller Interface (AHCI).
+
.ALPM setting when extended periods of idle time are expected
====
----

View file

@ -10,20 +10,18 @@ log = tuned.logs.get()
class SelinuxPlugin(base.Plugin):
"""
`selinux`::
Plug-in for tuning SELinux options.
+
SELinux decisions, such as allowing or denying access, are
cached. This cache is known as the Access Vector Cache (AVC). When
using these cached decisions, SELinux policy rules need to be checked
less, which increases performance. The [option]`avc_cache_threshold`
option allows adjusting the maximum number of AVC entries.
+
NOTE: Prior to changing the default value, evaluate the system
performance with care. Increasing the value could potentially
decrease the performance by making AVC slow.
+
.Increase the AVC cache threshold for hosts with containers.
====
----

View file

@ -170,35 +170,33 @@ class SystemdHandler(InitHandler):
class ServicePlugin(base.Plugin):
"""
`service`::
Plug-in for handling sysvinit, sysv-rc, openrc and systemd services.
+
The syntax is as follows:
+
[subs="+quotes,+macros"]
----
[service]
service.__service_name__=__commands__[,file:__file__]
----
+
Supported service-handling `_commands_` are `start`, `stop`, `enable`
and `disable`. The optional `file:__file__` directive installs an overlay
configuration file `__file__`. Multiple commands must be comma (`,`)
or semicolon (`;`) separated. If the directives conflict, the last
one is used.
+
The service plugin supports configuration overlays only for systemd.
In other init systems, this directive is ignored. The configuration
overlay files are copied to `/etc/systemd/system/__service_name__.service.d/`
directories. Upon profile unloading, the directory is removed if it is empty.
+
With systemd, the `start` command is implemented by `restart` in order
to allow loading of the service configuration file overlay.
+
NOTE: With non-systemd init systems, the plug-in operates on the
current runlevel only.
+
.Start and enable the `sendmail` service with an overlay file
====
----

View file

@ -16,20 +16,18 @@ SYSCTL_CONFIG_DIRS = [ "/run/sysctl.d",
class SysctlPlugin(base.Plugin):
"""
`sysctl`::
Sets various kernel parameters at runtime.
+
This plug-in is used for applying custom `sysctl` settings and should
only be used to change system settings that are not covered by other
*TuneD* plug-ins. If the settings are covered by other *TuneD* plug-ins,
use those plug-ins instead.
+
The syntax for this plug-in is
`_key_=_value_`, where
`_key_` is the same as the key name provided by the
`sysctl` utility.
+
.Adjusting the kernel runtime kernel.sched_min_granularity_ns value
====
----

View file

@ -12,19 +12,17 @@ log = tuned.logs.get()
class SysfsPlugin(base.Plugin):
"""
`sysfs`::
Sets various `sysfs` settings specified by the plug-in options.
+
The syntax is `_name_=_value_`, where
`_name_` is the `sysfs` path to use and `_value_` is
the value to write. The `sysfs` path supports the shell-style
wildcard characters (see `man 7 glob` for additional detail).
+
Use this plugin in case you need to change some settings that are
not covered by other plug-ins. Prefer specific plug-ins if they
cover the required settings.
+
.Ignore corrected errors and associated scans that cause latency spikes
====
----

View file

@ -12,16 +12,14 @@ log = tuned.logs.get()
class SystemdPlugin(base.Plugin):
"""
`systemd`::
Plug-in for tuning systemd options.
+
The [option]`cpu_affinity` option allows setting CPUAffinity in
`/etc/systemd/system.conf`. This configures the CPU affinity for the
service manager as well as the default CPU affinity for all forked
off processes. The option takes a comma-separated list of CPUs with
optional CPU ranges specified by the minus sign (`-`).
+
.Set the CPUAffinity for `systemd` to `0 1 2 3`
====
----
@ -29,7 +27,7 @@ class SystemdPlugin(base.Plugin):
cpu_affinity=0-3
----
====
+
NOTE: These tunings are unloaded only on profile change followed by a reboot.
"""

View file

@ -16,14 +16,13 @@ IS_MAX = 1
class UncorePlugin(hotplug.Plugin):
"""
`uncore`::
An Intel-specific plug-in for limiting the maximum and minimum uncore frequency.
`max_freq_khz, min_freq_khz`:::
Limit the maximum and minimum uncore frequency.
The options [option]`max_freq_khz`, [option]`min_freq_khz` correspond to
`sysfs` files exposed by Intel uncore frequency driver. Their values can be
specified in kHz or as a percentage of their configurable range.
Those options are Intel specific and correspond directly to `sysfs` files
exposed by Intel uncore frequency driver. Values can be specified as kHz
or as percent of configurable range.
.Limiting maximum uncore frequency
====
----
[uncore10]

View file

@ -9,16 +9,14 @@ log = tuned.logs.get()
class USBPlugin(base.Plugin):
"""
`usb`::
Sets autosuspend timeout of USB devices to the value specified by the
[option]`autosuspend` option in seconds. If the [option]`devices`
option is specified, the [option]`autosuspend` option applies to only
the USB devices specified, otherwise it applies to all USB devices.
+
The value `0` means that autosuspend is disabled.
+
.To turn off USB autosuspend for USB devices `1-1` and `1-2`
.Turn off USB autosuspend for USB devices `1-1` and `1-2`
====
----
[usb]

View file

@ -10,14 +10,11 @@ log = tuned.logs.get()
class VideoPlugin(base.Plugin):
"""
`video`::
Sets various power saving features on video cards.
Radeon cards are supported.
The powersave level can be specified
by using the [option]`radeon_powersave` option. Supported values are:
+
--
* `default`
* `auto`
* `low`
@ -27,14 +24,13 @@ class VideoPlugin(base.Plugin):
* `dpm-battery`
* `dpm-balanced`
* `dpm-perfomance`
--
+
For additional detail, see
link:https://www.x.org/wiki/RadeonFeature/#kmspowermanagementoptions[KMS Power Management Options].
+
NOTE: This plug-in is experimental and the option might change in future releases.
+
.To set the powersave level for the Radeon video card to high
.Setting powersave level for the Radeon video card to high
====
----
[video]

View file

@ -13,12 +13,10 @@ cmd = commands()
class VMPlugin(base.Plugin):
"""
`vm`::
Enables or disables transparent huge pages depending on value of the
[option]`transparent_hugepages` option. The option can have one of three
possible values `always`, `madvise` and `never`.
+
.Disable transparent hugepages
====
----
@ -26,7 +24,7 @@ class VMPlugin(base.Plugin):
transparent_hugepages=never
----
====
+
The [option]`transparent_hugepage.defrag` option specifies the
defragmentation policy. Possible values for this option are `always`,
`defer`, `defer+madvise`, `madvise` and `never`. For a detailed