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

Replace AWS ARM64 graviton images with Azure Managed DevOps pools #6787

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

andrewlock
Copy link
Member

@andrewlock andrewlock commented Mar 20, 2025

Summary of changes

Replaces our previous ARM64 auto-scaling graviton agents with Azure Managed DevOps pool images

Reason for change

The AWS sandbox is being retired, which we means we would have to rebuild the somewhat hacky "VMSS emulator" that we built there, because Microsoft have refused to support ARM64 VMSS pools with Azure DevOps

This will hopefully bring a number of additional benefits, in that it supports more dynamic (and greater) scaling, allows dynamic scaling up and down (e.g. scale all the images off at night) and still allows us to use custom images.

Implementation details

Followed the documentation to perform all the preliminary configuration to enable Managed DevOps pools. Adding a new pool needs to be done from Azure, but should be relatively simple.

It still requires that create new VM images in certain circumstances, but now the process of creating an image is identical for x64 and arm64.

Currently the x64 Linux and Windows images are still using VMSS instead of Managed DevOps pools, but we can consider migrating those across in the future.

Test coverage

Ran some manual tests, and once the initial configuration was done, worked like a charm with one exception - the Docker tests were failing to upload the logs, because localstack was locking the directory. I don't think we actually need to report this temp file, so removed the binding for simplicity.

However we also realised that the same permissions issue was preventing crashdump uploads too, so fixed that "everywhere" by creating a small template to do the permissions fix.

@andrewlock andrewlock added the area:builds project files, build scripts, pipelines, versioning, releases, packages label Mar 20, 2025
@andrewlock andrewlock requested a review from a team as a code owner March 20, 2025 14:48
@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Mar 20, 2025

Datadog Report

Branch report: andrew/ci/managed-devops-pools
Commit report: ed15394
Test service: dd-trace-dotnet

✅ 0 Failed, 247691 Passed, 2400 Skipped, 20h 47m 19.62s Total Time

@andrewlock
Copy link
Member Author

andrewlock commented Mar 20, 2025

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:

  • Welch test with statistical test for significance of 5%
  • Only results indicating a difference greater than 5% and 5 ms are considered.

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).

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET Framework 4.6.2) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6787) - mean (76ms)  : 71, 81
     .   : milestone, 76,
    master - mean (69ms)  : 66, 73
     .   : milestone, 69,

    section CallTarget+Inlining+NGEN
    This PR (6787) - mean (1,059ms)  : 1029, 1088
     .   : milestone, 1059,
    master - mean (1,008ms)  : 983, 1033
     .   : milestone, 1008,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6787) - mean (112ms)  : 108, 116
     .   : milestone, 112,
    master - mean (102ms)  : 100, 104
     .   : milestone, 102,

    section CallTarget+Inlining+NGEN
    This PR (6787) - mean (729ms)  : crit, 708, 749
     .   : crit, milestone, 729,
    master - mean (688ms)  : 670, 706
     .   : milestone, 688,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6787) - mean (98ms)  : 94, 103
     .   : milestone, 98,
    master - mean (89ms)  : 87, 91
     .   : milestone, 89,

    section CallTarget+Inlining+NGEN
    This PR (6787) - mean (687ms)  : crit, 668, 707
     .   : crit, milestone, 687,
    master - mean (642ms)  : 626, 658
     .   : milestone, 642,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6787) - mean (190ms)  : 186, 195
     .   : milestone, 190,
    master - mean (190ms)  : 186, 194
     .   : milestone, 190,

    section CallTarget+Inlining+NGEN
    This PR (6787) - mean (1,103ms)  : 1073, 1134
     .   : milestone, 1103,
    master - mean (1,109ms)  : 1079, 1140
     .   : milestone, 1109,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6787) - mean (269ms)  : 264, 274
     .   : milestone, 269,
    master - mean (269ms)  : 265, 273
     .   : milestone, 269,

    section CallTarget+Inlining+NGEN
    This PR (6787) - mean (873ms)  : 843, 903
     .   : milestone, 873,
    master - mean (880ms)  : 847, 914
     .   : milestone, 880,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6787) - mean (261ms)  : 257, 265
     .   : milestone, 261,
    master - mean (263ms)  : 259, 267
     .   : milestone, 263,

    section CallTarget+Inlining+NGEN
    This PR (6787) - mean (857ms)  : 817, 896
     .   : milestone, 857,
    master - mean (858ms)  : 822, 895
     .   : milestone, 858,

