Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Deploy TuneD website to Pages

on:
push:
branches:
- master

workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout the master branch
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt install -y make asciidoctor
- name: Build the manual
run: make -C doc/manual
- name: Prepare the website contents
run: |
git fetch origin gh-pages:gh-pages
git clone -b gh-pages . _site
cp doc/manual/index.html _site/docs/manual.html
- name: Setup Pages
id: pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ tuned-*.tar.bz2
*~
*.html
doc/manual/modules/performance/ref_available-tuned-plug-ins.adoc
doc/manual/modules/performance/ref_built-in-functions-available-in-tuned-profiles.adoc
36 changes: 0 additions & 36 deletions compile_plugin_docs.py

This file was deleted.

6 changes: 4 additions & 2 deletions doc/manual/Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
.PHONY: clean

index.html: master.adoc assemblies/*.adoc meta/*.adoc modules/performance/*.adoc ../../tuned/plugins/plugin_*.py
$(PYTHON) ../../compile_plugin_docs.py modules/performance/ref_available-tuned-plug-ins_intro.adoc modules/performance/ref_available-tuned-plug-ins.adoc
index.html: master.adoc assemblies/*.adoc meta/*.adoc modules/performance/*.adoc ../../tuned/plugins/plugin_*.py ../../tuned/profiles/functions/function_*.py
$(PYTHON) ./compile_plugin_docs.py ../../tuned/plugins plugin_ Plugin modules/performance/ref_available-tuned-plug-ins_intro.adoc modules/performance/ref_available-tuned-plug-ins.adoc
$(PYTHON) ./compile_plugin_docs.py ../../tuned/profiles/functions function_ Function modules/performance/ref_built-in-functions-available-in-tuned-profiles_intro.adoc modules/performance/ref_built-in-functions-available-in-tuned-profiles.adoc
asciidoctor -o index.html master.adoc || asciidoc -d book -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 modules/performance/ref_built-in-functions-available-in-tuned-profiles.adoc
rm -f *.html
10 changes: 2 additions & 8 deletions doc/manual/assemblies/assembly_customizing-tuned-profiles.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,11 @@ ifdef::pantheonenv[]
endif::[]


include::modules/performance/con_tuned-profiles.adoc[leveloffset=+1]

include::modules/performance/con_the-default-tuned-profile.adoc[leveloffset=+1]

include::modules/performance/con_merged-tuned-profiles.adoc[leveloffset=+1]

include::modules/performance/con_the-location-of-tuned-profiles.adoc[leveloffset=+1]

include::modules/performance/con_inheritance-between-tuned-profiles.adoc[leveloffset=+1]
include::modules/performance/con_syntax-of-profile-configuration.adoc[leveloffset=+1]

include::modules/performance/con_static-and-dynamic-tuning-in-tuned.adoc[leveloffset=+1]
include::modules/performance/con_inheritance-between-tuned-profiles.adoc[leveloffset=+1]

include::modules/performance/con_tuned-plug-ins.adoc[leveloffset=+1]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,12 @@ include::modules/performance/con_tuned-profiles.adoc[leveloffset=+1]

include::modules/performance/con_the-default-tuned-profile.adoc[leveloffset=+1]

include::modules/performance/con_merged-tuned-profiles.adoc[leveloffset=+1]

include::modules/performance/con_the-location-of-tuned-profiles.adoc[leveloffset=+1]

include::modules/performance/ref_tuned-profiles-distributed-with-rhel.adoc[leveloffset=+1]

include::modules/performance/ref_real-time-tuned-profiles-distributed-with-rhel.adoc[leveloffset=+1]

include::modules/performance/con_merged-tuned-profiles.adoc[leveloffset=+1]

include::modules/performance/con_static-and-dynamic-tuning-in-tuned.adoc[leveloffset=+1]

include::modules/performance/con_tuned-no-daemon-mode.adoc[leveloffset=+1]
Expand Down
53 changes: 53 additions & 0 deletions doc/manual/compile_plugin_docs.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#!/usr/bin/env python3
import argparse
import ast
import os
import inspect


class DocLoader:
def __init__(self, directory, prefix, base):
self._directory = directory
self._prefix = prefix
self._base = base

def _load_doc(self, module_path):
with open(module_path, "r") as file:
tree = ast.parse(file.read(), filename=module_path)
for node in ast.walk(tree):
if isinstance(node, ast.ClassDef) and any(
hasattr(base, "attr") and base.attr == self._base for base in node.bases
):
return inspect.cleandoc(ast.get_docstring(node))
return ""

def load_all_docs(self):
docs = {}
for filename in os.listdir(self._directory):
if not filename.startswith(self._prefix):
continue
name = filename.split(".")[0].split("_", 1)[1]
path = os.path.join(self._directory, filename)
docs[name] = self._load_doc(path)
return docs


if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("directory")
parser.add_argument("prefix")
parser.add_argument("base")
parser.add_argument("intro")
parser.add_argument("out")
args = parser.parse_args()

with open(args.intro, "r") as intro_file:
intro = intro_file.read()

doc_loader = DocLoader(args.directory, args.prefix, args.base)
class_docs = doc_loader.load_all_docs()

with open(args.out, "w") as out_file:
out_file.write(intro)
for name, docs in class_docs.items():
out_file.writelines(["\n", "== **%s**\n" % name, "%s\n" % docs])
6 changes: 4 additions & 2 deletions doc/manual/master.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:revnumber: 2.24.1
:revdate: 2024-10-09
:revnumber: 2.27.0
:revdate: 2026-03-03
:keywords: documentation, tuned, performance, power, linux
:toc:

Expand All @@ -11,6 +11,8 @@
// Load externally defined attributes
include::meta/attributes.adoc[]

include::meta/variables.adoc[]

// Set context for all included assemblies
:context: tuned-documentation

Expand Down
2 changes: 2 additions & 0 deletions doc/manual/meta/variables.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
:system-profile-dir: /usr/lib/tuned/profiles
:user-profile-dir: /etc/tuned/profiles
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ include=[replaceable]_parent_

All settings from the [replaceable]_parent_ profile are loaded in this _child_ profile. In the following sections, the _child_ profile can override certain settings inherited from the [replaceable]_parent_ profile or add new settings not present in the [replaceable]_parent_ profile.

You can create your own _child_ profile in the [filename]`/etc/tuned/profiles/` directory based on a pre-installed profile in [filename]`/usr/lib/tuned/profiles/` with only some parameters adjusted.
You can create your own _child_ profile in the [filename]`{user-profile-dir}` directory based on a pre-installed profile in [filename]`{system-profile-dir}` with only some parameters adjusted.

If the [replaceable]_parent_ profile is updated, such as after a *TuneD* upgrade, the changes are reflected in the _child_ profile.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[role="_abstract"]
As an experimental feature, it is possible to select more profiles at once. *TuneD* will try to merge them during the load.

If there are conflicts, the settings from the last specified profile takes precedence.
If there are conflicts, the settings from the last specified profile take precedence.

.Low power consumption in a virtual guest
====
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
:_module-type: CONCEPT
[id="syntax-of-profile-configuration_{context}"]
= Syntax of profile configuration

[role="_abstract"]
The `tuned.conf` file uses INI syntax. It can contain one `[main]` section and other sections for configuring plug-in instances. However, all sections are optional.

Lines starting with the hash sign (`#`) are comments.

[role="_additional-resources"]
.Additional resources
* `tuned.conf(5)` man page.
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,20 @@
[role="_abstract"]
*TuneD* stores profiles in the following directories:

[filename]`/usr/lib/tuned/profiles/`::
Distribution-specific profiles are stored in the [filename]`/usr/lib/tuned/profiles/` directory. Each profile has its own directory. The profile consists of the main configuration file called `tuned.conf`, and optionally other files, for example helper scripts.
[filename]`{system-profile-dir}`::
Distribution-specific profiles are stored in the [filename]`{system-profile-dir}` directory. Each profile has its own directory. The profile consists of the main configuration file called `tuned.conf`, and optionally other files, for example helper scripts.

[filename]`/etc/tuned/profiles/`::
If you need to customize a profile, copy the profile directory into the [filename]`/etc/tuned/profiles/` directory, which is used for custom profiles, and then adjust it. If there is a system profile and a custom profile of the same name, the custom profile located in [filename]`/etc/tuned/profiles` is used.
[filename]`{user-profile-dir}`::
If you need to customize a profile, copy the profile directory into the [filename]`{user-profile-dir}` directory, which is used for custom profiles, and then adjust it. If there is a system profile and a custom profile of the same name, the custom profile located in [filename]`{user-profile-dir}` is used.

.User-defined profile directories
====
If you want to make TuneD load profiles from a directory other than [filename]`/usr/lib/tuned/profiles/` and [filename]`/etc/tuned/profiles/`, you can list it in [filename]`/etc/tuned/tuned-main.conf` as follows:
If you want to make TuneD load profiles from a directory other than [filename]`{system-profile-dir}` and [filename]`{user-profile-dir}`, you can list it in [filename]`/etc/tuned/tuned-main.conf` as follows:
[subs="attributes"]
----
profile_dirs=/usr/lib/tuned/profiles,/etc/tuned/profiles,/my/custom/profiles
profile_dirs={system-profile-dir},{user-profile-dir},/my/custom/profiles
----
In this example, profiles are loaded also from [filename]`/my/custom/profiles/`. If two directories contain profiles with the same names, the one that is listed later takes precedence.
In this example, profiles are loaded also from [filename]`/my/custom/profiles`. If two directories contain profiles with the same names, the one that is listed later takes precedence.
====

[role="_additional-resources"]
Expand Down
7 changes: 0 additions & 7 deletions doc/manual/modules/performance/con_tuned-profiles.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,6 @@ The performance-boosting profiles include profiles that focus on the following a
* Virtual machine performance
* Virtualization host performance

[discrete]
== Syntax of profile configuration

The `tuned.conf` file can contain one `[main]` section and other sections for configuring plug-in instances. However, all sections are optional.

Lines starting with the hash sign (`#`) are comments.

[role="_additional-resources"]
.Additional resources
* `tuned.conf(5)` man page.
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ endif::[]

.Procedure

. In the [filename]`/etc/tuned/profiles/` directory, create a new directory named the same as the profile that you want to create:
. In the [filename]`{user-profile-dir}` directory, create a new directory named the same as the profile that you want to create:
+
[subs="quotes"]
[subs="attributes, quotes"]
----
# mkdir /etc/tuned/profiles/[replaceable]_my-profile_
# mkdir {user-profile-dir}/[replaceable]_my-profile_
----

. In the new directory, create a file named [filename]`tuned.conf`. Add a `[main]` section and plug-in definitions in it, according to your requirements.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This procedure installs and enables the *TuneD* application, installs *TuneD* pr
. Install the [package]`tuned` package:
+
----
# yum install tuned
# dnf install tuned
----

. Enable and start the `tuned` service:
Expand All @@ -28,7 +28,7 @@ This procedure installs and enables the *TuneD* application, installs *TuneD* pr
. Optionally, install *TuneD* profiles for real-time systems:
+
----
# yum install tuned-profiles-realtime tuned-profiles-nfv
# dnf install tuned-profiles-realtime tuned-profiles-nfv
----

. Verify that a *TuneD* profile is active and applied:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ endif::[]

.Procedure

. In the [filename]`/etc/tuned/profiles/` directory, create a new directory named the same as the profile that you want to create:
. In the [filename]`{user-profile-dir}` directory, create a new directory named the same as the profile that you want to create:
+
[subs="quotes"]
[subs="attributes, quotes"]
----
# mkdir /etc/tuned/profiles/[replaceable]_modified-profile_
# mkdir {user-profile-dir}/[replaceable]_modified-profile_
----

. In the new directory, create a file named [filename]`tuned.conf`, and set the `[main]` section as follows:
Expand Down Expand Up @@ -75,13 +75,14 @@ See TuneD log file ('/var/log/tuned/tuned.log') for details.
----

// .An alternative approach
// . Alternatively, copy the directory with a system profile from /usr/lib/tuned/profiles/ to /etc/tuned/profiles/. For example:
// . Alternatively, copy the directory with a system profile from `{system-profile-dir}` to `{user-profile-dir}`. For example:
// +
// [subs="attributes"]
// ----
// # cp -r /usr/lib/tuned/profiles/throughput-performance /etc/tuned/profiles
// # cp -r {system-profile-dir}/throughput-performance {user-profile-dir}/
// ----
//
// . Then, edit the profile in /etc/tuned/profiles/ according to your needs. Note that if there are two profiles of the same name, the profile located in /etc/tuned/profiles/ is loaded. The disadvantage of this approach is that if a system profile is updated after a TuneD upgrade, the changes will not be reflected in the now-outdated modified version.
// . Then, edit the profile in `{user-profile-dir}` according to your needs. Note that if there are two profiles of the same name, the profile located in `{user-profile-dir}` is loaded. The disadvantage of this approach is that if a system profile is updated after a TuneD upgrade, the changes will not be reflected in the now-outdated modified version.

[role="_additional-resources"]
.Additional resources
Expand Down
Loading
Loading