Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Perf] Windows/x64: 12 Regressions on 8/15/2024 12:39:36 AM #106706

Closed
performanceautofiler bot opened this issue Aug 20, 2024 · 8 comments
Closed

[Perf] Windows/x64: 12 Regressions on 8/15/2024 12:39:36 AM #106706

performanceautofiler bot opened this issue Aug 20, 2024 · 8 comments
Assignees
Labels
arch-x64 area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI os-windows runtime-coreclr specific to the CoreCLR runtime tenet-performance Performance related issue tenet-performance-benchmarks Issue from performance benchmark
Milestone

Comments

@performanceautofiler
Copy link

Run Information

Name Value
Architecture x64
OS Windows 10.0.22631
Queue ViperWindows
Baseline 0fbd81404d1f211572387498474063bc6f407f0f
Compare bfffd58eeb204d368989038a19786bff86000b19
Diff Diff
Configs CompilationMode:tiered, RunKind:micro

Regressions in System.Linq.Tests.Perf_Enumerable

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio
54.14 ns 65.46 ns 1.21 0.35 False

graph
Test Report

Repro

General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Linq.Tests.Perf_Enumerable*'

System.Linq.Tests.Perf_Enumerable.WhereFirst_LastElementMatches(input: Array)

ETL Files

Histogram

JIT Disasms

Docs

Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository


Run Information

Name Value
Architecture x64
OS Windows 10.0.22631
Queue ViperWindows
Baseline 0fbd81404d1f211572387498474063bc6f407f0f
Compare bfffd58eeb204d368989038a19786bff86000b19
Diff Diff
Configs CompilationMode:tiered, RunKind:micro

Regressions in System.Numerics.Tests.Perf_VectorConvert

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio
473.78 ns 546.54 ns 1.15 0.12 False

graph
Test Report

Repro

General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Numerics.Tests.Perf_VectorConvert*'

System.Numerics.Tests.Perf_VectorConvert.Convert_double_long

ETL Files

Histogram

JIT Disasms

Docs

Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository


Run Information

Name Value
Architecture x64
OS Windows 10.0.22631
Queue ViperWindows
Baseline 0fbd81404d1f211572387498474063bc6f407f0f
Compare bfffd58eeb204d368989038a19786bff86000b19
Diff Diff
Configs CompilationMode:tiered, RunKind:micro

Regressions in System.Text.RegularExpressions.Tests.Perf_Regex_Industry_Leipzig

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio
1.57 ms 1.67 ms 1.06 0.00 True
12.95 ms 13.60 ms 1.05 0.00 True
3.68 ms 4.01 ms 1.09 0.02 False

graph
graph
graph
Test Report

Repro

General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Text.RegularExpressions.Tests.Perf_Regex_Industry_Leipzig*'

System.Text.RegularExpressions.Tests.Perf_Regex_Industry_Leipzig.Count(Pattern: "Huck[a-zA-Z]+|Saw[a-zA-Z]+", Options: Compiled)

ETL Files

Histogram

JIT Disasms

System.Text.RegularExpressions.Tests.Perf_Regex_Industry_Leipzig.Count(Pattern: "([A-Za-z]awyer|[A-Za-z]inn)\s", Options: Compiled)

ETL Files

Histogram

JIT Disasms

System.Text.RegularExpressions.Tests.Perf_Regex_Industry_Leipzig.Count(Pattern: "Tom|Sawyer|Huckleberry|Finn", Options: NonBacktracking)

ETL Files

Histogram

JIT Disasms

Docs

Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository


Run Information

Name Value
Architecture x64
OS Windows 10.0.22631
Queue ViperWindows
Baseline 0fbd81404d1f211572387498474063bc6f407f0f
Compare bfffd58eeb204d368989038a19786bff86000b19
Diff Diff
Configs CompilationMode:tiered, RunKind:micro

Regressions in System.Tests.Perf_String

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio
23.52 ns 38.56 ns 1.64 0.02 False
23.51 ns 38.57 ns 1.64 0.02 False

graph
graph
Test Report

Repro

General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Tests.Perf_String*'

System.Tests.Perf_String.IndexerCheckBoundCheckHoist

ETL Files

Histogram

JIT Disasms

System.Tests.Perf_String.IndexerCheckLengthHoisting

ETL Files

Histogram

JIT Disasms

Docs

Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository


Run Information

Name Value
Architecture x64
OS Windows 10.0.22631
Queue ViperWindows
Baseline 0fbd81404d1f211572387498474063bc6f407f0f
Compare bfffd58eeb204d368989038a19786bff86000b19
Diff Diff
Configs CompilationMode:tiered, RunKind:micro

Regressions in Loops.StrengthReduction

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio
4.29 μs 5.43 μs 1.27 0.04 False
4.33 μs 5.43 μs 1.25 0.04 False
4.31 μs 5.42 μs 1.26 0.04 False

graph
graph
graph
Test Report

Repro

General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'Loops.StrengthReduction*'

Loops.StrengthReduction.SumS29Span

ETL Files

Histogram

JIT Disasms

Loops.StrengthReduction.SumS8Span

ETL Files

Histogram

JIT Disasms

Loops.StrengthReduction.SumLongsSpan

ETL Files

Histogram

JIT Disasms

Docs

Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository


Run Information

