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] Regressions in Span scenarios #44817

Closed
DrewScoggins opened this issue Nov 17, 2020 · 5 comments
Closed

[Perf] Regressions in Span scenarios #44817

DrewScoggins opened this issue Nov 17, 2020 · 5 comments
Labels
arch-x64 area-System.Memory os-linux Linux OS (any supported distro) os-windows tenet-performance Performance related issue tenet-performance-benchmarks Issue from performance benchmark

Comments

@DrewScoggins
Copy link
Member

DrewScoggins commented Nov 17, 2020

Run Information

Architecture x64
OS ubuntu 18.04
Baseline dcd63bb678761f6ec88345fbc9f305060fe32ab5
Compare ce1d60ff19d76506eca59d21af47151d0fceb55c
Diff Diff

Regressions in System.Buffers.Tests.ReadOnlySequenceTests

Benchmark Baseline Test Test/Base Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
FirstSpanMemory 11.58 ns 13.07 ns 1.13
FirstSpanArray 10.72 ns 17.75 ns 1.66
FirstSpanTenSegments 16.29 ns 18.19 ns 1.12

graph
graph
graph
Historical Data in Reporting System

Repro

git clone https://github.com/dotnet/performance.git
python3 .\performance\scripts\benchmarks_ci.py -f netcoreapp5.0 --filter 'System.Buffers.Tests.ReadOnlySequenceTests<Byte>*'

Histogram

System.Buffers.Tests.ReadOnlySequenceTests.FirstSpanMemory

[11.506 ; 11.932) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[11.932 ; 12.230) | @@
[12.230 ; 12.606) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[12.606 ; 13.184) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

System.Buffers.Tests.ReadOnlySequenceTests.FirstSpanArray

[10.546 ; 10.850) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[10.850 ; 11.271) | @@@@@@@
[11.271 ; 11.618) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[11.618 ; 12.022) | @@@@@@@@@@@@@@@@@
[12.022 ; 12.314) | 
[12.314 ; 12.765) | @@
[12.765 ; 13.169) | 
[13.169 ; 13.573) | 
[13.573 ; 13.978) | 
[13.978 ; 14.382) | 
[14.382 ; 14.786) | 
[14.786 ; 15.190) | 
[15.190 ; 15.594) | 
[15.594 ; 15.999) | 
[15.999 ; 16.403) | 
[16.403 ; 16.807) | 
[16.807 ; 17.211) | 
[17.211 ; 17.851) | @

System.Buffers.Tests.ReadOnlySequenceTests.FirstSpanTenSegments

[16.193 ; 16.868) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[16.868 ; 17.256) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[17.256 ; 17.630) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[17.630 ; 18.049) | @@@@@@@@@@@@@@@@
[18.049 ; 18.422) | @@@@@@

Docs

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

Run Information

Architecture x64
OS ubuntu 18.04
Baseline dcd63bb678761f6ec88345fbc9f305060fe32ab5
Compare ce1d60ff19d76506eca59d21af47151d0fceb55c
Diff Diff

Regressions in System.Text.Json.Tests.Perf_Basic

Benchmark Baseline Test Test/Base Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
WriteBasicUtf8 1.94 ms 2.08 ms 1.07
WriteBasicUtf8 2.04 ms 2.17 ms 1.07

graph
graph
Historical Data in Reporting System

Repro

git clone https://github.com/dotnet/performance.git
python3 .\performance\scripts\benchmarks_ci.py -f netcoreapp5.0 --filter 'System.Text.Json.Tests.Perf_Basic*'

Histogram

System.Text.Json.Tests.Perf_Basic.WriteBasicUtf8(Formatted: True, SkipValidation: True, DataSize: 100000)

[1926175.457 ; 1981688.518) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[1981688.518 ; 2100013.744) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

System.Text.Json.Tests.Perf_Basic.WriteBasicUtf8(Formatted: True, SkipValidation: False, DataSize: 100000)

[2029487.072 ; 2107035.309) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[2107035.309 ; 2190877.041) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

Docs

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

Run Information

Architecture x64
OS Windows 10.0.18362
Baseline dcd63bb678761f6ec88345fbc9f305060fe32ab5
Compare ce1d60ff19d76506eca59d21af47151d0fceb55c
Diff Diff

Regressions in System.Buffers.Tests.ReadOnlySequenceTests

Benchmark Baseline Test Test/Base Baseline IR Compare IR IR Ratio Baseline ETL Compare ETL
FirstSpanSingleSegment 21.44 ns 23.84 ns 1.11 110.31446047092427 105.83761716008094 0.9594174390942762 Trace Trace
FirstSpanTenSegments 21.58 ns 24.05 ns 1.11 106.79286323834967 101.7594537815126 0.9528675484090818 Trace Trace

graph
graph
Historical Data in Reporting System

Repro

git clone https://github.com/dotnet/performance.git
py .\performance\scripts\benchmarks_ci.py -f netcoreapp5.0 --filter 'System.Buffers.Tests.ReadOnlySequenceTests<Byte>*'

Histogram

System.Buffers.Tests.ReadOnlySequenceTests.FirstSpanSingleSegment

[21.300 ; 22.105) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[22.105 ; 22.736) | 
[22.736 ; 23.565) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[23.565 ; 24.056) | @@@@@@@@@@@@

System.Buffers.Tests.ReadOnlySequenceTests.FirstSpanTenSegments

[21.299 ; 22.065) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[22.065 ; 22.701) | @@@
[22.701 ; 23.507) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[23.507 ; 24.308) | @@@@@@@@@@@@

Docs

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

@DrewScoggins DrewScoggins added os-linux Linux OS (any supported distro) os-windows tenet-performance Performance related issue tenet-performance-benchmarks Issue from performance benchmark arch-x64 labels Nov 17, 2020
@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the untriaged New issue has not been triaged by the area owner label Nov 17, 2020
@Dotnet-GitSync-Bot
Copy link
Collaborator

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@danmoseley
Copy link
Member

There are only 4 commits in this period and #44574 leaps out because it touches Span. @trylek @GrabYourPitchforks thoughts?

@danmoseley danmoseley changed the title [Perf] Regressions at 11/13/2020 12:12:28 AM [Perf] Regressions in Span scenarios Nov 25, 2020
@GrabYourPitchforks GrabYourPitchforks removed their assignment Nov 25, 2020
@GrabYourPitchforks
Copy link
Member

Unassigning from myself, as I don't know how to begin investigating this.

We didn't add new logic - we only removed existing logic. My best guess is that: (a) deleting some code changed how the remaining codegen was aligned; or (b) the PGO data for this method is stale and we need to wait for new PGO data to be generated.

In either case I think somebody from the JIT side would be a better candidate to take a look at this.

@danmoseley
Copy link
Member

That makes sense. @dotnet/jit-contrib any thoughts about this - could the changes in #44574 have affected the efficiency of https://github.com/dotnet/performance/blob/de2546b730da4b7904f6e7e051d93c5d733c6516/src/benchmarks/micro/libraries/System.Buffers/ReadOnlySequenceTests.cs#L48 (which is essentially the body of all these tests -- save the UTF8 ones, who may do similar work)

@adamsitnik
Copy link
Member

It looks like this benchmark can be multimodal for a long time and it just got back to its previous mode:

obraz

@adamsitnik adamsitnik removed the untriaged New issue has not been triaged by the area owner label Jan 21, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Feb 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-x64 area-System.Memory os-linux Linux OS (any supported distro) os-windows tenet-performance Performance related issue tenet-performance-benchmarks Issue from performance benchmark
Projects
None yet
Development

No branches or pull requests

6 participants