From dcad0b963f506d27047ef5bd43e646cc5dae0baa Mon Sep 17 00:00:00 2001 From: Ram Lavi Date: Sun, 31 Dec 2023 14:44:01 +0200 Subject: [PATCH 1/3] checkup: Change CPUs count to four Currently the vmi-under-test is using 3 CPUs, in order to be able to run the checkup and avoid getting the CNV-31584 [0] Jira Bug. However, this configuration is sub-optimal, as the CPUs currently running the Oslat are sibling to the non-isolated CPU 0. Now that the CNV-31584 Bug is resolved, optimizing the checkup's performance by requesting for a full core to run the Oslat test. Setting the CPUs requested to four. [0] https://issues.redhat.com/browse/CNV-31584 Signed-off-by: Ram Lavi --- pkg/internal/checkup/checkup.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/internal/checkup/checkup.go b/pkg/internal/checkup/checkup.go index ffb8ff34..a4f5f2de 100644 --- a/pkg/internal/checkup/checkup.go +++ b/pkg/internal/checkup/checkup.go @@ -198,7 +198,7 @@ func (c *Checkup) waitForVMIDeletion(ctx context.Context) error { func newRealtimeVMI(checkupConfig config.Config) *kvcorev1.VirtualMachineInstance { const ( CPUSocketsCount = 1 - CPUCoresCount = 3 + CPUCoresCount = 4 CPUTreadsCount = 1 hugePageSize = "1Gi" guestMemory = "4Gi" From 172c71e193d8846b0962e35b1b9e64de4da4c7d9 Mon Sep 17 00:00:00 2001 From: Ram Lavi Date: Sun, 31 Dec 2023 14:44:50 +0200 Subject: [PATCH 2/3] vms/vm-under-test: Update isolated cores list Signed-off-by: Ram Lavi --- vms/vm-under-test/scripts/first-boot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vms/vm-under-test/scripts/first-boot b/vms/vm-under-test/scripts/first-boot index 676c3880..5facd899 100755 --- a/vms/vm-under-test/scripts/first-boot +++ b/vms/vm-under-test/scripts/first-boot @@ -21,7 +21,7 @@ set -e systemctl mask "$(systemctl --type swap | grep '.swap' | awk '{print $1}')" -echo isolated_cores=1-2 >> /etc/tuned/realtime-virtual-guest-variables.conf +echo isolated_cores=2-3 >> /etc/tuned/realtime-virtual-guest-variables.conf echo isolate_managed_irq=Y >> /etc/tuned/realtime-virtual-guest-variables.conf tuned-adm profile realtime-virtual-guest From d6413209f6d10df262e80142037f11af3552f19b Mon Sep 17 00:00:00 2001 From: Ram Lavi Date: Sun, 31 Dec 2023 14:46:07 +0200 Subject: [PATCH 3/3] oslat/client: Update the CPUs list Setting the CPUs that will run the Oslat test to be from the same core (=siblings). Signed-off-by: Ram Lavi --- pkg/internal/checkup/executor/oslat/client.go | 2 +- pkg/internal/checkup/executor/oslat/client_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/internal/checkup/executor/oslat/client.go b/pkg/internal/checkup/executor/oslat/client.go index e5fecd81..8f76f73f 100644 --- a/pkg/internal/checkup/executor/oslat/client.go +++ b/pkg/internal/checkup/executor/oslat/client.go @@ -198,7 +198,7 @@ func getMaxLatencyValue(values []string, units string) (time.Duration, error) { func buildOslatCmd(testDuration time.Duration) string { const ( - cpuList = "1-2" + cpuList = "2-3" realtimePriority = "1" workload = "memmove" workloadMemory = "4K" diff --git a/pkg/internal/checkup/executor/oslat/client_test.go b/pkg/internal/checkup/executor/oslat/client_test.go index 8f493269..90660592 100644 --- a/pkg/internal/checkup/executor/oslat/client_test.go +++ b/pkg/internal/checkup/executor/oslat/client_test.go @@ -137,7 +137,7 @@ func (c fakeClock) Now() time.Time { } const ( - oslatRunCmd = "taskset -c 1-2 oslat --cpu-list 1-2 --rtprio 1 --duration 1m0s --workload memmove --workload-mem 4K \n" + oslatRunCmd = "taskset -c 2-3 oslat --cpu-list 2-3 --rtprio 1 --duration 1m0s --workload memmove --workload-mem 4K \n" oslatRunResultsTemplate = "oslat V 2.60\n" + "Total runtime: \t\t60 seconds\n" + "Thread priority: \tSCHED_FIFO:1\n" +