Name Value
Architecture x64
OS Windows 10.0.22631
Queue ViperWindows
Baseline 0fbd81404d1f211572387498474063bc6f407f0f
Compare bfffd58eeb204d368989038a19786bff86000b19
Diff Diff
Configs CompilationMode:tiered, RunKind:micro

Regressions in System.Collections.IterateFor<Int32>

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio
3.41 μs 3.68 μs 1.08 0.26 False

graph
Test Report

Repro

General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Collections.IterateFor&lt;Int32&gt;*'

System.Collections.IterateFor<Int32>.ImmutableList(Size: 512)

ETL Files

Histogram

JIT Disasms

Docs

Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository


Run Information

Name Value
Architecture x64
OS Windows 10.0.22631
Queue ViperWindows
Baseline 0fbd81404d1f211572387498474063bc6f407f0f
Compare bfffd58eeb204d368989038a19786bff86000b19
Diff Diff
Configs CompilationMode:tiered, RunKind:micro

Regressions in System.Globalization.Tests.StringSearch

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio
442.54 ns 616.75 ns 1.39 0.04 False

graph
Test Report

Repro

General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Globalization.Tests.StringSearch*'

System.Globalization.Tests.StringSearch.LastIndexOf_Word_NotFound(Options: (en-US, OrdinalIgnoreCase, False))

ETL Files

Histogram

JIT Disasms

Docs

Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository

@performanceautofiler performanceautofiler bot added arch-x64 os-windows runtime-coreclr specific to the CoreCLR runtime untriaged New issue has not been triaged by the area owner labels Aug 20, 2024
@DrewScoggins DrewScoggins removed the untriaged New issue has not been triaged by the area owner label Aug 20, 2024
@DrewScoggins DrewScoggins transferred this issue from dotnet/perf-autofiling-issues Aug 20, 2024
@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Aug 20, 2024
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Aug 20, 2024
@DrewScoggins
Copy link
Member

Could be related to #106218

@DrewScoggins
Copy link
Member

@Ruihan-Yin

@DrewScoggins DrewScoggins added tenet-performance Performance related issue tenet-performance-benchmarks Issue from performance benchmark labels Aug 20, 2024
@jeffschwMSFT jeffschwMSFT added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Aug 21, 2024
Copy link
Contributor

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

@DeepakRajendrakumaran
Copy link
Contributor

@Ruihan-Yin

Ruihan is OOO for the week. So, I took a look at this but unfortunately I'm not able to reproduce this locally

The steps I took are following

Step 1 : Checked out to the base commit mentioned(up to 0fbd814) and build repo using
build.cmd -c Release

Step 2 : Checked out to the diff commit mentioned(up to bfffd58) and build repo using
build.cmd -c Release

Step3 : Update performance repo and run tests using following command
performance\src\benchmarks\micro>dotnet run -c Release -f net9.0 --filter "System.Linq.Tests.Perf_Enumerable*" --coreRun "<runtime_repo>\artifacts_106706_base\bin\testhost\net9.0-windows-Release-x64\shared\Microsoft.NETCore.App\9.0.0\corerun.exe" "<runtime_repo>\artifacts\bin\testhost\net9.0-windows-Release-x64\shared\Microsoft.NETCore.App\9.0.0\corerun.exe"

I did the same for Loops.StrengthReduction* and System.Numerics.Tests.Perf_VectorConvert* as well. But the specified tests do not show any regression.

I do have a few questions though

  1. What machine were these tests run on? I'm running on a cascade lakes machine
  2. Do I need to set any env variables before running the tests?
  3. Have you done a binary search and verified it's this commit?

@tannergooding
Copy link
Member

What machine were these tests run on? I'm running on a cascade lakes machine
Do I need to set any env variables before running the tests?

@DrewScoggins, could you share which CPU this is using in particular?

Have you done a binary search and verified it's this commit?

No confirmation was done to isolate the exact commit or check disassembly, triage typically just calls out the most likely commit from the range surrounding the regression.

-- In this particular case, I don't think there's much to do here outside validating which commit did introduce the regression. This was a correctness fix and we're late in the cycle, so at best we could confirm that it was #106218 and see if there's some optimization we could do in .NET 10 to restore the codegen to what it was. Perhaps some cases can still use embedded broadcast/mask or have an alternative sequence we could emit for example.

@AndyAyersMS
Copy link
Member

Viper would be an AMD Zen4, right?

@vcsjones vcsjones removed the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Aug 23, 2024
@JulieLeeMSFT JulieLeeMSFT added this to the 9.0.0 milestone Aug 23, 2024
@JulieLeeMSFT JulieLeeMSFT removed the untriaged New issue has not been triaged by the area owner label Aug 23, 2024
@DrewScoggins
Copy link
Member

Here is a link to the page where we keep some basic hardware information on all of our queues. https://perfsupport.azurewebsites.net/hw-spec

@kunalspathak
Copy link
Member

I am guessing this has something to do with dependencies updates...When it regressed, we had b1968e7...cef3898 that contained #106261. After a week, with #106421 in f402418...df2d213, the regression disappeared:

image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-x64 area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI os-windows runtime-coreclr specific to the CoreCLR runtime tenet-performance Performance related issue tenet-performance-benchmarks Issue from performance benchmark
Projects
None yet
Development

No branches or pull requests

9 participants