DataDog / saluki

An experimental toolkit for building telemetry data planes in Rust.
Apache License 2.0
12 stars 2 forks source link

[APR-205] chore: expose bounds/actual memory usage over internal API #199

Closed tobz closed 3 weeks ago

tobz commented 3 weeks ago

Context

This PR integrates the new internal API machinery into memory-accounting in order to expose an API handler that can show the current allocation groups, both in terms of their originally declared bounds and their actual live usage.

Most of the changes are new code, with a smattering of things we had to update around how allocation statistics are queried, since previously only one caller could query them as querying had consume semantics. Now every caller has to manage tracking the previous state for determining usage deltas, so multiple callers can visit the statistics without clashing.

pr-commenter[bot] commented 3 weeks ago

Regression Detector (DogStatsD)

Regression Detector Results

Run ID: 964a9d0c-4ee3-443b-922b-5fd2d827b9ca

Baseline: 7.52.0 Comparison: 7.52.1

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

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 | links | |------|----------------------------------------------|--------------------|----------|----------------|-------| | ➖ | dsd_uds_1mb_3k_contexts | ingress throughput | +0.03 | [+0.01, +0.06] | | | ➖ | dsd_uds_1mb_50k_contexts | ingress throughput | +0.02 | [-0.02, +0.06] | | | ➖ | dsd_uds_100mb_3k_contexts | ingress throughput | +0.01 | [-0.00, +0.03] | | | ➖ | dsd_uds_100mb_3k_contexts_distributions_only | memory utilization | +0.00 | [-0.23, +0.23] | | | ➖ | dsd_uds_500mb_3k_contexts | ingress throughput | -0.00 | [-0.00, +0.00] | | | ➖ | dsd_uds_10mb_3k_contexts | ingress throughput | -0.00 | [-0.03, +0.03] | | | ➖ | dsd_uds_100mb_250k_contexts | ingress throughput | -0.01 | [-0.08, +0.07] | | | ➖ | dsd_uds_512kb_3k_contexts | ingress throughput | -0.03 | [-0.09, +0.02] | | | ➖ | dsd_uds_1mb_50k_contexts_memlimit | ingress throughput | -0.03 | [-0.08, +0.02] | |

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[bot] commented 3 weeks ago

Regression Detector (Saluki)

Regression Detector Results

Run ID: 23b33689-eb6b-4704-aa94-f754b854b471

Baseline: f0a8b4c7b06e49a9f97f4067cf2a94cabd1cfbed Comparison: c4b22621952998036a651717d1b8b2dbefd1a71e

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

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 | links | |------|-------------------------------------------------|--------------------|----------|----------------|-------| | ➖ | dsd_uds_100mb_3k_contexts_distributions_only | memory utilization | +0.87 | [+0.73, +1.02] | | | ➖ | dsd_uds_500mb_3k_contexts | ingress throughput | +0.79 | [+0.68, +0.90] | | | ➖ | dsd_uds_1mb_50k_contexts_memlimit | ingress throughput | +0.08 | [-3.22, +3.37] | | | ➖ | dsd_uds_1mb_3k_contexts | ingress throughput | +0.06 | [-0.09, +0.20] | | | ➖ | dsd_uds_10mb_3k_contexts | ingress throughput | +0.02 | [-0.03, +0.08] | | | ➖ | dsd_uds_1mb_50k_contexts | ingress throughput | +0.02 | [-0.01, +0.05] | | | ➖ | dsd_uds_50mb_10k_contexts_no_inlining_no_allocs | ingress throughput | +0.01 | [-0.04, +0.07] | | | ➖ | dsd_uds_100mb_3k_contexts | ingress throughput | +0.01 | [+0.00, +0.02] | | | ➖ | dsd_uds_100mb_250k_contexts | ingress throughput | +0.01 | [-0.27, +0.28] | | | ➖ | dsd_uds_50mb_10k_contexts_no_inlining | ingress throughput | +0.00 | [-0.05, +0.05] | | | ➖ | dsd_uds_512kb_3k_contexts | ingress throughput | -0.01 | [-0.21, +0.19] | |

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[bot] commented 3 weeks ago

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]