-
Notifications
You must be signed in to change notification settings - Fork 140
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
[Profiler] Add gen2 leak scenario #6071
Conversation
Datadog ReportBranch report: ✅ 0 Failed, 362114 Passed, 2332 Skipped, 17h 3m 12.17s Total Time ⌛ Performance Regressions vs Default Branch (1)
|
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing the following branches/commits: Execution-time benchmarks measure the whole time it takes to execute a program. And are intended to measure the one-off costs. Cases where the execution time results for the PR are worse than latest master results are shown in red. The following thresholds were used for comparing the execution times:
Note that these results are based on a single point-in-time result for each branch. For full results, see the dashboard. Graphs show the p99 interval based on the mean and StdDev of the test run, as well as the mean value of the run (shown as a diamond below the graph). gantt
title Execution time (ms) FakeDbCommand (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6071) - mean (71ms) : 67, 74
. : milestone, 71,
master - mean (70ms) : 67, 73
. : milestone, 70,
section CallTarget+Inlining+NGEN
This PR (6071) - mean (1,108ms) : 1085, 1131
. : milestone, 1108,
master - mean (1,105ms) : 1067, 1143
. : milestone, 1105,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6071) - mean (109ms) : 106, 112
. : milestone, 109,
master - mean (109ms) : 105, 112
. : milestone, 109,
section CallTarget+Inlining+NGEN
This PR (6071) - mean (773ms) : 756, 791
. : milestone, 773,
master - mean (766ms) : 751, 782
. : milestone, 766,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6071) - mean (92ms) : 90, 94
. : milestone, 92,
master - mean (92ms) : 90, 94
. : milestone, 92,
section CallTarget+Inlining+NGEN
This PR (6071) - mean (732ms) : 714, 750
. : milestone, 732,
master - mean (727ms) : 707, 747
. : milestone, 727,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6071) - mean (191ms) : 188, 194
. : milestone, 191,
master - mean (191ms) : 187, 195
. : milestone, 191,
section CallTarget+Inlining+NGEN
This PR (6071) - mean (1,201ms) : 1129, 1273
. : milestone, 1201,
master - mean (1,202ms) : 1165, 1240
. : milestone, 1202,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6071) - mean (276ms) : 271, 281
. : milestone, 276,
master - mean (276ms) : 270, 281
. : milestone, 276,
section CallTarget+Inlining+NGEN
This PR (6071) - mean (939ms) : 919, 958
. : milestone, 939,
master - mean (938ms) : 918, 958
. : milestone, 938,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6071) - mean (266ms) : 261, 270
. : milestone, 266,
master - mean (265ms) : 261, 269
. : milestone, 265,
section CallTarget+Inlining+NGEN
This PR (6071) - mean (928ms) : 910, 947
. : milestone, 928,
master - mean (922ms) : 906, 939
. : milestone, 922,
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Benchmarks Report for tracer 🐌Benchmarks for #6071 compared to master:
The following thresholds were used for comparing the benchmark speeds:
Allocation changes below 0.5% are ignored. Benchmark detailsBenchmarks.Trace.ActivityBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.AspNetCoreBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.DbCommandBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.ElasticsearchBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.GraphQLBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.HttpClientBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.ILoggerBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.Log4netBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.NLogBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.RedisBenchmark - Faster 🎉 Same allocations ✔️
|
Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.RedisBenchmark.SendReceive‑net6.0 | 1.131 | 1,521.05 | 1,345.43 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | SendReceive |
net6.0 | 1.52μs | 0.722ns | 2.8ns | 0.0159 | 0 | 0 | 1.14 KB |
master | SendReceive |
netcoreapp3.1 | 1.8μs | 1.24ns | 4.8ns | 0.0153 | 0 | 0 | 1.14 KB |
master | SendReceive |
net472 | 2.15μs | 1.64ns | 6.36ns | 0.183 | 0 | 0 | 1.16 KB |
#6071 | SendReceive |
net6.0 | 1.35μs | 0.609ns | 2.36ns | 0.0161 | 0 | 0 | 1.14 KB |
#6071 | SendReceive |
netcoreapp3.1 | 1.76μs | 1.46ns | 5.47ns | 0.0159 | 0 | 0 | 1.14 KB |
#6071 | SendReceive |
net472 | 2.12μs | 1.7ns | 6.57ns | 0.184 | 0.00106 | 0 | 1.16 KB |
Benchmarks.Trace.SerilogBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | EnrichedLog |
net6.0 | 2.69μs | 0.41ns | 1.53ns | 0.0215 | 0 | 0 | 1.6 KB |
master | EnrichedLog |
netcoreapp3.1 | 3.85μs | 1.8ns | 6.96ns | 0.0212 | 0 | 0 | 1.65 KB |
master | EnrichedLog |
net472 | 4.33μs | 2.33ns | 9.02ns | 0.324 | 0 | 0 | 2.04 KB |
#6071 | EnrichedLog |
net6.0 | 2.75μs | 0.994ns | 3.85ns | 0.022 | 0 | 0 | 1.6 KB |
#6071 | EnrichedLog |
netcoreapp3.1 | 3.96μs | 2.47ns | 9.56ns | 0.0218 | 0 | 0 | 1.65 KB |
#6071 | EnrichedLog |
net472 | 4.39μs | 2.34ns | 8.42ns | 0.322 | 0 | 0 | 2.04 KB |
Benchmarks.Trace.SpanBenchmark - Slower ⚠️ Same allocations ✔️
Slower ⚠️ in #6071
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑netcoreapp3.1
1.174
551.77
647.65
Faster 🎉 in #6071
Benchmark
base/diff
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑net6.0
1.123
548.09
488.08
Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑netcoreapp3.1 | 1.174 | 551.77 | 647.65 |
Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑net6.0 | 1.123 | 548.09 | 488.08 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | StartFinishSpan |
net6.0 | 406ns | 0.135ns | 0.521ns | 0.00797 | 0 | 0 | 576 B |
master | StartFinishSpan |
netcoreapp3.1 | 552ns | 0.657ns | 2.46ns | 0.00778 | 0 | 0 | 576 B |
master | StartFinishSpan |
net472 | 692ns | 0.818ns | 3.17ns | 0.0915 | 0 | 0 | 578 B |
master | StartFinishScope |
net6.0 | 548ns | 0.142ns | 0.548ns | 0.00963 | 0 | 0 | 696 B |
master | StartFinishScope |
netcoreapp3.1 | 721ns | 0.258ns | 0.967ns | 0.00974 | 0 | 0 | 696 B |
master | StartFinishScope |
net472 | 861ns | 0.779ns | 3.02ns | 0.104 | 0 | 0 | 658 B |
#6071 | StartFinishSpan |
net6.0 | 401ns | 0.139ns | 0.519ns | 0.00809 | 0 | 0 | 576 B |
#6071 | StartFinishSpan |
netcoreapp3.1 | 646ns | 1.03ns | 3.87ns | 0.00771 | 0 | 0 | 576 B |
#6071 | StartFinishSpan |
net472 | 655ns | 0.758ns | 2.94ns | 0.0916 | 0 | 0 | 578 B |
#6071 | StartFinishScope |
net6.0 | 488ns | 0.232ns | 0.898ns | 0.00973 | 0 | 0 | 696 B |
#6071 | StartFinishScope |
netcoreapp3.1 | 740ns | 1.97ns | 7.64ns | 0.0093 | 0 | 0 | 696 B |
#6071 | StartFinishScope |
net472 | 915ns | 1.47ns | 5.71ns | 0.104 | 0 | 0 | 658 B |
Benchmarks.Trace.TraceAnnotationsBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | RunOnMethodBegin |
net6.0 | 635ns | 0.341ns | 1.32ns | 0.00977 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
netcoreapp3.1 | 873ns | 1.46ns | 5.67ns | 0.00958 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
net472 | 1.12μs | 0.766ns | 2.86ns | 0.105 | 0 | 0 | 658 B |
#6071 | RunOnMethodBegin |
net6.0 | 600ns | 0.312ns | 1.21ns | 0.00993 | 0 | 0 | 696 B |
#6071 | RunOnMethodBegin |
netcoreapp3.1 | 944ns | 0.804ns | 3.11ns | 0.00945 | 0 | 0 | 696 B |
#6071 | RunOnMethodBegin |
net472 | 1.12μs | 1.08ns | 4.19ns | 0.105 | 0 | 0 | 658 B |
Summary of changes
Change the LOH fragmentation scenario into a gen2 leak
Reason for change
Simpler to understand and avoid too fast memory increase that leads to OOM/app crash
Implementation details
Remove the large integer array from the controller and create dedicated News request threads
Test coverage
N/A
Other details