Add hardcoded limits for OCI and libinjection packages#8382
Add hardcoded limits for OCI and libinjection packages#8382andrewlock wants to merge 3 commits intomasterfrom
Conversation
BenchmarksBenchmark execution time: 2026-03-30 14:30:30 Comparing candidate commit ac59c4a in PR branch Found 8 performance improvements and 5 performance regressions! Performance is the same for 260 metrics, 15 unstable metrics.
|
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing This PR (8382) and master.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Metric | Master (Mean ± 95% CI) | Current (Mean ± 95% CI) | Change | Status |
|---|---|---|---|---|
| .NET Framework 4.8 - Baseline | ||||
| duration | 193.20 ± (193.07 - 194.03) ms | 213.43 ± (213.23 - 214.12) ms | +10.5% | ❌⬆️ |
| .NET Framework 4.8 - Bailout | ||||
| duration | 197.04 ± (197.25 - 198.32) ms | 217.32 ± (217.08 - 217.99) ms | +10.3% | ❌⬆️ |
| .NET Framework 4.8 - CallTarget+Inlining+NGEN | ||||
| duration | 1165.14 ± (1172.42 - 1183.27) ms | 1250.88 ± (1248.81 - 1256.15) ms | +7.4% | ❌⬆️ |
Full Metrics Comparison
FakeDbCommand
| Metric | Master (Mean ± 95% CI) | Current (Mean ± 95% CI) | Change | Status |
|---|---|---|---|---|
| .NET Framework 4.8 - Baseline | ||||
| duration | 71.43 ± (71.50 - 71.78) ms | 72.33 ± (72.33 - 72.60) ms | +1.3% | ✅⬆️ |
| .NET Framework 4.8 - Bailout | ||||
| duration | 76.02 ± (75.97 - 76.33) ms | 76.15 ± (76.02 - 76.40) ms | +0.2% | ✅⬆️ |
| .NET Framework 4.8 - CallTarget+Inlining+NGEN | ||||
| duration | 1071.89 ± (1072.00 - 1078.73) ms | 1072.90 ± (1074.44 - 1079.93) ms | +0.1% | ✅⬆️ |
| .NET Core 3.1 - Baseline | ||||
| process.internal_duration_ms | 22.35 ± (22.30 - 22.40) ms | 22.33 ± (22.29 - 22.38) ms | -0.1% | ✅ |
| process.time_to_main_ms | 83.67 ± (83.50 - 83.84) ms | 83.54 ± (83.35 - 83.73) ms | -0.2% | ✅ |
| runtime.dotnet.exceptions.count | 0 ± (0 - 0) | 0 ± (0 - 0) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 10.90 ± (10.90 - 10.91) MB | 10.91 ± (10.91 - 10.92) MB | +0.1% | ✅⬆️ |
| runtime.dotnet.threads.count | 12 ± (12 - 12) | 12 ± (12 - 12) | +0.0% | ✅ |
| .NET Core 3.1 - Bailout | ||||
| process.internal_duration_ms | 22.22 ± (22.18 - 22.25) ms | 22.29 ± (22.26 - 22.33) ms | +0.3% | ✅⬆️ |
| process.time_to_main_ms | 85.11 ± (84.95 - 85.28) ms | 84.94 ± (84.75 - 85.14) ms | -0.2% | ✅ |
| runtime.dotnet.exceptions.count | 0 ± (0 - 0) | 0 ± (0 - 0) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 10.95 ± (10.94 - 10.95) MB | 10.94 ± (10.94 - 10.95) MB | -0.0% | ✅ |
| runtime.dotnet.threads.count | 13 ± (13 - 13) | 13 ± (13 - 13) | +0.0% | ✅ |
| .NET Core 3.1 - CallTarget+Inlining+NGEN | ||||
| process.internal_duration_ms | 223.16 ± (221.99 - 224.32) ms | 223.85 ± (222.51 - 225.18) ms | +0.3% | ✅⬆️ |
| process.time_to_main_ms | 532.05 ± (530.99 - 533.11) ms | 533.07 ± (531.88 - 534.27) ms | +0.2% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 0 ± (0 - 0) | 0 ± (0 - 0) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 48.24 ± (48.20 - 48.27) MB | 48.19 ± (48.15 - 48.22) MB | -0.1% | ✅ |
| runtime.dotnet.threads.count | 28 ± (28 - 28) | 28 ± (28 - 28) | +0.0% | ✅⬆️ |
| .NET 6 - Baseline | ||||
| process.internal_duration_ms | 20.94 ± (20.91 - 20.97) ms | 21.12 ± (21.09 - 21.15) ms | +0.9% | ✅⬆️ |
| process.time_to_main_ms | 71.92 ± (71.77 - 72.08) ms | 72.79 ± (72.62 - 72.95) ms | +1.2% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 0 ± (0 - 0) | 0 ± (0 - 0) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 10.62 ± (10.62 - 10.62) MB | 10.62 ± (10.62 - 10.62) MB | +0.0% | ✅⬆️ |
| runtime.dotnet.threads.count | 10 ± (10 - 10) | 10 ± (10 - 10) | +0.0% | ✅ |
| .NET 6 - Bailout | ||||
| process.internal_duration_ms | 20.92 ± (20.89 - 20.96) ms | 20.99 ± (20.95 - 21.02) ms | +0.3% | ✅⬆️ |
| process.time_to_main_ms | 73.13 ± (72.97 - 73.29) ms | 73.46 ± (73.28 - 73.65) ms | +0.5% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 0 ± (0 - 0) | 0 ± (0 - 0) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 10.66 ± (10.66 - 10.67) MB | 10.74 ± (10.74 - 10.75) MB | +0.7% | ✅⬆️ |
| runtime.dotnet.threads.count | 11 ± (11 - 11) | 11 ± (11 - 11) | +0.0% | ✅ |
| .NET 6 - CallTarget+Inlining+NGEN | ||||
| process.internal_duration_ms | 387.20 ± (384.70 - 389.69) ms | 386.54 ± (384.38 - 388.69) ms | -0.2% | ✅ |
| process.time_to_main_ms | 530.58 ± (529.61 - 531.55) ms | 535.77 ± (534.59 - 536.95) ms | +1.0% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 0 ± (0 - 0) | 0 ± (0 - 0) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 50.23 ± (50.21 - 50.26) MB | 50.27 ± (50.25 - 50.30) MB | +0.1% | ✅⬆️ |
| runtime.dotnet.threads.count | 28 ± (28 - 28) | 28 ± (28 - 28) | -0.4% | ✅ |
| .NET 8 - Baseline | ||||
| process.internal_duration_ms | 19.16 ± (19.12 - 19.19) ms | 19.12 ± (19.09 - 19.15) ms | -0.2% | ✅ |
| process.time_to_main_ms | 71.28 ± (71.13 - 71.43) ms | 71.50 ± (71.33 - 71.66) ms | +0.3% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 0 ± (0 - 0) | 0 ± (0 - 0) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 7.69 ± (7.68 - 7.69) MB | 7.69 ± (7.68 - 7.69) MB | +0.0% | ✅⬆️ |
| runtime.dotnet.threads.count | 10 ± (10 - 10) | 10 ± (10 - 10) | +0.0% | ✅ |
| .NET 8 - Bailout | ||||
| process.internal_duration_ms | 19.25 ± (19.21 - 19.28) ms | 19.24 ± (19.21 - 19.27) ms | -0.0% | ✅ |
| process.time_to_main_ms | 72.88 ± (72.74 - 73.02) ms | 72.34 ± (72.20 - 72.48) ms | -0.7% | ✅ |
| runtime.dotnet.exceptions.count | 0 ± (0 - 0) | 0 ± (0 - 0) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 7.75 ± (7.74 - 7.75) MB | 7.74 ± (7.74 - 7.75) MB | -0.0% | ✅ |
| runtime.dotnet.threads.count | 11 ± (11 - 11) | 11 ± (11 - 11) | +0.0% | ✅ |
| .NET 8 - CallTarget+Inlining+NGEN | ||||
| process.internal_duration_ms | 308.00 ± (305.65 - 310.34) ms | 306.81 ± (304.62 - 309.01) ms | -0.4% | ✅ |
| process.time_to_main_ms | 490.98 ± (490.24 - 491.72) ms | 490.29 ± (489.55 - 491.04) ms | -0.1% | ✅ |
| runtime.dotnet.exceptions.count | 0 ± (0 - 0) | 0 ± (0 - 0) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 37.26 ± (37.24 - 37.28) MB | 37.26 ± (37.25 - 37.28) MB | +0.0% | ✅⬆️ |
| runtime.dotnet.threads.count | 27 ± (27 - 27) | 27 ± (27 - 27) | -0.1% | ✅ |
HttpMessageHandler
| Metric | Master (Mean ± 95% CI) | Current (Mean ± 95% CI) | Change | Status |
|---|---|---|---|---|
| .NET Framework 4.8 - Baseline | ||||
| duration | 193.20 ± (193.07 - 194.03) ms | 213.43 ± (213.23 - 214.12) ms | +10.5% | ❌⬆️ |
| .NET Framework 4.8 - Bailout | ||||
| duration | 197.04 ± (197.25 - 198.32) ms | 217.32 ± (217.08 - 217.99) ms | +10.3% | ❌⬆️ |
| .NET Framework 4.8 - CallTarget+Inlining+NGEN | ||||
| duration | 1165.14 ± (1172.42 - 1183.27) ms | 1250.88 ± (1248.81 - 1256.15) ms | +7.4% | ❌⬆️ |
| .NET Core 3.1 - Baseline | ||||
| process.internal_duration_ms | 187.87 ± (187.50 - 188.24) ms | 209.34 ± (208.83 - 209.84) ms | +11.4% | ✅⬆️ |
| process.time_to_main_ms | 81.24 ± (80.95 - 81.54) ms | 90.90 ± (90.62 - 91.19) ms | +11.9% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 3 ± (3 - 3) | 3 ± (3 - 3) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 16.11 ± (16.07 - 16.14) MB | 15.94 ± (15.93 - 15.96) MB | -1.0% | ✅ |
| runtime.dotnet.threads.count | 20 ± (19 - 20) | 20 ± (20 - 20) | +1.8% | ✅⬆️ |
| .NET Core 3.1 - Bailout | ||||
| process.internal_duration_ms | 186.53 ± (186.24 - 186.82) ms | 208.26 ± (207.74 - 208.77) ms | +11.6% | ✅⬆️ |
| process.time_to_main_ms | 81.95 ± (81.79 - 82.12) ms | 92.57 ± (92.27 - 92.87) ms | +13.0% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 3 ± (3 - 3) | 3 ± (3 - 3) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 16.20 ± (16.17 - 16.24) MB | 16.08 ± (16.06 - 16.09) MB | -0.8% | ✅ |
| runtime.dotnet.threads.count | 21 ± (21 - 21) | 21 ± (21 - 21) | +1.3% | ✅⬆️ |
| .NET Core 3.1 - CallTarget+Inlining+NGEN | ||||
| process.internal_duration_ms | 395.41 ± (394.15 - 396.68) ms | 427.85 ± (426.43 - 429.26) ms | +8.2% | ✅⬆️ |
| process.time_to_main_ms | 525.23 ± (524.34 - 526.13) ms | 574.15 ± (572.32 - 575.98) ms | +9.3% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 3 ± (3 - 3) | 3 ± (3 - 3) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 59.05 ± (58.94 - 59.17) MB | 59.20 ± (59.16 - 59.25) MB | +0.3% | ✅⬆️ |
| runtime.dotnet.threads.count | 30 ± (30 - 30) | 30 ± (30 - 30) | -0.1% | ✅ |
| .NET 6 - Baseline | ||||
| process.internal_duration_ms | 192.21 ± (191.88 - 192.55) ms | 215.61 ± (215.10 - 216.12) ms | +12.2% | ✅⬆️ |
| process.time_to_main_ms | 70.09 ± (69.91 - 70.26) ms | 80.26 ± (80.01 - 80.50) ms | +14.5% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 4 ± (4 - 4) | 4 ± (4 - 4) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 16.17 ± (16.03 - 16.31) MB | 16.19 ± (16.17 - 16.21) MB | +0.1% | ✅⬆️ |
| runtime.dotnet.threads.count | 19 ± (19 - 19) | 20 ± (19 - 20) | +3.3% | ✅⬆️ |
| .NET 6 - Bailout | ||||
| process.internal_duration_ms | 192.26 ± (191.93 - 192.59) ms | 215.38 ± (214.87 - 215.88) ms | +12.0% | ✅⬆️ |
| process.time_to_main_ms | 71.05 ± (70.94 - 71.15) ms | 81.44 ± (81.16 - 81.72) ms | +14.6% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 4 ± (4 - 4) | 4 ± (4 - 4) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 16.22 ± (16.09 - 16.35) MB | 16.24 ± (16.22 - 16.27) MB | +0.2% | ✅⬆️ |
| runtime.dotnet.threads.count | 19 ± (19 - 20) | 21 ± (20 - 21) | +6.4% | ✅⬆️ |
| .NET 6 - CallTarget+Inlining+NGEN | ||||
| process.internal_duration_ms | 600.34 ± (597.60 - 603.08) ms | 601.41 ± (599.09 - 603.73) ms | +0.2% | ✅⬆️ |
| process.time_to_main_ms | 523.80 ± (522.95 - 524.65) ms | 574.50 ± (573.12 - 575.88) ms | +9.7% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 4 ± (4 - 4) | 4 ± (4 - 4) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 62.08 ± (62.00 - 62.17) MB | 61.70 ± (61.60 - 61.80) MB | -0.6% | ✅ |
| runtime.dotnet.threads.count | 30 ± (30 - 30) | 31 ± (31 - 31) | +1.7% | ✅⬆️ |
| .NET 8 - Baseline | ||||
| process.internal_duration_ms | 190.16 ± (189.86 - 190.46) ms | 213.21 ± (212.77 - 213.64) ms | +12.1% | ✅⬆️ |
| process.time_to_main_ms | 69.51 ± (69.33 - 69.68) ms | 78.60 ± (78.34 - 78.86) ms | +13.1% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 4 ± (4 - 4) | 4 ± (4 - 4) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 11.84 ± (11.81 - 11.88) MB | 11.56 ± (11.53 - 11.58) MB | -2.4% | ✅ |
| runtime.dotnet.threads.count | 18 ± (18 - 18) | 19 ± (19 - 19) | +4.3% | ✅⬆️ |
| .NET 8 - Bailout | ||||
| process.internal_duration_ms | 190.07 ± (189.67 - 190.47) ms | 212.14 ± (211.68 - 212.59) ms | +11.6% | ✅⬆️ |
| process.time_to_main_ms | 70.62 ± (70.48 - 70.76) ms | 80.00 ± (79.76 - 80.23) ms | +13.3% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 4 ± (4 - 4) | 4 ± (4 - 4) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 11.88 ± (11.85 - 11.90) MB | 11.65 ± (11.63 - 11.67) MB | -1.9% | ✅ |
| runtime.dotnet.threads.count | 19 ± (19 - 19) | 20 ± (20 - 20) | +4.9% | ✅⬆️ |
| .NET 8 - CallTarget+Inlining+NGEN | ||||
| process.internal_duration_ms | 519.62 ± (517.02 - 522.21) ms | 570.50 ± (562.72 - 578.27) ms | +9.8% | ✅⬆️ |
| process.time_to_main_ms | 480.70 ± (480.02 - 481.38) ms | 525.51 ± (524.62 - 526.40) ms | +9.3% | ✅⬆️ |
| runtime.dotnet.exceptions.count | 4 ± (4 - 4) | 4 ± (4 - 4) | +0.0% | ✅ |
| runtime.dotnet.mem.committed | 50.96 ± (50.93 - 50.99) MB | 51.42 ± (51.32 - 51.52) MB | +0.9% | ✅⬆️ |
| runtime.dotnet.threads.count | 30 ± (30 - 30) | 30 ± (30 - 30) | +0.4% | ✅⬆️ |
Comparison explanation
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 highlighted 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).
Duration charts
FakeDbCommand (.NET Framework 4.8)
gantt
title Execution time (ms) FakeDbCommand (.NET Framework 4.8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8382) - mean (72ms) : 71, 74
master - mean (72ms) : 70, 74
section Bailout
This PR (8382) - mean (76ms) : 74, 78
master - mean (76ms) : 74, 78
section CallTarget+Inlining+NGEN
This PR (8382) - mean (1,077ms) : 1038, 1116
master - mean (1,075ms) : 1027, 1124
FakeDbCommand (.NET Core 3.1)
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8382) - mean (112ms) : 109, 115
master - mean (113ms) : 110, 116
section Bailout
This PR (8382) - mean (114ms) : 111, 117
master - mean (114ms) : 112, 116
section CallTarget+Inlining+NGEN
This PR (8382) - mean (795ms) : 775, 815
master - mean (792ms) : 771, 814
FakeDbCommand (.NET 6)
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8382) - mean (100ms) : 97, 103
master - mean (99ms) : 95, 103
section Bailout
This PR (8382) - mean (101ms) : 98, 103
master - mean (100ms) : 98, 103
section CallTarget+Inlining+NGEN
This PR (8382) - mean (952ms) : 915, 989
master - mean (946ms) : 910, 982
FakeDbCommand (.NET 8)
gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8382) - mean (98ms) : 95, 102
master - mean (98ms) : 95, 101
section Bailout
This PR (8382) - mean (99ms) : 97, 101
master - mean (100ms) : 98, 102
section CallTarget+Inlining+NGEN
This PR (8382) - mean (828ms) : 793, 863
master - mean (829ms) : 793, 865
HttpMessageHandler (.NET Framework 4.8)
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8382) - mean (214ms) : 209, 219
master - mean (194ms) : 189, 198
section Bailout
This PR (8382) - mean (218ms) : crit, 213, 222
master - mean (198ms) : 192, 203
section CallTarget+Inlining+NGEN
This PR (8382) - mean (1,252ms) : crit, 1199, 1306
master - mean (1,178ms) : 1095, 1261
HttpMessageHandler (.NET Core 3.1)
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8382) - mean (310ms) : 301, 318
master - mean (277ms) : 272, 283
section Bailout
This PR (8382) - mean (310ms) : crit, 302, 319
master - mean (277ms) : 273, 280
section CallTarget+Inlining+NGEN
This PR (8382) - mean (1,041ms) : crit, 1004, 1079
master - mean (953ms) : 929, 977
HttpMessageHandler (.NET 6)
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8382) - mean (305ms) : 295, 315
master - mean (271ms) : 266, 275
section Bailout
This PR (8382) - mean (306ms) : crit, 299, 313
master - mean (271ms) : 268, 275
section CallTarget+Inlining+NGEN
This PR (8382) - mean (1,209ms) : 1172, 1247
master - mean (1,155ms) : 1111, 1199
HttpMessageHandler (.NET 8)
gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8382) - mean (303ms) : 296, 310
master - mean (270ms) : 265, 274
section Bailout
This PR (8382) - mean (303ms) : crit, 294, 313
master - mean (270ms) : 265, 275
section CallTarget+Inlining+NGEN
This PR (8382) - mean (1,131ms) : crit, 1019, 1244
master - mean (1,034ms) : 988, 1080
Summary of changes
Adds .NET-specific OCI and libinjection package size limits, instead of relying on the "global" limits
Reason for change
#8351 bumped the global package size limitations for OCI and lib-injection images, but @lloeki flagged that this can lead to large regressions in size to slip through. Given that these packages are quite size-sensitive, this is sub-optimal.
Implementation details
This PR uses the work in https://github.com/DataDog/libdatadog-build/pull/171 and https://github.com/DataDog/libdatadog-build/pull/174 to set size-limits based on his example. It adds the package size override variables, limiting both to 40MB.
Test coverage
Right now we have the following sizes:
lib-injection images:
linux-amd64: 38MBlinux-arm64: 35MBOCI images:
linux-amd64: 30MBlinux-arm64: 28MBwin-amd64: 35MBSo a 40MB limit across the board seems reasonable to me.
You can see these limits being applied in the Gitlab run