@andrewlock
Copy link
Member Author

andrewlock commented Mar 20, 2025

Benchmarks Report for tracer 🐌

Benchmarks for #6787 compared to master:

  • 1 benchmarks are faster, with geometric mean 1.190
  • All benchmarks have the same allocations

The following thresholds were used for comparing the benchmark speeds:

  • Mann–Whitney U test with statistical test for significance of 5%
  • Only results indicating a difference greater than 10% and 0.3 ns are considered.

Allocation changes below 0.5% are ignored.

Benchmark details

Benchmarks.Trace.ActivityBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartStopWithChild net6.0 7.82μs 35.3ns 146ns 0.0204 0.00815 0 5.61 KB
master StartStopWithChild netcoreapp3.1 10.1μs 57ns 391ns 0.0201 0.00504 0 5.8 KB
master StartStopWithChild net472 16μs 49.1ns 190ns 1.03 0.301 0.0896 6.21 KB
#6787 StartStopWithChild net6.0 7.87μs 45ns 328ns 0.0208 0.00831 0 5.61 KB
#6787 StartStopWithChild netcoreapp3.1 10.2μs 52.6ns 263ns 0.0312 0.0156 0 5.8 KB
#6787 StartStopWithChild net472 16μs 70.2ns 272ns 1.05 0.306 0.105 6.21 KB
Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 485μs 531ns 1.99μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 678μs 437ns 1.69μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 840μs 1.11μs 4.28μs 0.419 0 0 3.3 KB
#6787 WriteAndFlushEnrichedTraces net6.0 487μs 632ns 2.45μs 0 0 0 2.7 KB
#6787 WriteAndFlushEnrichedTraces netcoreapp3.1 655μs 756ns 2.93μs 0 0 0 2.7 KB
#6787 WriteAndFlushEnrichedTraces net472 865μs 759ns 2.84μs 0.431 0 0 3.3 KB
Benchmarks.Trace.AspNetCoreBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendRequest net6.0 131μs 485ns 1.88μs 0.134 0 0 14.47 KB
master SendRequest netcoreapp3.1 147μs 420ns 1.63μs 0.221 0 0 17.27 KB
master SendRequest net472 0.00039ns 0.000291ns 0.00105ns 0 0 0 0 b
#6787 SendRequest net6.0 130μs 380ns 1.47μs 0.193 0 0 14.47 KB
#6787 SendRequest netcoreapp3.1 146μs 468ns 1.81μs 0.224 0 0 17.27 KB
#6787 SendRequest net472 0.000266ns 0.000183ns 0.00066ns 0 0 0 0 b
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 600μs 3.46μs 26.8μs 0.566 0 0 41.63 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 687μs 3.83μs 25.7μs 0.332 0 0 41.8 KB
master WriteAndFlushEnrichedTraces net472 872μs 4.22μs 18.4μs 8.42 2.66 0.443 53.31 KB
#6787 WriteAndFlushEnrichedTraces net6.0 604μs 3.6μs 35.3μs 0.558 0 0 41.43 KB
#6787 WriteAndFlushEnrichedTraces netcoreapp3.1 757μs 4.78μs 47.8μs 0.361 0 0 41.78 KB
#6787 WriteAndFlushEnrichedTraces net472 887μs 4.52μs 19.7μs 8.3 2.62 0.437 53.3 KB
Benchmarks.Trace.DbCommandBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteNonQuery net6.0 1.37μs 0.817ns 3.06ns 0.0145 0 0 1.02 KB
master ExecuteNonQuery netcoreapp3.1 1.72μs 1.43ns 5.34ns 0.0138 0 0 1.02 KB
master ExecuteNonQuery net472 2.02μs 2.73ns 10.2ns 0.157 0.00101 0 987 B
#6787 ExecuteNonQuery net6.0 1.37μs 1.81ns 6.77ns 0.0144 0 0 1.02 KB
#6787 ExecuteNonQuery netcoreapp3.1 1.87μs 1.76ns 6.81ns 0.0139 0 0 1.02 KB
#6787 ExecuteNonQuery net472 2.13μs 2.76ns 10.7ns 0.157 0.00107 0 987 B
Benchmarks.Trace.ElasticsearchBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master CallElasticsearch net6.0 1.27μs 0.471ns 1.76ns 0.0134 0 0 976 B
master CallElasticsearch netcoreapp3.1 1.54μs 0.855ns 3.2ns 0.0131 0 0 976 B
master CallElasticsearch net472 2.65μs 1.24ns 4.81ns 0.157 0 0 995 B
master CallElasticsearchAsync net6.0 1.26μs 0.642ns 2.4ns 0.013 0 0 952 B
master CallElasticsearchAsync netcoreapp3.1 1.73μs 0.966ns 3.74ns 0.0138 0 0 1.02 KB
master CallElasticsearchAsync net472 2.71μs 0.728ns 2.73ns 0.167 0 0 1.05 KB
#6787 CallElasticsearch net6.0 1.24μs 0.341ns 1.28ns 0.0136 0 0 976 B
#6787 CallElasticsearch netcoreapp3.1 1.54μs 0.635ns 2.46ns 0.0131 0 0 976 B
#6787 CallElasticsearch net472 2.67μs 1.39ns 5.37ns 0.157 0 0 995 B
#6787 CallElasticsearchAsync net6.0 1.39μs 0.562ns 2.1ns 0.0132 0 0 952 B
#6787 CallElasticsearchAsync netcoreapp3.1 1.64μs 0.586ns 2.11ns 0.0139 0 0 1.02 KB
#6787 CallElasticsearchAsync net472 2.7μs 1.55ns 6.02ns 0.166 0 0 1.05 KB
Benchmarks.Trace.GraphQLBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteAsync net6.0 1.29μs 0.502ns 1.88ns 0.0129 0 0 952 B
master ExecuteAsync netcoreapp3.1 1.61μs 0.484ns 1.74ns 0.0127 0 0 952 B
master ExecuteAsync net472 1.86μs 0.416ns 1.61ns 0.145 0 0 915 B
#6787 ExecuteAsync net6.0 1.31μs 0.399ns 1.44ns 0.013 0 0 952 B
#6787 ExecuteAsync netcoreapp3.1 1.66μs 1.2ns 4.65ns 0.0125 0 0 952 B
#6787 ExecuteAsync net472 1.85μs 0.387ns 1.45ns 0.145 0 0 915 B
Benchmarks.Trace.HttpClientBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendAsync net6.0 4.24μs 1.62ns 6.29ns 0.0318 0 0 2.31 KB
master SendAsync netcoreapp3.1 5.32μs 4.96ns 18.6ns 0.0371 0 0 2.85 KB
master SendAsync net472 7.58μs 1.44ns 5.38ns 0.492 0 0 3.12 KB
#6787 SendAsync net6.0 4.23μs 2.48ns 9.61ns 0.0318 0 0 2.31 KB
#6787 SendAsync netcoreapp3.1 5.37μs 7.02ns 27.2ns 0.038 0 0 2.85 KB
#6787 SendAsync net472 7.4μs 2.05ns 7.95ns 0.495 0 0 3.12 KB
Benchmarks.Trace.ILoggerBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 1.54μs 0.775ns 2.9ns 0.0239 0 0 1.69 KB
master EnrichedLog netcoreapp3.1 2.36μs 0.981ns 3.67ns 0.0232 0 0 1.69 KB
master EnrichedLog net472 2.59μs 0.982ns 3.68ns 0.258 0 0 1.62 KB
#6787 EnrichedLog net6.0 1.55μs 0.463ns 1.67ns 0.0233 0 0 1.69 KB
#6787 EnrichedLog netcoreapp3.1 2.48μs 0.882ns 3.18ns 0.0223 0 0 1.69 KB
#6787 EnrichedLog net472 2.55μs 0.619ns 2.32ns 0.257 0 0 1.62 KB
Benchmarks.Trace.Log4netBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 113μs 156ns 604ns 0 0 0 4.3 KB
master EnrichedLog netcoreapp3.1 117μs 210ns 814ns 0.0584 0 0 4.3 KB
master EnrichedLog net472 150μs 241ns 932ns 0.676 0.225 0 4.49 KB
#6787 EnrichedLog net6.0 112μs 97.1ns 363ns 0.0561 0 0 4.3 KB
#6787 EnrichedLog netcoreapp3.1 117μs 154ns 597ns 0.0581 0 0 4.3 KB
#6787 EnrichedLog net472 151μs 236ns 913ns 0.674 0.225 0 4.49 KB
Benchmarks.Trace.NLogBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 3.09μs 1.51ns 5.83ns 0.031 0 0 2.25 KB
master EnrichedLog netcoreapp3.1 4.26μs 1.64ns 6.12ns 0.03 0 0 2.25 KB
master EnrichedLog net472 4.89μs 1.93ns 7.47ns 0.329 0 0 2.07 KB
#6787 EnrichedLog net6.0 3.05μs 0.908ns 3.52ns 0.0318 0 0 2.25 KB
#6787 EnrichedLog netcoreapp3.1 4.37μs 1.76ns 6.82ns 0.0305 0 0 2.25 KB
#6787 EnrichedLog net472 4.84μs 1.09ns 4.23ns 0.329 0 0 2.07 KB
Benchmarks.Trace.RedisBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendReceive net6.0 1.3μs 0.665ns 2.49ns 0.0163 0 0 1.14 KB
master SendReceive netcoreapp3.1 1.7μs 0.708ns 2.74ns 0.0153 0 0 1.14 KB
master SendReceive net472 2.08μs 0.618ns 2.31ns 0.183 0 0 1.16 KB
#6787 SendReceive net6.0 1.39μs 0.382ns 1.38ns 0.0159 0 0 1.14 KB
#6787 SendReceive netcoreapp3.1 1.72μs 1.53ns 5.93ns 0.0154 0 0 1.14 KB
#6787 SendReceive net472 2.15μs 0.802ns 3.1ns 0.183 0 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.71μs 1.23ns 4.75ns 0.0217 0 0 1.62 KB
master EnrichedLog netcoreapp3.1 3.97μs 1.41ns 5.27ns 0.0218 0 0 1.67 KB
master EnrichedLog net472 4.49μs 1.57ns 6.09ns 0.326 0 0 2.07 KB
#6787 EnrichedLog net6.0 3.01μs 1.9ns 7.35ns 0.0223 0 0 1.62 KB
#6787 EnrichedLog netcoreapp3.1 3.94μs 2.12ns 8.2ns 0.0218 0 0 1.67 KB
#6787 EnrichedLog net472 4.57μs 3.07ns 11.5ns 0.328 0 0 2.07 KB
Benchmarks.Trace.SpanBenchmark - Faster 🎉 Same allocations ✔️

