From f680f7f6a2b1175b2bd58b3f1cc1e29355d8642b Mon Sep 17 00:00:00 2001 From: Hediberto C Silva Date: Thu, 31 Oct 2024 20:56:29 -0300 Subject: [PATCH] Tuning Disk Performance This commit is a part of the solution to mitigate a known issue that the Advanced Power Management (APM) disk settings impacted read performance. These settings are dynamically set based on the enabled StarlingX tuned service profiles. On some specific hardware configurations (for example, PowerEdge XR11 with an integrated storage controller), degraded read performance was observed where the Tuned Disk Monitor didn't detect high usage, maintaining a limited and low APM level (default 20). For write operations, a delay of about 60 seconds was noticed to achive the highest disk performance. Each unlocking will ensure the APM is disabled, but it can still be set manually at runtime using: "sudo hdparm -B /dev/sda". New parameters: - dynamic=0, to disable the Tuned Disk Monitor. - apm=255, to disable APM. - devices_udev_regex, to select devices to disable APM. Updated parameters: - alpm=max_performance. Test Plan: PASS: All packages built successfully PASS: Fresh Install SX/DX/STD in virtual environments PASS: After unlocking, verify that APM and Tuned Disk Monitor are disabled PASS: After unlocking, verify that /etc/tuned/starlingx/tuned.conf is populated with the selected devices PASS: All previous tests using XR11 lab PASS: After the initial unlock, the virtual host is locked, powered off, a disk is added, powered on, and after a new unlock, the new disk is added to devices_udev_regex. Closes-Bug:2086509 Change-Id: I8a07e404ab31727245d4cd6db3c789fff7437726 Signed-off-by: Hediberto C Silva --- tuned-config/files/tuned.conf | 14 ++++++++++++-- tuned-config/source-debian/tuned.conf | 14 ++++++++++++-- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/tuned-config/files/tuned.conf b/tuned-config/files/tuned.conf index 4861f8e..9dfa42b 100644 --- a/tuned-config/files/tuned.conf +++ b/tuned-config/files/tuned.conf @@ -23,7 +23,17 @@ radeon_powersave=auto [disk] # Comma separated list of devices, all devices if commented out. -# devices=sda +# Eg.: sda,sdb +# devices= + +# List of devices using udev regex. All devices if commented out. +# Eg.: (ID_PATH=pci-0000:00:17.0-ata-1.0)|(ID_PATH=pci-0000:00:17.0-ata-2.0) +#devices_udev_regex= + +# Disable Disk Monitor +dynamic=0 +# Disable APM +apm=255 [scsi_host] -alpm=medium_power +alpm=max_performance diff --git a/tuned-config/source-debian/tuned.conf b/tuned-config/source-debian/tuned.conf index 4861f8e..9dfa42b 100644 --- a/tuned-config/source-debian/tuned.conf +++ b/tuned-config/source-debian/tuned.conf @@ -23,7 +23,17 @@ radeon_powersave=auto [disk] # Comma separated list of devices, all devices if commented out. -# devices=sda +# Eg.: sda,sdb +# devices= + +# List of devices using udev regex. All devices if commented out. +# Eg.: (ID_PATH=pci-0000:00:17.0-ata-1.0)|(ID_PATH=pci-0000:00:17.0-ata-2.0) +#devices_udev_regex= + +# Disable Disk Monitor +dynamic=0 +# Disable APM +apm=255 [scsi_host] -alpm=medium_power +alpm=max_performance