From df9b4ce5853050188bdab2b5d272872f976e6fad Mon Sep 17 00:00:00 2001 From: saibulusu Date: Tue, 1 Sep 2026 14:00:52 -0700 Subject: [PATCH 1/2] speccpu profile rollback --- .../FIO/FioExecutorTests.cs | 66 ++++++ .../profiles/PERF-SPECCPU-FPRATE.json | 191 +----------------- .../profiles/PERF-SPECCPU-FPSPEED.json | 146 +------------ .../profiles/PERF-SPECCPU-INTRATE.json | 145 +------------ .../profiles/PERF-SPECCPU-INTSPEED.json | 149 +------------- .../workloads/speccpu/speccpu-profiles.md | 24 ++- 6 files changed, 92 insertions(+), 629 deletions(-) diff --git a/src/VirtualClient/VirtualClient.Actions.UnitTests/FIO/FioExecutorTests.cs b/src/VirtualClient/VirtualClient.Actions.UnitTests/FIO/FioExecutorTests.cs index 75de4bf259..1595ed4896 100644 --- a/src/VirtualClient/VirtualClient.Actions.UnitTests/FIO/FioExecutorTests.cs +++ b/src/VirtualClient/VirtualClient.Actions.UnitTests/FIO/FioExecutorTests.cs @@ -136,6 +136,72 @@ public void FioExecutorIdentifiesTheExpectedDisksWhenTheyAreExplicitlyDefined_Li } } + [Test] + public void FioExecutorIdentifiesTheExpectedDisksAndGeneratesCorrectCommands_NvmeDisksScenario() + { + // Setup NVMe disks with volumes - using CreateDisks approach similar to the existing test setup + List nvmeDisks = new List + { + // OS disk with volume + this.CreateDisk(0, PlatformID.Unix, os: true, "/dev/nvme0n0", "/dev/nvme0n0p1"), + // Data disks with volumes - these are the ones we want to test + this.CreateDisk(1, PlatformID.Unix, os: false, "/dev/nvme0n1", "/dev/nvme0n1p1"), + this.CreateDisk(2, PlatformID.Unix, os: false, "/dev/nvme2n1", "/dev/nvme2n1p1"), + this.CreateDisk(3, PlatformID.Unix, os: false, "/dev/nvme3n1", "/dev/nvme3n1p1"), + // Additional disk that should not be selected + this.CreateDisk(4, PlatformID.Unix, os: false, "/dev/nvme1n1", "/dev/nvme1n1p1") + }; + + this.disks = nvmeDisks; + this.DiskManager.Setup(mgr => mgr.GetDisksAsync(It.IsAny())).ReturnsAsync(() => this.disks); + + // Set DiskFilter to specific NVMe paths + this.profileParameters["DiskFilter"] = "DiskPath:/dev/nvme0n1,/dev/nvme2n1,/dev/nvme3n1"; + + using (TestFioExecutor fioExecutor = new TestFioExecutor(this.Dependencies, this.profileParameters)) + { + // Test 1: Verify disk selection + IEnumerable disksToTest = fioExecutor.GetDisksToTest(this.disks); + + Assert.IsNotNull(disksToTest); + Assert.AreEqual(3, disksToTest.Count(), "Expected exactly 3 disks to be selected"); + Assert.IsTrue(disksToTest.Any(d => d.DevicePath == "/dev/nvme0n1"), "Expected /dev/nvme0n1 to be selected"); + Assert.IsTrue(disksToTest.Any(d => d.DevicePath == "/dev/nvme2n1"), "Expected /dev/nvme2n1 to be selected"); + Assert.IsTrue(disksToTest.Any(d => d.DevicePath == "/dev/nvme3n1"), "Expected /dev/nvme3n1 to be selected"); + Assert.IsFalse(disksToTest.Any(d => d.DevicePath == "/dev/nvme1n1"), "/dev/nvme1n1 should not be selected"); + Assert.IsFalse(disksToTest.Any(d => d.IsOperatingSystem()), "OS disk should not be selected"); + + // Test 2: Verify command generation for SingleProcess model + string expectedCommand = "/home/any/fio"; + string expectedArguments = "--name=fio_randwrite_test --size=128G --numjobs=16 --rw=randwrite --bs=4k --iodepth=32 --ioengine=libaio --direct=1 --ramp_time=30 --runtime=120 --time_based --overwrite=1 --thread --group_reporting --output-format=json"; + string processModel = WorkloadProcessModel.SingleProcess; + + IEnumerable workloadProcesses = fioExecutor.CreateWorkloadProcesses(expectedCommand, expectedArguments, disksToTest, processModel, EventContext.None); + + Assert.IsTrue(workloadProcesses.Count() == 1, "SingleProcess model should create exactly 1 process"); + DiskWorkloadProcess workloadProcess = workloadProcesses.First(); + + // The actual command line generated - get it for verification + string actualCommandLine = workloadProcess.Process.FullCommand(); + + // Verify the command includes all three NVMe disks + Assert.IsTrue(actualCommandLine.Contains("nvme0n1"), "Command should reference nvme0n1"); + Assert.IsTrue(actualCommandLine.Contains("nvme2n1"), "Command should reference nvme2n1"); + Assert.IsTrue(actualCommandLine.Contains("nvme3n1"), "Command should reference nvme3n1"); + Assert.IsFalse(actualCommandLine.Contains("nvme1n1"), "Command should NOT reference nvme1n1 (not in filter)"); + Assert.IsFalse(actualCommandLine.Contains("nvme0n0"), "Command should NOT reference nvme0n0 (OS disk)"); + + // Verify the expected command structure + Assert.IsTrue(actualCommandLine.StartsWith("sudo /home/any/fio"), "Command should start with sudo /home/any/fio"); + Assert.IsTrue(actualCommandLine.Contains("--name=fio_randwrite_test"), "Command should contain the test name"); + Assert.IsTrue(actualCommandLine.Contains("--ioengine=libaio"), "Command should contain the IO engine"); + + // Count the number of --filename parameters (should be 3, one for each disk) + int filenameCount = Regex.Matches(actualCommandLine, @"--filename=").Count; + Assert.AreEqual(3, filenameCount, "Command should have exactly 3 --filename parameters for the 3 selected NVMe disks"); + } + } + [Test] public void FioExecutorAppliesConfigurationParametersCorrectly() { diff --git a/src/VirtualClient/VirtualClient.Main/profiles/PERF-SPECCPU-FPRATE.json b/src/VirtualClient/VirtualClient.Main/profiles/PERF-SPECCPU-FPRATE.json index 25258193be..57f893fbf9 100644 --- a/src/VirtualClient/VirtualClient.Main/profiles/PERF-SPECCPU-FPRATE.json +++ b/src/VirtualClient/VirtualClient.Main/profiles/PERF-SPECCPU-FPRATE.json @@ -16,6 +16,7 @@ "Parameters": { "CompilerVersion": "", "Iterations": 2, + "Benchmarks": "{calculate(\"{Platform}\".StartsWith(\"linux\") ? \"fprate\" : \"503 508 510 519 544 549 554\")}", "RunPeak": false, "Threads": "{LogicalCoreCount}", "Copies": "{LogicalCoreCount}", @@ -26,196 +27,10 @@ { "Type": "SpecCpuExecutor", "Parameters": { - "Scenario": "benchmark_503.bwaves_r", + "Scenario": "ExecuteSPECBenchmark", "Iterations": "$.Parameters.Iterations", "SpecProfile": "fprate", - "Benchmarks": "503", - "PackageName": "speccpu2017", - "RunPeak": "$.Parameters.RunPeak", - "Threads": "$.Parameters.Threads", - "Copies": "$.Parameters.Copies", - "BaseOptimizingFlags": "$.Parameters.BaseOptimizingFlags", - "PeakOptimizingFlags": "$.Parameters.PeakOptimizingFlags" - } - }, - { - "Type": "SpecCpuExecutor", - "Parameters": { - "Scenario": "benchmark_507.cactuBSSN_r", - "Iterations": "$.Parameters.Iterations", - "SpecProfile": "fprate", - "Benchmarks": "507", - "PackageName": "speccpu2017", - "RunPeak": "$.Parameters.RunPeak", - "Threads": "$.Parameters.Threads", - "Copies": "$.Parameters.Copies", - "BaseOptimizingFlags": "$.Parameters.BaseOptimizingFlags", - "PeakOptimizingFlags": "$.Parameters.PeakOptimizingFlags", - "SupportedPlatforms": "linux-x64,linux-arm64" - } - }, - { - "Type": "SpecCpuExecutor", - "Parameters": { - "Scenario": "benchmark_508.namd_r", - "Iterations": "$.Parameters.Iterations", - "SpecProfile": "fprate", - "Benchmarks": "508", - "PackageName": "speccpu2017", - "RunPeak": "$.Parameters.RunPeak", - "Threads": "$.Parameters.Threads", - "Copies": "$.Parameters.Copies", - "BaseOptimizingFlags": "$.Parameters.BaseOptimizingFlags", - "PeakOptimizingFlags": "$.Parameters.PeakOptimizingFlags" - } - }, - { - "Type": "SpecCpuExecutor", - "Parameters": { - "Scenario": "benchmark_510.parest_r", - "Iterations": "$.Parameters.Iterations", - "SpecProfile": "fprate", - "Benchmarks": "510", - "PackageName": "speccpu2017", - "RunPeak": "$.Parameters.RunPeak", - "Threads": "$.Parameters.Threads", - "Copies": "$.Parameters.Copies", - "BaseOptimizingFlags": "$.Parameters.BaseOptimizingFlags", - "PeakOptimizingFlags": "$.Parameters.PeakOptimizingFlags" - } - }, - { - "Type": "SpecCpuExecutor", - "Parameters": { - "Scenario": "benchmark_511.povray_r", - "Iterations": "$.Parameters.Iterations", - "SpecProfile": "fprate", - "Benchmarks": "511", - "PackageName": "speccpu2017", - "RunPeak": "$.Parameters.RunPeak", - "Threads": "$.Parameters.Threads", - "Copies": "$.Parameters.Copies", - "BaseOptimizingFlags": "$.Parameters.BaseOptimizingFlags", - "PeakOptimizingFlags": "$.Parameters.PeakOptimizingFlags", - "SupportedPlatforms": "linux-x64,linux-arm64" - } - }, - { - "Type": "SpecCpuExecutor", - "Parameters": { - "Scenario": "benchmark_519.lbm_r", - "Iterations": "$.Parameters.Iterations", - "SpecProfile": "fprate", - "Benchmarks": "519", - "PackageName": "speccpu2017", - "RunPeak": "$.Parameters.RunPeak", - "Threads": "$.Parameters.Threads", - "Copies": "$.Parameters.Copies", - "BaseOptimizingFlags": "$.Parameters.BaseOptimizingFlags", - "PeakOptimizingFlags": "$.Parameters.PeakOptimizingFlags" - } - }, - { - "Type": "SpecCpuExecutor", - "Parameters": { - "Scenario": "benchmark_521.wrf_r", - "Iterations": "$.Parameters.Iterations", - "SpecProfile": "fprate", - "Benchmarks": "521", - "PackageName": "speccpu2017", - "RunPeak": "$.Parameters.RunPeak", - "Threads": "$.Parameters.Threads", - "Copies": "$.Parameters.Copies", - "BaseOptimizingFlags": "$.Parameters.BaseOptimizingFlags", - "PeakOptimizingFlags": "$.Parameters.PeakOptimizingFlags", - "SupportedPlatforms": "linux-x64,linux-arm64" - } - }, - { - "Type": "SpecCpuExecutor", - "Parameters": { - "Scenario": "benchmark_526.blender_r", - "Iterations": "$.Parameters.Iterations", - "SpecProfile": "fprate", - "Benchmarks": "526", - "PackageName": "speccpu2017", - "RunPeak": "$.Parameters.RunPeak", - "Threads": "$.Parameters.Threads", - "Copies": "$.Parameters.Copies", - "BaseOptimizingFlags": "$.Parameters.BaseOptimizingFlags", - "PeakOptimizingFlags": "$.Parameters.PeakOptimizingFlags", - "SupportedPlatforms": "linux-x64,linux-arm64" - } - }, - { - "Type": "SpecCpuExecutor", - "Parameters": { - "Scenario": "benchmark_527.cam4_r", - "Iterations": "$.Parameters.Iterations", - "SpecProfile": "fprate", - "Benchmarks": "527", - "PackageName": "speccpu2017", - "RunPeak": "$.Parameters.RunPeak", - "Threads": "$.Parameters.Threads", - "Copies": "$.Parameters.Copies", - "BaseOptimizingFlags": "$.Parameters.BaseOptimizingFlags", - "PeakOptimizingFlags": "$.Parameters.PeakOptimizingFlags", - "SupportedPlatforms": "linux-x64,linux-arm64" - } - }, - { - "Type": "SpecCpuExecutor", - "Parameters": { - "Scenario": "benchmark_538.imagick_r", - "Iterations": "$.Parameters.Iterations", - "SpecProfile": "fprate", - "Benchmarks": "538", - "PackageName": "speccpu2017", - "RunPeak": "$.Parameters.RunPeak", - "Threads": "$.Parameters.Threads", - "Copies": "$.Parameters.Copies", - "BaseOptimizingFlags": "$.Parameters.BaseOptimizingFlags", - "PeakOptimizingFlags": "$.Parameters.PeakOptimizingFlags", - "SupportedPlatforms": "linux-x64,linux-arm64" - } - }, - { - "Type": "SpecCpuExecutor", - "Parameters": { - "Scenario": "benchmark_544.nab_r", - "Iterations": "$.Parameters.Iterations", - "SpecProfile": "fprate", - "Benchmarks": "544", - "PackageName": "speccpu2017", - "RunPeak": "$.Parameters.RunPeak", - "Threads": "$.Parameters.Threads", - "Copies": "$.Parameters.Copies", - "BaseOptimizingFlags": "$.Parameters.BaseOptimizingFlags", - "PeakOptimizingFlags": "$.Parameters.PeakOptimizingFlags" - } - }, - { - "Type": "SpecCpuExecutor", - "Parameters": { - "Scenario": "benchmark_549.fotonik3d_r", - "Iterations": "$.Parameters.Iterations", - "SpecProfile": "fprate", - "Benchmarks": "549", - "PackageName": "speccpu2017", - "RunPeak": "$.Parameters.RunPeak", - "Threads": "$.Parameters.Threads", - "Copies": "$.Parameters.Copies", - "BaseOptimizingFlags": "$.Parameters.BaseOptimizingFlags", - "PeakOptimizingFlags": "$.Parameters.PeakOptimizingFlags" - } - }, - { - "Type": "SpecCpuExecutor", - "Parameters": { - "Scenario": "benchmark_554.roms_r", - "Iterations": "$.Parameters.Iterations", - "SpecProfile": "fprate", - "Benchmarks": "554", + "Benchmarks": "$.Parameters.Benchmarks", "PackageName": "speccpu2017", "RunPeak": "$.Parameters.RunPeak", "Threads": "$.Parameters.Threads", diff --git a/src/VirtualClient/VirtualClient.Main/profiles/PERF-SPECCPU-FPSPEED.json b/src/VirtualClient/VirtualClient.Main/profiles/PERF-SPECCPU-FPSPEED.json index 0e588574f4..5b25955abb 100644 --- a/src/VirtualClient/VirtualClient.Main/profiles/PERF-SPECCPU-FPSPEED.json +++ b/src/VirtualClient/VirtualClient.Main/profiles/PERF-SPECCPU-FPSPEED.json @@ -16,6 +16,7 @@ "Parameters": { "CompilerVersion": "", "Iterations": 2, + "Benchmarks": "{calculate(\"{Platform}\".StartsWith(\"linux\") ? \"fpspeed\" : \"603 619 644 654\")}", "RunPeak": false, "Threads": "{LogicalCoreCount}", "Copies": "{LogicalCoreCount}", @@ -26,151 +27,10 @@ { "Type": "SpecCpuExecutor", "Parameters": { - "Scenario": "benchmark_603.bwaves_s", + "Scenario": "ExecuteSPECBenchmark", "Iterations": "$.Parameters.Iterations", "SpecProfile": "fpspeed", - "Benchmarks": "603", - "PackageName": "speccpu2017", - "RunPeak": "$.Parameters.RunPeak", - "Threads": "$.Parameters.Threads", - "Copies": "$.Parameters.Copies", - "BaseOptimizingFlags": "$.Parameters.BaseOptimizingFlags", - "PeakOptimizingFlags": "$.Parameters.PeakOptimizingFlags" - } - }, - { - "Type": "SpecCpuExecutor", - "Parameters": { - "Scenario": "benchmark_607.cactuBSSN_s", - "Iterations": "$.Parameters.Iterations", - "SpecProfile": "fpspeed", - "Benchmarks": "607", - "PackageName": "speccpu2017", - "RunPeak": "$.Parameters.RunPeak", - "Threads": "$.Parameters.Threads", - "Copies": "$.Parameters.Copies", - "BaseOptimizingFlags": "$.Parameters.BaseOptimizingFlags", - "PeakOptimizingFlags": "$.Parameters.PeakOptimizingFlags", - "SupportedPlatforms": "linux-x64,linux-arm64" - } - }, - { - "Type": "SpecCpuExecutor", - "Parameters": { - "Scenario": "benchmark_619.lbm_s", - "Iterations": "$.Parameters.Iterations", - "SpecProfile": "fpspeed", - "Benchmarks": "619", - "PackageName": "speccpu2017", - "RunPeak": "$.Parameters.RunPeak", - "Threads": "$.Parameters.Threads", - "Copies": "$.Parameters.Copies", - "BaseOptimizingFlags": "$.Parameters.BaseOptimizingFlags", - "PeakOptimizingFlags": "$.Parameters.PeakOptimizingFlags" - } - }, - { - "Type": "SpecCpuExecutor", - "Parameters": { - "Scenario": "benchmark_621.wrf_s", - "Iterations": "$.Parameters.Iterations", - "SpecProfile": "fpspeed", - "Benchmarks": "621", - "PackageName": "speccpu2017", - "RunPeak": "$.Parameters.RunPeak", - "Threads": "$.Parameters.Threads", - "Copies": "$.Parameters.Copies", - "BaseOptimizingFlags": "$.Parameters.BaseOptimizingFlags", - "PeakOptimizingFlags": "$.Parameters.PeakOptimizingFlags", - "SupportedPlatforms": "linux-x64,linux-arm64" - } - }, - { - "Type": "SpecCpuExecutor", - "Parameters": { - "Scenario": "benchmark_627.cam4_s", - "Iterations": "$.Parameters.Iterations", - "SpecProfile": "fpspeed", - "Benchmarks": "627", - "PackageName": "speccpu2017", - "RunPeak": "$.Parameters.RunPeak", - "Threads": "$.Parameters.Threads", - "Copies": "$.Parameters.Copies", - "BaseOptimizingFlags": "$.Parameters.BaseOptimizingFlags", - "PeakOptimizingFlags": "$.Parameters.PeakOptimizingFlags", - "SupportedPlatforms": "linux-x64,linux-arm64" - } - }, - { - "Type": "SpecCpuExecutor", - "Parameters": { - "Scenario": "benchmark_628.pop2_s", - "Iterations": "$.Parameters.Iterations", - "SpecProfile": "fpspeed", - "Benchmarks": "628", - "PackageName": "speccpu2017", - "RunPeak": "$.Parameters.RunPeak", - "Threads": "$.Parameters.Threads", - "Copies": "$.Parameters.Copies", - "BaseOptimizingFlags": "$.Parameters.BaseOptimizingFlags", - "PeakOptimizingFlags": "$.Parameters.PeakOptimizingFlags", - "SupportedPlatforms": "linux-x64,linux-arm64" - } - }, - { - "Type": "SpecCpuExecutor", - "Parameters": { - "Scenario": "benchmark_638.imagick_s", - "Iterations": "$.Parameters.Iterations", - "SpecProfile": "fpspeed", - "Benchmarks": "638", - "PackageName": "speccpu2017", - "RunPeak": "$.Parameters.RunPeak", - "Threads": "$.Parameters.Threads", - "Copies": "$.Parameters.Copies", - "BaseOptimizingFlags": "$.Parameters.BaseOptimizingFlags", - "PeakOptimizingFlags": "$.Parameters.PeakOptimizingFlags", - "SupportedPlatforms": "linux-x64,linux-arm64" - } - }, - { - "Type": "SpecCpuExecutor", - "Parameters": { - "Scenario": "benchmark_644.nab_s", - "Iterations": "$.Parameters.Iterations", - "SpecProfile": "fpspeed", - "Benchmarks": "644", - "PackageName": "speccpu2017", - "RunPeak": "$.Parameters.RunPeak", - "Threads": "$.Parameters.Threads", - "Copies": "$.Parameters.Copies", - "BaseOptimizingFlags": "$.Parameters.BaseOptimizingFlags", - "PeakOptimizingFlags": "$.Parameters.PeakOptimizingFlags" - } - }, - { - "Type": "SpecCpuExecutor", - "Parameters": { - "Scenario": "benchmark_649.fotonik3d_s", - "Iterations": "$.Parameters.Iterations", - "SpecProfile": "fpspeed", - "Benchmarks": "649", - "PackageName": "speccpu2017", - "RunPeak": "$.Parameters.RunPeak", - "Threads": "$.Parameters.Threads", - "Copies": "$.Parameters.Copies", - "BaseOptimizingFlags": "$.Parameters.BaseOptimizingFlags", - "PeakOptimizingFlags": "$.Parameters.PeakOptimizingFlags", - "SupportedPlatforms": "linux-x64,linux-arm64" - } - }, - { - "Type": "SpecCpuExecutor", - "Parameters": { - "Scenario": "benchmark_654.roms_s", - "Iterations": "$.Parameters.Iterations", - "SpecProfile": "fpspeed", - "Benchmarks": "654", + "Benchmarks": "$.Parameters.Benchmarks", "PackageName": "speccpu2017", "RunPeak": "$.Parameters.RunPeak", "Threads": "$.Parameters.Threads", diff --git a/src/VirtualClient/VirtualClient.Main/profiles/PERF-SPECCPU-INTRATE.json b/src/VirtualClient/VirtualClient.Main/profiles/PERF-SPECCPU-INTRATE.json index cd47ac87f0..9a9a80c34e 100644 --- a/src/VirtualClient/VirtualClient.Main/profiles/PERF-SPECCPU-INTRATE.json +++ b/src/VirtualClient/VirtualClient.Main/profiles/PERF-SPECCPU-INTRATE.json @@ -16,6 +16,7 @@ "Parameters": { "CompilerVersion": "", "Iterations": 2, + "Benchmarks": "{calculate(\"{Platform}\".StartsWith(\"linux\") ? \"intrate\" : \"505 525 541 548 557\")}", "RunPeak": false, "Threads": "{LogicalCoreCount}", "Copies": "{LogicalCoreCount}", @@ -26,150 +27,10 @@ { "Type": "SpecCpuExecutor", "Parameters": { - "Scenario": "benchmark_500.perlbench_r", + "Scenario": "ExecuteSPECBenchmark", "Iterations": "$.Parameters.Iterations", "SpecProfile": "intrate", - "Benchmarks": "500", - "PackageName": "speccpu2017", - "RunPeak": "$.Parameters.RunPeak", - "Threads": "$.Parameters.Threads", - "Copies": "$.Parameters.Copies", - "BaseOptimizingFlags": "$.Parameters.BaseOptimizingFlags", - "PeakOptimizingFlags": "$.Parameters.PeakOptimizingFlags", - "SupportedPlatforms": "linux-x64,linux-arm64" - } - }, - { - "Type": "SpecCpuExecutor", - "Parameters": { - "Scenario": "benchmark_502.gcc_r", - "Iterations": "$.Parameters.Iterations", - "SpecProfile": "intrate", - "Benchmarks": "502", - "PackageName": "speccpu2017", - "RunPeak": "$.Parameters.RunPeak", - "Threads": "$.Parameters.Threads", - "Copies": "$.Parameters.Copies", - "BaseOptimizingFlags": "$.Parameters.BaseOptimizingFlags", - "PeakOptimizingFlags": "$.Parameters.PeakOptimizingFlags", - "SupportedPlatforms": "linux-x64,linux-arm64" - } - }, - { - "Type": "SpecCpuExecutor", - "Parameters": { - "Scenario": "benchmark_505.mcf_r", - "Iterations": "$.Parameters.Iterations", - "SpecProfile": "intrate", - "Benchmarks": "505", - "PackageName": "speccpu2017", - "RunPeak": "$.Parameters.RunPeak", - "Threads": "$.Parameters.Threads", - "Copies": "$.Parameters.Copies", - "BaseOptimizingFlags": "$.Parameters.BaseOptimizingFlags", - "PeakOptimizingFlags": "$.Parameters.PeakOptimizingFlags" - } - }, - { - "Type": "SpecCpuExecutor", - "Parameters": { - "Scenario": "benchmark_520.omnetpp_r", - "Iterations": "$.Parameters.Iterations", - "SpecProfile": "intrate", - "Benchmarks": "520", - "PackageName": "speccpu2017", - "RunPeak": "$.Parameters.RunPeak", - "Threads": "$.Parameters.Threads", - "Copies": "$.Parameters.Copies", - "BaseOptimizingFlags": "$.Parameters.BaseOptimizingFlags", - "PeakOptimizingFlags": "$.Parameters.PeakOptimizingFlags", - "SupportedPlatforms": "linux-x64,linux-arm64" - } - }, - { - "Type": "SpecCpuExecutor", - "Parameters": { - "Scenario": "benchmark_523.xalancbmk_r", - "Iterations": "$.Parameters.Iterations", - "SpecProfile": "intrate", - "Benchmarks": "523", - "PackageName": "speccpu2017", - "RunPeak": "$.Parameters.RunPeak", - "Threads": "$.Parameters.Threads", - "Copies": "$.Parameters.Copies", - "BaseOptimizingFlags": "$.Parameters.BaseOptimizingFlags", - "PeakOptimizingFlags": "$.Parameters.PeakOptimizingFlags", - "SupportedPlatforms": "linux-x64,linux-arm64" - } - }, - { - "Type": "SpecCpuExecutor", - "Parameters": { - "Scenario": "benchmark_525.x264_r", - "Iterations": "$.Parameters.Iterations", - "SpecProfile": "intrate", - "Benchmarks": "525", - "PackageName": "speccpu2017", - "RunPeak": "$.Parameters.RunPeak", - "Threads": "$.Parameters.Threads", - "Copies": "$.Parameters.Copies", - "BaseOptimizingFlags": "$.Parameters.BaseOptimizingFlags", - "PeakOptimizingFlags": "$.Parameters.PeakOptimizingFlags" - } - }, - { - "Type": "SpecCpuExecutor", - "Parameters": { - "Scenario": "benchmark_531.deepsjeng_r", - "Iterations": "$.Parameters.Iterations", - "SpecProfile": "intrate", - "Benchmarks": "531", - "PackageName": "speccpu2017", - "RunPeak": "$.Parameters.RunPeak", - "Threads": "$.Parameters.Threads", - "Copies": "$.Parameters.Copies", - "BaseOptimizingFlags": "$.Parameters.BaseOptimizingFlags", - "PeakOptimizingFlags": "$.Parameters.PeakOptimizingFlags", - "SupportedPlatforms": "linux-x64,linux-arm64" - } - }, - { - "Type": "SpecCpuExecutor", - "Parameters": { - "Scenario": "benchmark_541.leela_r", - "Iterations": "$.Parameters.Iterations", - "SpecProfile": "intrate", - "Benchmarks": "541", - "PackageName": "speccpu2017", - "RunPeak": "$.Parameters.RunPeak", - "Threads": "$.Parameters.Threads", - "Copies": "$.Parameters.Copies", - "BaseOptimizingFlags": "$.Parameters.BaseOptimizingFlags", - "PeakOptimizingFlags": "$.Parameters.PeakOptimizingFlags" - } - }, - { - "Type": "SpecCpuExecutor", - "Parameters": { - "Scenario": "benchmark_548.exchange2_r", - "Iterations": "$.Parameters.Iterations", - "SpecProfile": "intrate", - "Benchmarks": "548", - "PackageName": "speccpu2017", - "RunPeak": "$.Parameters.RunPeak", - "Threads": "$.Parameters.Threads", - "Copies": "$.Parameters.Copies", - "BaseOptimizingFlags": "$.Parameters.BaseOptimizingFlags", - "PeakOptimizingFlags": "$.Parameters.PeakOptimizingFlags" - } - }, - { - "Type": "SpecCpuExecutor", - "Parameters": { - "Scenario": "benchmark_557.xz_r", - "Iterations": "$.Parameters.Iterations", - "SpecProfile": "intrate", - "Benchmarks": "557", + "Benchmarks": "$.Parameters.Benchmarks", "PackageName": "speccpu2017", "RunPeak": "$.Parameters.RunPeak", "Threads": "$.Parameters.Threads", diff --git a/src/VirtualClient/VirtualClient.Main/profiles/PERF-SPECCPU-INTSPEED.json b/src/VirtualClient/VirtualClient.Main/profiles/PERF-SPECCPU-INTSPEED.json index bb93ce007f..7b5fde10b2 100644 --- a/src/VirtualClient/VirtualClient.Main/profiles/PERF-SPECCPU-INTSPEED.json +++ b/src/VirtualClient/VirtualClient.Main/profiles/PERF-SPECCPU-INTSPEED.json @@ -16,6 +16,7 @@ "Parameters": { "CompilerVersion": "", "Iterations": 2, + "Benchmarks": "{calculate(\"{Platform}\".StartsWith(\"linux\") ? \"intspeed\" : \"641\")}", "RunPeak": false, "Threads": "{LogicalCoreCount}", "Copies": "{LogicalCoreCount}", @@ -26,122 +27,10 @@ { "Type": "SpecCpuExecutor", "Parameters": { - "Scenario": "benchmark_600.perlbench_s", + "Scenario": "ExecuteSPECBenchmark", "Iterations": "$.Parameters.Iterations", "SpecProfile": "intspeed", - "Benchmarks": "600", - "PackageName": "speccpu2017", - "RunPeak": "$.Parameters.RunPeak", - "Threads": "$.Parameters.Threads", - "Copies": "$.Parameters.Copies", - "BaseOptimizingFlags": "$.Parameters.BaseOptimizingFlags", - "PeakOptimizingFlags": "$.Parameters.PeakOptimizingFlags", - "SupportedPlatforms": "linux-x64,linux-arm64" - } - }, - { - "Type": "SpecCpuExecutor", - "Parameters": { - "Scenario": "benchmark_602.gcc_s", - "Iterations": "$.Parameters.Iterations", - "SpecProfile": "intspeed", - "Benchmarks": "602", - "PackageName": "speccpu2017", - "RunPeak": "$.Parameters.RunPeak", - "Threads": "$.Parameters.Threads", - "Copies": "$.Parameters.Copies", - "BaseOptimizingFlags": "$.Parameters.BaseOptimizingFlags", - "PeakOptimizingFlags": "$.Parameters.PeakOptimizingFlags", - "SupportedPlatforms": "linux-x64,linux-arm64" - } - }, - { - "Type": "SpecCpuExecutor", - "Parameters": { - "Scenario": "benchmark_605.mcf_s", - "Iterations": "$.Parameters.Iterations", - "SpecProfile": "intspeed", - "Benchmarks": "605", - "PackageName": "speccpu2017", - "RunPeak": "$.Parameters.RunPeak", - "Threads": "$.Parameters.Threads", - "Copies": "$.Parameters.Copies", - "BaseOptimizingFlags": "$.Parameters.BaseOptimizingFlags", - "PeakOptimizingFlags": "$.Parameters.PeakOptimizingFlags", - "SupportedPlatforms": "linux-x64,linux-arm64" - } - }, - { - "Type": "SpecCpuExecutor", - "Parameters": { - "Scenario": "benchmark_620.omnetpp_s", - "Iterations": "$.Parameters.Iterations", - "SpecProfile": "intspeed", - "Benchmarks": "620", - "PackageName": "speccpu2017", - "RunPeak": "$.Parameters.RunPeak", - "Threads": "$.Parameters.Threads", - "Copies": "$.Parameters.Copies", - "BaseOptimizingFlags": "$.Parameters.BaseOptimizingFlags", - "PeakOptimizingFlags": "$.Parameters.PeakOptimizingFlags", - "SupportedPlatforms": "linux-x64,linux-arm64" - } - }, - { - "Type": "SpecCpuExecutor", - "Parameters": { - "Scenario": "benchmark_623.xalancbmk_s", - "Iterations": "$.Parameters.Iterations", - "SpecProfile": "intspeed", - "Benchmarks": "623", - "PackageName": "speccpu2017", - "RunPeak": "$.Parameters.RunPeak", - "Threads": "$.Parameters.Threads", - "Copies": "$.Parameters.Copies", - "BaseOptimizingFlags": "$.Parameters.BaseOptimizingFlags", - "PeakOptimizingFlags": "$.Parameters.PeakOptimizingFlags", - "SupportedPlatforms": "linux-x64,linux-arm64" - } - }, - { - "Type": "SpecCpuExecutor", - "Parameters": { - "Scenario": "benchmark_625.x264_s", - "Iterations": "$.Parameters.Iterations", - "SpecProfile": "intspeed", - "Benchmarks": "625", - "PackageName": "speccpu2017", - "RunPeak": "$.Parameters.RunPeak", - "Threads": "$.Parameters.Threads", - "Copies": "$.Parameters.Copies", - "BaseOptimizingFlags": "$.Parameters.BaseOptimizingFlags", - "PeakOptimizingFlags": "$.Parameters.PeakOptimizingFlags", - "SupportedPlatforms": "linux-x64,linux-arm64" - } - }, - { - "Type": "SpecCpuExecutor", - "Parameters": { - "Scenario": "benchmark_631.deepsjeng_s", - "Iterations": "$.Parameters.Iterations", - "SpecProfile": "intspeed", - "Benchmarks": "631", - "PackageName": "speccpu2017", - "RunPeak": "$.Parameters.RunPeak", - "Threads": "$.Parameters.Threads", - "Copies": "$.Parameters.Copies", - "BaseOptimizingFlags": "$.Parameters.BaseOptimizingFlags", - "PeakOptimizingFlags": "$.Parameters.PeakOptimizingFlags", - "SupportedPlatforms": "linux-x64,linux-arm64" - } - }, - { - "Type": "SpecCpuExecutor", - "Parameters": { - "Scenario": "benchmark_641.leela_s", - "Iterations": "$.Parameters.Iterations", - "SpecProfile": "intspeed", - "Benchmarks": "641", + "Benchmarks": "$.Parameters.Benchmarks", "PackageName": "speccpu2017", "RunPeak": "$.Parameters.RunPeak", "Threads": "$.Parameters.Threads", @@ -149,38 +38,6 @@ "BaseOptimizingFlags": "$.Parameters.BaseOptimizingFlags", "PeakOptimizingFlags": "$.Parameters.PeakOptimizingFlags" } - }, - { - "Type": "SpecCpuExecutor", - "Parameters": { - "Scenario": "benchmark_648.exchange2_s", - "Iterations": "$.Parameters.Iterations", - "SpecProfile": "intspeed", - "Benchmarks": "648", - "PackageName": "speccpu2017", - "RunPeak": "$.Parameters.RunPeak", - "Threads": "$.Parameters.Threads", - "Copies": "$.Parameters.Copies", - "BaseOptimizingFlags": "$.Parameters.BaseOptimizingFlags", - "PeakOptimizingFlags": "$.Parameters.PeakOptimizingFlags", - "SupportedPlatforms": "linux-x64,linux-arm64" - } - }, - { - "Type": "SpecCpuExecutor", - "Parameters": { - "Scenario": "benchmark_657.xz_s", - "Iterations": "$.Parameters.Iterations", - "SpecProfile": "intspeed", - "Benchmarks": "657", - "PackageName": "speccpu2017", - "RunPeak": "$.Parameters.RunPeak", - "Threads": "$.Parameters.Threads", - "Copies": "$.Parameters.Copies", - "BaseOptimizingFlags": "$.Parameters.BaseOptimizingFlags", - "PeakOptimizingFlags": "$.Parameters.PeakOptimizingFlags", - "SupportedPlatforms": "linux-x64,linux-arm64" - } } ], "Dependencies": [ diff --git a/website/docs/workloads/speccpu/speccpu-profiles.md b/website/docs/workloads/speccpu/speccpu-profiles.md index 2b70aa5624..738a9e107e 100644 --- a/website/docs/workloads/speccpu/speccpu-profiles.md +++ b/website/docs/workloads/speccpu/speccpu-profiles.md @@ -36,8 +36,9 @@ for evaluating the performance of the CPU for processing calculations. | Parameter | Purpose | Default value | |---------------------------|---------------------------------------------------------------------------------|---------------| - | CompilerName | Optional. The name of the compiler to use for compiling CoreMark on the system. | gcc | | CompilerVersion | Optional. The version of the compiler to use. | The default version for the OS/distro.

  • See [Linux Defaults](https://documentation.ubuntu.com/ubuntu-for-developers/reference/availability/gcc/).
  • See [Windows Defaults](https://cygwin.com/packages/summary/gcc-core.html)
| + | Iterations | Optional. The number of iterations for speccpu to run the benchmark/suite. | 2 | + | Benchmarks | Optional. The benchmark suite or list of benchmarks to run. | fprate | | RunPeak | Optional. True to run the workload 'Peak' scenario, False to run the workload 'Base' scenario. | false (Base) | | Threads | Optional. Determines the number of threads to use for running the benchmark. | # logical processors | | Copies | Optional. Determines the number of copies of the benchmark to run concurrently. | # logical processors | @@ -93,13 +94,14 @@ for evaluating the performance of the CPU for processing calculations. | Parameter | Purpose | Default value | |---------------------------|---------------------------------------------------------------------------------|---------------| - | CompilerName | Optional. The name of the compiler to use for compiling CoreMark on the system. | gcc | | CompilerVersion | Optional. The version of the compiler to use. | The default version for the OS/distro.

  • See [Linux Defaults](https://documentation.ubuntu.com/ubuntu-for-developers/reference/availability/gcc/).
  • See [Windows Defaults](https://cygwin.com/packages/summary/gcc-core.html)
| + | Iterations | Optional. The number of iterations for speccpu to run the benchmark/suite. | 2 | + | Benchmarks | Optional. The benchmark suite or list of benchmarks to run. | fpspeed | | RunPeak | Optional. True to run the workload 'Peak' scenario, False to run the workload 'Base' scenario. | false (Base) | | Threads | Optional. Determines the number of threads to use for running the benchmark. | # logical processors | | Copies | Optional. Determines the number of copies of the benchmark to run concurrently. | # logical processors | - | BaseOptimizationFlags | Optional. Optimization flags to pass to the GCC compiler when running the 'Base' scenario | -g -O3 -march=native | - | PeakOptimizationFlags | Optional. Optimization flags to pass to the GCC compiler when running the 'Peak' scenario | -g -Ofast -march=native -flto | + | BaseOptimizationFlags | Optional. Optimization flags to pass to the GCC compiler when running the 'Base' scenario | -g -O3 -march=native -frecord-gcc-switches| + | PeakOptimizationFlags | Optional. Optimization flags to pass to the GCC compiler when running the 'Peak' scenario | -g -Ofast -march=native -flto -frecord-gcc-switches | * **Profile Runtimes** @@ -144,13 +146,14 @@ for evaluating the performance of the CPU for processing calculations. | Parameter | Purpose | Default value | |---------------------------|---------------------------------------------------------------------------------|---------------| - | CompilerName | Optional. The name of the compiler to use for compiling CoreMark on the system. | gcc | | CompilerVersion | Optional. The version of the compiler to use. | The default version for the OS/distro.

  • See [Linux Defaults](https://documentation.ubuntu.com/ubuntu-for-developers/reference/availability/gcc/).
  • See [Windows Defaults](https://cygwin.com/packages/summary/gcc-core.html)
| + | Iterations | Optional. The number of iterations for speccpu to run the benchmark/suite. | 2 | + | Benchmarks | Optional. The benchmark suite or list of benchmarks to run. | intrate | | RunPeak | Optional. True to run the workload 'Peak' scenario, False to run the workload 'Base' scenario. | false (Base) | | Threads | Optional. Determines the number of threads to use for running the benchmark. | # logical processors | | Copies | Optional. Determines the number of copies of the benchmark to run concurrently. | # logical processors | - | BaseOptimizationFlags | Optional. Optimization flags to pass to the GCC compiler when running the 'Base' scenario | -g -O3 -march=native | - | PeakOptimizationFlags | Optional. Optimization flags to pass to the GCC compiler when running the 'Peak' scenario | -g -Ofast -march=native -flto | + | BaseOptimizationFlags | Optional. Optimization flags to pass to the GCC compiler when running the 'Base' scenario | -g -O3 -march=native -frecord-gcc-switches| + | PeakOptimizationFlags | Optional. Optimization flags to pass to the GCC compiler when running the 'Peak' scenario | -g -Ofast -march=native -flto -frecord-gcc-switches | * **Profile Runtimes** See the 'Metadata' section of the profile for estimated runtimes. These timings represent the length of time required to run a single round of profile @@ -194,13 +197,14 @@ for evaluating the performance of the CPU for processing calculations. | Parameter | Purpose | Default value | |---------------------------|---------------------------------------------------------------------------------|---------------| - | CompilerName | Optional. The name of the compiler to use for compiling CoreMark on the system. | gcc | | CompilerVersion | Optional. The version of the compiler to use. | The default version for the OS/distro.

  • See [Linux Defaults](https://documentation.ubuntu.com/ubuntu-for-developers/reference/availability/gcc/).
  • See [Windows Defaults](https://cygwin.com/packages/summary/gcc-core.html)
| + | Iterations | Optional. The number of iterations for speccpu to run the benchmark/suite. | 2 | + | Benchmarks | Optional. The benchmark suite or list of benchmarks to run. | intspeed | | RunPeak | Optional. True to run the workload 'Peak' scenario, False to run the workload 'Base' scenario. | false (Base) | | Threads | Optional. Determines the number of threads to use for running the benchmark. | # logical processors | | Copies | Optional. Determines the number of copies of the benchmark to run concurrently. | # logical processors | - | BaseOptimizationFlags | Optional. Optimization flags to pass to the GCC compiler when running the 'Base' scenario | -g -O3 -march=native | - | PeakOptimizationFlags | Optional. Optimization flags to pass to the GCC compiler when running the 'Peak' scenario | -g -Ofast -march=native -flto | + | BaseOptimizationFlags | Optional. Optimization flags to pass to the GCC compiler when running the 'Base' scenario | -g -O3 -march=native -frecord-gcc-switches| + | PeakOptimizationFlags | Optional. Optimization flags to pass to the GCC compiler when running the 'Peak' scenario | -g -Ofast -march=native -flto -frecord-gcc-switches | * **Profile Runtimes** See the 'Metadata' section of the profile for estimated runtimes. These timings represent the length of time required to run a single round of profile From d5992246576220fdb932831108e3c1fdfc4d8719 Mon Sep 17 00:00:00 2001 From: saibulusu Date: Tue, 1 Sep 2026 14:05:56 -0700 Subject: [PATCH 2/2] minor --- .../FIO/FioExecutorTests.cs | 66 ------------------- 1 file changed, 66 deletions(-) diff --git a/src/VirtualClient/VirtualClient.Actions.UnitTests/FIO/FioExecutorTests.cs b/src/VirtualClient/VirtualClient.Actions.UnitTests/FIO/FioExecutorTests.cs index 1595ed4896..75de4bf259 100644 --- a/src/VirtualClient/VirtualClient.Actions.UnitTests/FIO/FioExecutorTests.cs +++ b/src/VirtualClient/VirtualClient.Actions.UnitTests/FIO/FioExecutorTests.cs @@ -136,72 +136,6 @@ public void FioExecutorIdentifiesTheExpectedDisksWhenTheyAreExplicitlyDefined_Li } } - [Test] - public void FioExecutorIdentifiesTheExpectedDisksAndGeneratesCorrectCommands_NvmeDisksScenario() - { - // Setup NVMe disks with volumes - using CreateDisks approach similar to the existing test setup - List nvmeDisks = new List - { - // OS disk with volume - this.CreateDisk(0, PlatformID.Unix, os: true, "/dev/nvme0n0", "/dev/nvme0n0p1"), - // Data disks with volumes - these are the ones we want to test - this.CreateDisk(1, PlatformID.Unix, os: false, "/dev/nvme0n1", "/dev/nvme0n1p1"), - this.CreateDisk(2, PlatformID.Unix, os: false, "/dev/nvme2n1", "/dev/nvme2n1p1"), - this.CreateDisk(3, PlatformID.Unix, os: false, "/dev/nvme3n1", "/dev/nvme3n1p1"), - // Additional disk that should not be selected - this.CreateDisk(4, PlatformID.Unix, os: false, "/dev/nvme1n1", "/dev/nvme1n1p1") - }; - - this.disks = nvmeDisks; - this.DiskManager.Setup(mgr => mgr.GetDisksAsync(It.IsAny())).ReturnsAsync(() => this.disks); - - // Set DiskFilter to specific NVMe paths - this.profileParameters["DiskFilter"] = "DiskPath:/dev/nvme0n1,/dev/nvme2n1,/dev/nvme3n1"; - - using (TestFioExecutor fioExecutor = new TestFioExecutor(this.Dependencies, this.profileParameters)) - { - // Test 1: Verify disk selection - IEnumerable disksToTest = fioExecutor.GetDisksToTest(this.disks); - - Assert.IsNotNull(disksToTest); - Assert.AreEqual(3, disksToTest.Count(), "Expected exactly 3 disks to be selected"); - Assert.IsTrue(disksToTest.Any(d => d.DevicePath == "/dev/nvme0n1"), "Expected /dev/nvme0n1 to be selected"); - Assert.IsTrue(disksToTest.Any(d => d.DevicePath == "/dev/nvme2n1"), "Expected /dev/nvme2n1 to be selected"); - Assert.IsTrue(disksToTest.Any(d => d.DevicePath == "/dev/nvme3n1"), "Expected /dev/nvme3n1 to be selected"); - Assert.IsFalse(disksToTest.Any(d => d.DevicePath == "/dev/nvme1n1"), "/dev/nvme1n1 should not be selected"); - Assert.IsFalse(disksToTest.Any(d => d.IsOperatingSystem()), "OS disk should not be selected"); - - // Test 2: Verify command generation for SingleProcess model - string expectedCommand = "/home/any/fio"; - string expectedArguments = "--name=fio_randwrite_test --size=128G --numjobs=16 --rw=randwrite --bs=4k --iodepth=32 --ioengine=libaio --direct=1 --ramp_time=30 --runtime=120 --time_based --overwrite=1 --thread --group_reporting --output-format=json"; - string processModel = WorkloadProcessModel.SingleProcess; - - IEnumerable workloadProcesses = fioExecutor.CreateWorkloadProcesses(expectedCommand, expectedArguments, disksToTest, processModel, EventContext.None); - - Assert.IsTrue(workloadProcesses.Count() == 1, "SingleProcess model should create exactly 1 process"); - DiskWorkloadProcess workloadProcess = workloadProcesses.First(); - - // The actual command line generated - get it for verification - string actualCommandLine = workloadProcess.Process.FullCommand(); - - // Verify the command includes all three NVMe disks - Assert.IsTrue(actualCommandLine.Contains("nvme0n1"), "Command should reference nvme0n1"); - Assert.IsTrue(actualCommandLine.Contains("nvme2n1"), "Command should reference nvme2n1"); - Assert.IsTrue(actualCommandLine.Contains("nvme3n1"), "Command should reference nvme3n1"); - Assert.IsFalse(actualCommandLine.Contains("nvme1n1"), "Command should NOT reference nvme1n1 (not in filter)"); - Assert.IsFalse(actualCommandLine.Contains("nvme0n0"), "Command should NOT reference nvme0n0 (OS disk)"); - - // Verify the expected command structure - Assert.IsTrue(actualCommandLine.StartsWith("sudo /home/any/fio"), "Command should start with sudo /home/any/fio"); - Assert.IsTrue(actualCommandLine.Contains("--name=fio_randwrite_test"), "Command should contain the test name"); - Assert.IsTrue(actualCommandLine.Contains("--ioengine=libaio"), "Command should contain the IO engine"); - - // Count the number of --filename parameters (should be 3, one for each disk) - int filenameCount = Regex.Matches(actualCommandLine, @"--filename=").Count; - Assert.AreEqual(3, filenameCount, "Command should have exactly 3 --filename parameters for the 3 selected NVMe disks"); - } - } - [Test] public void FioExecutorAppliesConfigurationParametersCorrectly() {