Faster 🎉 in #6787

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net6.0 1.190 468.60 393.93

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net6.0 469ns 0.166ns 0.643ns 0.0082 0 0 576 B
master StartFinishSpan netcoreapp3.1 581ns 0.902ns 3.49ns 0.00774 0 0 576 B
master StartFinishSpan net472 598ns 0.148ns 0.573ns 0.0917 0 0 578 B
master StartFinishScope net6.0 495ns 0.178ns 0.69ns 0.00985 0 0 696 B
master StartFinishScope netcoreapp3.1 723ns 0.293ns 1.13ns 0.00935 0 0 696 B
master StartFinishScope net472 852ns 0.339ns 1.27ns 0.104 0 0 658 B
#6787 StartFinishSpan net6.0 394ns 0.106ns 0.396ns 0.00801 0 0 576 B
#6787 StartFinishSpan netcoreapp3.1 589ns 0.387ns 1.45ns 0.00766 0 0 576 B
#6787 StartFinishSpan net472 662ns 0.389ns 1.51ns 0.0915 0 0 578 B
#6787 StartFinishScope net6.0 494ns 0.124ns 0.479ns 0.00976 0 0 696 B
#6787 StartFinishScope netcoreapp3.1 735ns 0.241ns 0.902ns 0.00925 0 0 696 B
#6787 StartFinishScope net472 854ns 0.639ns 2.48ns 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 676ns 0.192ns 0.745ns 0.00986 0 0 696 B
master RunOnMethodBegin netcoreapp3.1 957ns 0.315ns 1.22ns 0.00911 0 0 696 B
master RunOnMethodBegin net472 1.12μs 0.226ns 0.876ns 0.104 0 0 658 B
#6787 RunOnMethodBegin net6.0 666ns 0.256ns 0.99ns 0.00979 0 0 696 B
#6787 RunOnMethodBegin netcoreapp3.1 1.03μs 0.557ns 2.16ns 0.00914 0 0 696 B
#6787 RunOnMethodBegin net472 1.1μs 0.254ns 0.984ns 0.104 0 0 658 B

@andrewlock andrewlock force-pushed the andrew/ci/managed-devops-pools branch from b6059b2 to 18f9104 Compare March 21, 2025 09:45
@andrewlock andrewlock force-pushed the andrew/ci/managed-devops-pools branch from 9f5e76c to ed15394 Compare March 21, 2025 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:builds project files, build scripts, pipelines, versioning, releases, packages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants