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

chore: update Rust to 1.82.0 #305

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

chore: update Rust to 1.82.0 #305

wants to merge 1 commit into from

Conversation

tobz
Copy link
Member

@tobz tobz commented Nov 4, 2024

Context

I'm doing the Rust update separately from the deps update (#304) to try and track down why the dsd_uds_100mb_250k_contexts test got such a weird memory usage regression.

@pr-commenter
Copy link

pr-commenter bot commented Nov 4, 2024

Regression Detector (DogStatsD)

Regression Detector Results

Run ID: 114d2821-1b47-4bcd-b1b0-a3bc5723ed03

Baseline: 7.58.0
Comparison: 7.58.0

Performance changes are noted in the perf column of each table:

  • ✅ = significantly better comparison variant performance
  • ❌ = significantly worse comparison variant performance
  • ➖ = no significant change in performance

No significant changes in experiment optimization goals

Confidence level: 90.00%
Effect size tolerance: |Δ mean %| ≥ 5.00%

There were no significant changes in experiment optimization goals at this confidence level and effect size tolerance.

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI trials links
dsd_uds_100mb_3k_contexts_distributions_only memory utilization +0.80 [+0.64, +0.96] 1
dsd_uds_10mb_3k_contexts ingress throughput +0.01 [-0.00, +0.02] 1
dsd_uds_100mb_3k_contexts ingress throughput +0.00 [-0.04, +0.04] 1
dsd_uds_1mb_50k_contexts ingress throughput +0.00 [-0.00, +0.00] 1
dsd_uds_512kb_3k_contexts ingress throughput +0.00 [-0.01, +0.01] 1
dsd_uds_100mb_250k_contexts ingress throughput +0.00 [-0.00, +0.00] 1
dsd_uds_1mb_3k_contexts ingress throughput +0.00 [-0.00, +0.00] 1
dsd_uds_1mb_50k_contexts_memlimit ingress throughput +0.00 [-0.00, +0.00] 1
dsd_uds_500mb_3k_contexts ingress throughput -0.00 [-0.01, +0.01] 1

Explanation

A regression test is an A/B test of target performance in a repeatable rig, where "performance" is measured as "comparison variant minus baseline variant" for an optimization goal (e.g., ingress throughput). Due to intrinsic variability in measuring that goal, we can only estimate its mean value for each experiment; we report uncertainty in that value as a 90.00% confidence interval denoted "Δ mean % CI".

For each experiment, we decide whether a change in performance is a "regression" -- a change worth investigating further -- if all of the following criteria are true:

  1. Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.

  2. Its 90.00% confidence interval "Δ mean % CI" does not contain zero, indicating that if our statistical model is accurate, there is at least a 90.00% chance there is a difference in performance between baseline and comparison variants.

  3. Its configuration does not mark it "erratic".

@pr-commenter
Copy link

pr-commenter bot commented Nov 4, 2024

Regression Detector (Saluki)

Regression Detector Results

Run ID: e5fa93dc-b2e1-446f-bdda-7ea036d43227

Baseline: dae7e84
Comparison: c744beb

Performance changes are noted in the perf column of each table:

  • ✅ = significantly better comparison variant performance
  • ❌ = significantly worse comparison variant performance
  • ➖ = no significant change in performance

Significant changes in experiment optimization goals

Confidence level: 90.00%
Effect size tolerance: |Δ mean %| ≥ 5.00%

perf experiment goal Δ mean % Δ mean % CI trials links
dsd_uds_100mb_250k_contexts ingress throughput -9.30 [-9.92, -8.68] 1

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI trials links
dsd_uds_10mb_3k_contexts ingress throughput +0.03 [-0.02, +0.07] 1
dsd_uds_512kb_3k_contexts ingress throughput +0.02 [-0.00, +0.03] 1
dsd_uds_50mb_10k_contexts_no_inlining_no_allocs ingress throughput +0.00 [+0.00, +0.00] 1
dsd_uds_1mb_3k_contexts ingress throughput +0.00 [-0.03, +0.03] 1
dsd_uds_50mb_10k_contexts_no_inlining ingress throughput +0.00 [-0.00, +0.00] 1
dsd_uds_1mb_50k_contexts ingress throughput -0.00 [-0.00, +0.00] 1
dsd_uds_100mb_3k_contexts ingress throughput -0.00 [-0.02, +0.01] 1
dsd_uds_100mb_3k_contexts_distributions_only memory utilization -0.35 [-0.51, -0.18] 1
dsd_uds_500mb_3k_contexts ingress throughput -1.55 [-1.64, -1.47] 1
dsd_uds_1mb_50k_contexts_memlimit ingress throughput -2.36 [-6.11, +1.38] 1
dsd_uds_100mb_250k_contexts ingress throughput -9.30 [-9.92, -8.68] 1

Explanation

A regression test is an A/B test of target performance in a repeatable rig, where "performance" is measured as "comparison variant minus baseline variant" for an optimization goal (e.g., ingress throughput). Due to intrinsic variability in measuring that goal, we can only estimate its mean value for each experiment; we report uncertainty in that value as a 90.00% confidence interval denoted "Δ mean % CI".

For each experiment, we decide whether a change in performance is a "regression" -- a change worth investigating further -- if all of the following criteria are true:

  1. Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.

  2. Its 90.00% confidence interval "Δ mean % CI" does not contain zero, indicating that if our statistical model is accurate, there is at least a 90.00% chance there is a difference in performance between baseline and comparison variants.

  3. Its configuration does not mark it "erratic".

@pr-commenter
Copy link

pr-commenter bot commented Nov 4, 2024

Regression Detector Links

Experiment Result Links

experiment link(s)
dsd_uds_100mb_250k_contexts [Profiling (ADP)] [Profiling (DSD)] [SMP Dashboard]
dsd_uds_100mb_3k_contexts [Profiling (ADP)] [Profiling (DSD)] [SMP Dashboard]
dsd_uds_100mb_3k_contexts_distributions_only [Profiling (ADP)] [Profiling (DSD)] [SMP Dashboard]
dsd_uds_10mb_3k_contexts [Profiling (ADP)] [Profiling (DSD)] [SMP Dashboard]
dsd_uds_1mb_3k_contexts [Profiling (ADP)] [Profiling (DSD)] [SMP Dashboard]
dsd_uds_1mb_50k_contexts [Profiling (ADP)] [Profiling (DSD)] [SMP Dashboard]
dsd_uds_1mb_50k_contexts_memlimit [Profiling (ADP)] [Profiling (DSD)] [SMP Dashboard]
dsd_uds_500mb_3k_contexts [Profiling (ADP)] [Profiling (DSD)] [SMP Dashboard]
dsd_uds_512kb_3k_contexts [Profiling (ADP)] [Profiling (DSD)] [SMP Dashboard]
dsd_uds_50mb_10k_contexts_no_inlining (ADP only) [Profiling (ADP)] [SMP Dashboard]
dsd_uds_50mb_10k_contexts_no_inlining_no_allocs (ADP only) [Profiling (ADP)] [SMP Dashboard]

@tobz
Copy link
Member Author

tobz commented Nov 5, 2024

This is in fact a legit regression in Rust 1.82 where the generated machine code for miniz-oxide is demonstrably worse, which causes us to compress requests slower... slow enough, in fact, that the Datadog Metrics destination pushes backpressure all the way up to the source causing the slowdowns/perturbations in the ingress throughput that we see in the SMP capture data.

We've opened an upstream issue (rust-lang/rust#132636) to track this down.

@tobz tobz added type/chore Updates to dependencies or general "administrative" tasks necessary to maintain the codebase/repo. status/blocked Blocked on another issue or upstream dependency. labels Nov 5, 2024
@tobz
Copy link
Member Author

tobz commented Nov 8, 2024

Looks like this comment on the aforementioned issue indicates that building with opt-level=2 instead of 3 might solve the issue.

We should create a draft PR changing from 3 to 2 without changing the Rust version, and then make another draft PR based off of that with Rust updated to 1.82. This would give us a good idea of changing to opt-level=2 loses us any performance (or a meaningful amount, at least) and then also if switch to opt-level=2 with Rust 1.82 actually fixes the observed performance regression here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/blocked Blocked on another issue or upstream dependency. type/chore Updates to dependencies or general "administrative" tasks necessary to maintain the codebase/repo.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant