Product SiteDocumentation Site

2.5.4. Custom Profiles

Distribution-specific profiles are stored in the /usr/lib/tuned directory. Each profile has its own directory. The profile consists of the main configuration file called tuned.conf and optionally other files like helper scripts. Do not change the profiles in /usr/lib/tuned. If you need to customize the profile, copy the profile directory to the /etc/tuned directory. This is the place for the custom profiles. If there are two profiles with the same name, the profile from /etc/tuned will take precedence. You can also create your own profile in the /etc/tuned directory which will include the profile of your interest and only change or override the desired parameters.
The tuned.conf file contains several sections. There is one [main] section. The other sections are configurations for plugins instances. All sections are optional including the [main] section. Comments are also supported. Lines starting with a hash (#) are comments.
The [main] section has the following option:
include=profile
The specified profile will be included, e.g. include=powersave will include the powersave profile.
Sections describing plugins instances are formatted in the following way:
[NAME]
type=TYPE
devices=DEVICES
NAME is the name of the plugin instance as it is used in the logs. It can be an arbitrary string. TYPE is the type of the tuning plugin. For a list and descriptions of the tuning plugins refer to Section 2.5.1, “Plugins”. DEVICES is the list of devices this plugin instance will handle. The devices line can contain a list, a wildcard (*), and negation (!). You can also combine rules. If there is no devices line all devices present or later attached on the system of the TYPE will be handled by the plugin instance. This is same as using devices=*. If no instance of the plugin is specified, the plugin will not be enabled. If the plugin supports more options, they can be also specified in the plugin section. If the option is not specified, the default value will be used (if not previously specified in the included plugin). For the list of plugin options refer to Section 2.5.1, “Plugins”).

Example 2.1. Describing plugins instances

The following example will match everything starting with sd, such as sda or sdb and doesn't disable barriers on them:
[data_disk]
type=disk
devices=sd*
disable_barriers=false
The following example will match everything except sda1 and sda2:
[data_disk]
type=disk
devices=!sda1, !sda2 
disable_barriers=false
In cases where you do not need custom names for the plugin instance and there is only one definition of the instance in your configuration file, Tuned supports the following short syntax:
[TYPE]
devices=DEVICES
In this case, it is possible to omit the type line. The instance will then be referred to with a name, same as the type. The previous example could be then rewritten into:
[disk]
devices=sdb*
disable_barriers=false
If the same section is specified more than once using the include option, then the settings are merged. If they cannot be merged due to a conflict, the last conflicting definition will override the previous settings in conflict. Sometimes you do not know what was previously defined. In such cases, you can use the replace boolean option and set it to true. This will cause all the previous definitions with the same name to be overwritten and the merge will not happen.
You can also disable the plugin by specifying the enabled=false option. This has the same effect as if the instance was never defined. Disabling the plugin can be useful if you are redefining the previous definition from the include option and do not want the plugin to be active in your custom profile.
Most of the time the device can be handled by one plugin instance. If the device matches multiple instances definitions, an error is reported.
The following is an example of a custom profile that is based on the balanced profile and extends it the way that ALPM for all devices is set to the maximal powersave.
[main]
include=balanced

[disk]
alpm=min_power