diff --git a/eng/common/performance/performance-setup.ps1 b/eng/common/performance/performance-setup.ps1 index c6f1045e3d7f6a02bac27ae2aa213d9570a47a71..9a64b07e692f6f732604ea4a0c113c9074efebda 100644 --- a/eng/common/performance/performance-setup.ps1 +++ b/eng/common/performance/performance-setup.ps1 @@ -18,7 +18,8 @@ Param( [switch] $Internal, [switch] $Compare, [string] $MonoDotnet="", - [string] $Configurations="CompilationMode=$CompilationMode RunKind=$Kind" + [string] $Configurations="CompilationMode=$CompilationMode RunKind=$Kind", + [string] $LogicalMachine="" ) $RunFromPerformanceRepo = ($Repository -eq "dotnet/performance") -or ($Repository -eq "dotnet-performance") @@ -33,26 +34,23 @@ $Creator = $env:BUILD_DEFINITIONNAME $PerfLabArguments = "" $HelixSourcePrefix = "pr" -$Queue = "Windows.10.Amd64.ClientRS4.DevEx.15.8.Open" - -# TODO: Implement a better logic to determine if Framework is .NET Core or >= .NET 5. -if ($Framework.StartsWith("netcoreapp") -or ($Framework -eq "net5.0")) { - $Queue = "Windows.10.Amd64.ClientRS5.Open" -} - -if ($Compare) { - $Queue = "Windows.10.Amd64.19H1.Tiger.Perf.Open" - $PerfLabArguments = "" - $ExtraBenchmarkDotNetArguments = "" -} +$Queue = "" if ($Internal) { - $Queue = "Windows.10.Amd64.19H1.Tiger.Perf" + switch ($LogicalMachine) { + "perftiger" { $Queue = "Windows.10.Amd64.19H1.Tiger.Perf" } + "perfowl" { $Queue = "Windows.10.Amd64.20H2.Owl.Perf" } + "perfsurf" { $Queue = "Windows.10.Arm64.Perf.Surf" } + Default { $Queue = "Windows.10.Amd64.19H1.Tiger.Perf" } + } $PerfLabArguments = "--upload-to-perflab-container" $ExtraBenchmarkDotNetArguments = "" $Creator = "" $HelixSourcePrefix = "official" } +else { + $Queue = "Windows.10.Amd64.ClientRS4.DevEx.15.8.Open" +} if($MonoInterpreter) { diff --git a/eng/common/performance/performance-setup.sh b/eng/common/performance/performance-setup.sh index cd4f233d57e6d28f95a70b580b96c0029d17482a..33b60b5033742c5859c62e3918523609ad02b594 100755 --- a/eng/common/performance/performance-setup.sh +++ b/eng/common/performance/performance-setup.sh @@ -27,6 +27,7 @@ using_mono=false wasm_runtime_loc= using_wasm=false use_latest_dotnet=false +logical_machine= while (($# > 0)); do lowerI="$(echo $1 | tr "[:upper:]" "[:lower:]")" @@ -55,6 +56,10 @@ while (($# > 0)); do compilation_mode=$2 shift 2 ;; + --logicalmachine) + logical_machine=$2 + shift 2 + ;; --repository) repository=$2 shift 2 @@ -179,19 +184,6 @@ queue=Ubuntu.1804.Amd64.Open creator=$BUILD_DEFINITIONNAME helix_source_prefix="pr" -if [[ "$compare" == true ]]; then - extra_benchmark_dotnet_arguments= - perflab_arguments= - - # No open queues for arm64 - if [[ "$architecture" = "arm64" ]]; then - echo "Compare not available for arm64" - exit 1 - fi - - queue=Ubuntu.1804.Amd64.Tiger.Perf.Open -fi - if [[ "$internal" == true ]]; then perflab_arguments="--upload-to-perflab-container" helix_source_prefix="official" @@ -201,7 +193,11 @@ if [[ "$internal" == true ]]; then if [[ "$architecture" = "arm64" ]]; then queue=Ubuntu.1804.Arm64.Perf else - queue=Ubuntu.1804.Amd64.Tiger.Perf + if [[ "$logical_machine" = "perfowl" ]]; then + queue=Ubuntu.1804.Amd64.Owl.Perf + else + queue=Ubuntu.1804.Amd64.Tiger.Perf + fi fi if [[ "$alpine" = "true" ]]; then diff --git a/eng/pipelines/coreclr/perf.yml b/eng/pipelines/coreclr/perf.yml index 80891354ecb07bb72196bdc810f4bb3272d26943..879ff40c57d73d6075e21e7093bcfb754b6834c3 100644 --- a/eng/pipelines/coreclr/perf.yml +++ b/eng/pipelines/coreclr/perf.yml @@ -69,6 +69,7 @@ jobs: projectFile: microbenchmarks.proj runKind: micro_mono runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml + logicalmachine: 'perfa64' - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'Schedule')) }}: @@ -83,6 +84,7 @@ jobs: - windows_x86 - Linux_arm64 - Linux_musl_x64 + - windows_arm64 jobParameters: testGroup: perf @@ -131,6 +133,7 @@ jobs: projectFile: microbenchmarks.proj runKind: micro_mono runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml + logicalmachine: 'perftiger' # run mono interpreter perf job - template: /eng/pipelines/common/platform-matrix.yml @@ -148,6 +151,7 @@ jobs: projectFile: microbenchmarks.proj runKind: micro_mono runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml + logicalmachine: 'perftiger' # run mono wasm microbenchmarks perf job - template: /eng/pipelines/common/platform-matrix.yml @@ -165,9 +169,10 @@ jobs: projectFile: microbenchmarks.proj runKind: micro runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml + logicalmachine: 'perftiger' - # run coreclr microbenchmarks perf job + # run coreclr perftiger microbenchmarks perf job - template: /eng/pipelines/common/platform-matrix.yml parameters: jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml @@ -177,7 +182,6 @@ jobs: - Linux_x64 - windows_x64 - windows_x86 - - Linux_arm64 - Linux_musl_x64 jobParameters: testGroup: perf @@ -185,6 +189,56 @@ jobs: projectFile: microbenchmarks.proj runKind: micro runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml + logicalmachine: 'perftiger' + + # run coreclr perfowl microbenchmarks perf job + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml + buildConfig: release + runtimeFlavor: coreclr + platforms: + - Linux_x64 + - windows_x64 + jobParameters: + testGroup: perf + liveLibrariesBuildConfig: Release + projectFile: microbenchmarks.proj + runKind: micro + runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml + logicalmachine: 'perfowl' + +# run coreclr Linux arm64 microbenchmarks perf job + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml + buildConfig: release + runtimeFlavor: coreclr + platforms: + - Linux_arm64 + jobParameters: + testGroup: perf + liveLibrariesBuildConfig: Release + projectFile: microbenchmarks.proj + runKind: micro + runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml + logicalmachine: 'perfa64' + +# run coreclr Windows arm64 microbenchmarks perf job + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml + buildConfig: release + runtimeFlavor: coreclr + platforms: + - windows_arm64 + jobParameters: + testGroup: perf + liveLibrariesBuildConfig: Release + projectFile: microbenchmarks.proj + runKind: micro + runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml + logicalmachine: 'perfsurf' # run coreclr crossgen perf job - template: /eng/pipelines/common/platform-matrix.yml @@ -202,6 +256,7 @@ jobs: projectFile: crossgen_perf.proj runKind: crossgen_scenarios runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml + logicalmachine: 'perftiger' # run mono wasm blazor perf job - template: /eng/pipelines/common/platform-matrix.yml @@ -219,4 +274,5 @@ jobs: runKind: blazor_scenarios runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml additionalSetupParameters: '--latestdotnet' + logicalmachine: 'perftiger' diff --git a/eng/pipelines/coreclr/templates/perf-job.yml b/eng/pipelines/coreclr/templates/perf-job.yml index dd1105546ccfc094110c0aa3ba4795a541614941..ef7bf235269f079a32e03c7a5a5f6fdec49051bc 100644 --- a/eng/pipelines/coreclr/templates/perf-job.yml +++ b/eng/pipelines/coreclr/templates/perf-job.yml @@ -15,6 +15,7 @@ parameters: runKind: '' runJobTemplate: '/eng/pipelines/coreclr/templates/run-performance-job.yml' additionalSetupParameters: '' + logicalMachine: '' ### Perf job @@ -25,8 +26,8 @@ jobs: - template: ${{ parameters.runJobTemplate }} parameters: # Compute job name from template parameters - jobName: ${{ format('perfbuild_{0}{1}_{2}_{3}_{4}_{5}_{6}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig, parameters.runtimeType, parameters.codeGenType, parameters.runKind) }} - displayName: ${{ format('Performance {0}{1} {2} {3} {4} {5} {6}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig, parameters.runtimeType, parameters.codeGenType, parameters.runKind) }} + jobName: ${{ format('perfbuild_{0}{1}_{2}_{3}_{4}_{5}_{6}_{7}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig, parameters.runtimeType, parameters.codeGenType, parameters.runKind, parameters.logicalMachine) }} + displayName: ${{ format('Performance {0}{1} {2} {3} {4} {5} {6} {7}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig, parameters.runtimeType, parameters.codeGenType, parameters.runKind, parameters.logicalMachine) }} pool: ${{ parameters.pool }} buildConfig: ${{ parameters.buildConfig }} archType: ${{ parameters.archType }} @@ -40,6 +41,7 @@ jobs: runKind: ${{ parameters.runKind }} additionalSetupParameters: ${{ parameters.additionalSetupParameters }} container: ${{ parameters.container }} + logicalmachine: ${{ parameters.logicalmachine }} # Test job depends on the corresponding build job dependsOn: - ${{ format('coreclr_{0}_product_build_{1}{2}_{3}_{4}', parameters.runtimeVariant, parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }} diff --git a/eng/pipelines/coreclr/templates/run-performance-job.yml b/eng/pipelines/coreclr/templates/run-performance-job.yml index 17ef611519b25c5ddc449f9a72abf7f6ed265f7d..4a8c44e6a6f3ccb739dc9ab04c6a11810361c15e 100644 --- a/eng/pipelines/coreclr/templates/run-performance-job.yml +++ b/eng/pipelines/coreclr/templates/run-performance-job.yml @@ -20,7 +20,7 @@ parameters: codeGenType: 'JIT' # optional -- Decides on the codegen technology if running on mono projectFile: 'microbenchmarks.proj' # optional -- project file to build helix workitems runKind: '' # required -- test category - + logicalMachine: '' # required -- Used to specify a which pool of machines the test should run against jobs: - template: xplat-pipeline-job.yml parameters: @@ -111,11 +111,11 @@ jobs: _Framework: ${{ framework }} steps: - ${{ parameters.steps }} - - powershell: $(Build.SourcesDirectory)\eng\common\performance\performance-setup.ps1 $(IsInternal)$(Interpreter) -Framework $(_Framework) -Kind ${{ parameters.runKind }} ${{ parameters.extraSetupParameters }} + - powershell: $(Build.SourcesDirectory)\eng\common\performance\performance-setup.ps1 $(IsInternal)$(Interpreter) -Framework $(_Framework) -Kind ${{ parameters.runKind }} -LogicalMachine ${{ parameters.logicalMachine }} ${{ parameters.extraSetupParameters }} displayName: Performance Setup (Windows) condition: and(succeeded(), eq(variables['Agent.Os'], 'Windows_NT')) continueOnError: ${{ parameters.continueOnError }} - - script: $(Build.SourcesDirectory)/eng/common/performance/performance-setup.sh $(IsInternal)$(Interpreter) --framework $(_Framework) --kind ${{ parameters.runKind }} ${{ parameters.extraSetupParameters }} + - script: $(Build.SourcesDirectory)/eng/common/performance/performance-setup.sh $(IsInternal)$(Interpreter) --framework $(_Framework) --kind ${{ parameters.runKind }} --logicalmachine ${{ parameters.logicalMachine }} ${{ parameters.extraSetupParameters }} displayName: Performance Setup (Unix) condition: and(succeeded(), ne(variables['Agent.Os'], 'Windows_NT')) continueOnError: ${{ parameters.continueOnError }} @@ -139,6 +139,6 @@ jobs: displayName: Publish Logs inputs: targetPath: $(Build.SourcesDirectory)/artifacts/log - artifactName: 'Performance_Run_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)_${{ parameters.runtimeType }}_${{ parameters.codeGenType }}_${{ parameters.runKind }}' + artifactName: 'Performance_Run_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)_${{ parameters.runtimeType }}_${{ parameters.codeGenType }}_${{ parameters.runKind }}_${{ parameters.logicalMachine }}' continueOnError: true condition: always() diff --git a/eng/pipelines/coreclr/templates/run-scenarios-job.yml b/eng/pipelines/coreclr/templates/run-scenarios-job.yml index 0e98ed830f29ed686237fe777b72e238ddf13e56..9b5cb92043fb7b9a6fcf4ff8df34bd91322368de 100644 --- a/eng/pipelines/coreclr/templates/run-scenarios-job.yml +++ b/eng/pipelines/coreclr/templates/run-scenarios-job.yml @@ -88,11 +88,11 @@ jobs: steps: - ${{ parameters.steps }} # run performance-setup - - powershell: $(Build.SourcesDirectory)\eng\common\performance\performance-setup.ps1 $(IsInternal) -Framework $(_Framework) -Kind ${{ parameters.runKind }} ${{ parameters.extraSetupParameters }} ${{ parameters.additionalSetupParameters }} + - powershell: $(Build.SourcesDirectory)\eng\common\performance\performance-setup.ps1 $(IsInternal) -Framework $(_Framework) -Kind ${{ parameters.runKind }} -LogicalMachine ${{ parameters.logicalMachine }} ${{ parameters.extraSetupParameters }} ${{ parameters.additionalSetupParameters }} displayName: Performance Setup (Windows) condition: and(succeeded(), eq(variables['Agent.Os'], 'Windows_NT')) continueOnError: ${{ parameters.continueOnError }} - - script: $(Build.SourcesDirectory)/eng/common/performance/performance-setup.sh $(IsInternal) --framework $(_Framework) --kind ${{ parameters.runKind }} ${{ parameters.extraSetupParameters }} ${{ parameters.additionalSetupParameters }} + - script: $(Build.SourcesDirectory)/eng/common/performance/performance-setup.sh $(IsInternal) --framework $(_Framework) --kind ${{ parameters.runKind }} --logicalmachine ${{ parameters.logicalMachine }} ${{ parameters.extraSetupParameters }} ${{ parameters.additionalSetupParameters }} displayName: Performance Setup (Linux) condition: and(succeeded(), ne(variables['Agent.Os'], 'Windows_NT')) continueOnError: ${{ parameters.continueOnError }}