1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/microshift-low-latency-tuned-profile.adoc
2025-10-07 17:43:41 +00:00

94 lines
3.7 KiB
Plaintext

// Module included in the following assemblies:
//
// microshift_configuring/microshift_low_latency/microshift-low-latency.adoc
:_mod-docs-content-type: PROCEDURE
[id="microshift-low-latency-tuned-profile_{context}"]
= Configuring the {microshift-short} TuneD profile
Configure a TuneD profile for your host to use low latency with {microshift-short} workloads by using the `microshift-baseline-variables.conf` configuration file provided in the {op-system-base-full} `/etc/tuned/` host directory after you install the `microshift-low-latency` RPM package.
.Prerequisites
* You have root access to the node.
* You installed the `microshift-low-latency` RPM package.
* Your {op-system-base} host has TuneD installed. See link:https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html/monitoring_and_managing_system_status_and_performance/getting-started-with-tuned_monitoring-and-managing-system-status-and-performance#the-location-of-tuned-profiles_getting-started-with-tuned[Getting started with TuneD] (RHEL documentation).
.Procedure
. You can use the default `microshift-baseline-variables.conf` TuneD profile in the `/etc/tuned/` directory profile, or create your own to add more tunings.
+
.Example `microshift-baseline-variables.conf` TuneD profile
[source,text]
----
# Isolate cores 2-7 for running application workloads
isolated_cores=2-7 # <1>
# Size of the hugepages
hugepages_size=2M # <2>
# Number of hugepages
hugepages=0
# Additional kernel arguments
additional_args= # <3>
# CPU set to be offlined
offline_cpu_set= # <4>
----
+
--
<1> Controls which cores should be isolated. By default, 1 core per socket is reserved in {microshift-short} for housekeeping. The other cores are isolated. Valid values are a core list or range. You can isolate any range, for example: `isolated_cores=2,4-7` or `isolated_cores=2-23`.
+
[IMPORTANT]
====
You must keep only one `isolated_cores=` variable.
====
+
[NOTE]
====
The Kubernetes CPU manager can use any CPU to run the workload except the reserved CPUs defined in the kubelet configuration. For this reason it is best that:
* The sum of the kubelet's reserved CPUs and isolated cores include all online CPUs.
* Isolated cores are complementary to the reserved CPUs defined in the kubelet configuration.
====
+
<2> Size of the hugepages. Valid values are 2M or 1G.
<3> Additional kernel arguments, for example, `additional_args=console=tty0 console=ttyS0,115200`.
<4> The CPU set to be offlined.
+
[IMPORTANT]
====
Must not overlap with `isolated_cores`.
====
--
. Enable the profile or make changes active, by running the following command:
+
[source,terminal]
----
$ sudo tuned-adm profile microshift-baseline
----
. Reboot the host to make kernel arguments active.
.Verification
* Optional: You can read the `/proc/cmdline` file that contains the arguments given to the currently running kernel on start.
+
[source,terminal]
----
$ cat /proc/cmdline
----
+
.Example output
[source,text]
----
BOOT_IMAGE=(hd0,msdos2)/ostree/rhel-7f82ccd9595c3c70af16525470e32c6a81c9138c4eae6c79ab86d5a2d108d7fc/vmlinuz-5.14.0-427.31.1.el9_4.x86_64+rt crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M rd.lvm.lv=rhel/root fips=0 console=ttyS0,115200n8 root=/dev/mapper/rhel-root rw ostree=/ostree/boot.1/rhel/7f82ccd9595c3c70af16525470e32c6a81c9138c4eae6c79ab86d5a2d108d7fc/0 skew_tick=1 tsc=reliable rcupdate.rcu_normal_after_boot=1 nohz=on nohz_full=2,4-5 rcu_nocbs=2,4-5 tuned.non_isolcpus=0000000b intel_pstate=disable nosoftlockup hugepagesz=2M hugepages=10
----
.Next steps
. Prepare your {microshift-short} workloads for low latency.
. Optional: Configure automatic enablement of your TuneD profile.
. Optional: If you are using the x86_64 architecture, you can install {op-system-rt-kernel}.