From baefc3b4643d9e61361cacf46dfbeb95ce96933b Mon Sep 17 00:00:00 2001 From: Tom Weininger Date: Fri, 19 Aug 2022 11:00:31 +0200 Subject: [PATCH] Set nohz_full in cpu-pinning element nohz_full (or full dynticks) is a Linux kernel setting that should reduce kernel noise on configured CPUs to a minimum. This change activates this setting on all vCPUs except the first one. Change-Id: Ie009aff52d572873da0bb5cc43fedd7f3325dccc --- .../environment.d/80-kernel-cpu-affinity | 1 + ...hz-full-to-improve-latency-9d5acd7333f7e462.yaml | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 releasenotes/notes/use-nohz-full-to-improve-latency-9d5acd7333f7e462.yaml diff --git a/elements/cpu-pinning/environment.d/80-kernel-cpu-affinity b/elements/cpu-pinning/environment.d/80-kernel-cpu-affinity index 198aef0bca..76bcf2f55e 100644 --- a/elements/cpu-pinning/environment.d/80-kernel-cpu-affinity +++ b/elements/cpu-pinning/environment.d/80-kernel-cpu-affinity @@ -27,6 +27,7 @@ case $DISTRO_NAME in DIB_BOOTLOADER_DEFAULT_CMDLINE+=" irqaffinity=0" # This will be ignored on single vCPU systems DIB_BOOTLOADER_DEFAULT_CMDLINE+=" isolcpus=1-N" + DIB_BOOTLOADER_DEFAULT_CMDLINE+=" nohz=on nohz_full=1-N" export DIB_BOOTLOADER_DEFAULT_CMDLINE ;; *) diff --git a/releasenotes/notes/use-nohz-full-to-improve-latency-9d5acd7333f7e462.yaml b/releasenotes/notes/use-nohz-full-to-improve-latency-9d5acd7333f7e462.yaml new file mode 100644 index 0000000000..b3dfa23c5a --- /dev/null +++ b/releasenotes/notes/use-nohz-full-to-improve-latency-9d5acd7333f7e462.yaml @@ -0,0 +1,13 @@ +--- +features: + - | + The cpu-pinning element for the amphora image sets the kernel bootarg + nohz_full=1-N to enable + full dynticks on all CPUs except the first one (on single CPU images this + will have no effect). This should reduce kernel noise on those CPUs to a + minimum and reduce latency. +upgrade: + - | + In order for the full dynticks optimization to become effective a new + amphora image needs to be built with the new optional CPU pinning + feature enabled.