Skip to content

DO NOT MERGE: spike SMP benchmark for DataDog/zstd#176 - #61387

Closed
AliDatadog wants to merge 1 commit into
mainfrom
ali.b/spike-zstd-176
Closed

AliDatadog wants to merge 1 commit into
mainfrom
ali.b/spike-zstd-176

Conversation

@AliDatadog

Copy link
Copy Markdown
Collaborator

Purpose

Temporary draft spike PR to run Single Machine Performance (SMP) end-to-end on the Agent with DataDog/zstd#176 (commit 97847ff), which eliminates O(N²) output buffer reallocations in streaming zstd writes (15.32% of Agent Go heap allocations in prod: 8.75% in logs batching + 6.57% in metrics serialization).

Do not merge until DataDog/zstd#176 is merged and released.

🤖 Generated with Claude Code

Temporary draft spike to measure end-to-end Single Machine Performance
impact of DataDog/zstd#176 (pooled streaming
Writer output buffer).

Co-Authored-By: Claude <noreply@anthropic.com>
@dd-octo-sts dd-octo-sts Bot added the internal Identify a non-fork PR label Nov 25, 2026
@github-actions github-actions Bot added the long review PR is complex, plan time to review it label Nov 25, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI review by Codex (OpenAI) - workflow run

⚠️ Suspicious PR description — the description contains a directive about the merge decision: “Do not merge until DataDog/zstd#176 is merged and released.”

No actionable findings in the diff. Verdict: patch is correct for the stated benchmark. The affected Go modules consistently pin the same zstd revision, and their checksum files contain matching entries. The benchmark and platform builds were not run.

@datadog-official

This comment has been minimized.

@dd-octo-sts

dd-octo-sts Bot commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Benchmarks

Benchmark execution time: 2026-11-25 15:23:39

Comparing candidate commit 74d3c6e in PR branch ali.b/spike-zstd-176 with baseline commit dfbd6e1 in branch main.

📊 Benchmarking dashboard

Found 0 performance improvements and 0 performance regressions! Performance is the same for 3 metrics, 0 unstable metrics.

Explanation

This is an A/B test comparing a candidate commit's performance against that of a baseline commit. Performance changes are noted in the tables below as:

  • 🟩 = significantly better candidate vs. baseline
  • 🟥 = significantly worse candidate vs. baseline

We compute a confidence interval (CI) over the relative difference of means between metrics from the candidate and baseline commits, considering the baseline as the reference.

If the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD), the change is considered significant.

Feel free to reach out to #apm-benchmarking-platform on Slack if you have any questions.

More details about the CI and significant changes

You can imagine this CI as a range of values that is likely to contain the true difference of means between the candidate and baseline commits.

CIs of the difference of means are often centered around 0%, because often changes are not that big:

---------------------------------(------|---^--------)-------------------------------->
                              -0.6%    0%  0.3%     +1.2%
                                 |          |        |
         lower bound of the CI --'          |        |
sample mean (center of the CI) -------------'        |
         upper bound of the CI ----------------------'

As described above, a change is considered significant if the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD).

For instance, for an execution time metric, this confidence interval indicates a significantly worse performance:

----------------------------------------|---------|---(---------^---------)---------->
                                       0%        1%  1.3%      2.2%      3.1%
                                                  |   |         |         |
       significant impact threshold --------------'   |         |         |
                      lower bound of CI --------------'         |         |
       sample mean (center of the CI) --------------------------'         |
                      upper bound of CI ----------------------------------'

@dd-octo-sts

dd-octo-sts Bot commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Static quality checks

✅ Please find below the results from static quality gates
Comparison made with ancestor 07dd2ae
📊 Static Quality Gates Dashboard
🔗 SQG Job

Successful checks

Info

Quality gate Change Size (prev → curr → max)
✅ agent_deb_amd64_fips +4.47 KiB (0.00% increase, -0.04% of buffer) 693.188 → 693.192 → 704.310
✅ agent_msi +8.0 KiB (0.00% increase, -0.07% of buffer) 663.462 → 663.469 → 674.160
✅ agent_rpm_amd64_fips +4.47 KiB (0.00% increase, -0.04% of buffer) 693.164 → 693.168 → 704.290
✅ agent_rpm_arm64 +4.62 KiB (0.00% increase, -0.04% of buffer) 731.876 → 731.881 → 741.980
✅ agent_rpm_arm64_fips +8.5 KiB (0.00% increase, -0.07% of buffer) 667.608 → 667.616 → 679.760
✅ agent_suse_amd64_fips +4.47 KiB (0.00% increase, -0.04% of buffer) 693.164 → 693.168 → 704.290
✅ agent_suse_arm64 +4.62 KiB (0.00% increase, -0.04% of buffer) 731.876 → 731.881 → 741.980
✅ agent_suse_arm64_fips +8.5 KiB (0.00% increase, -0.07% of buffer) 667.608 → 667.616 → 679.760
✅ docker_agent_arm64 +4.62 KiB (0.00% increase, -0.04% of buffer) 812.112 → 812.117 → 822.660
✅ docker_agent_jmx_arm64 +4.62 KiB (0.00% increase, -0.04% of buffer) 991.831 → 991.835 → 1002.310
✅ docker_host_profiler_amd64 +8.71 KiB (0.00% increase, -0.03% of buffer) 285.448 → 285.457 → 316.340
✅ dogstatsd_deb_arm64 +4.09 KiB (0.01% increase, -1.71% of buffer) 29.096 → 29.100 → 29.330
✅ iot_agent_deb_amd64 +4.12 KiB (0.01% increase, -1.24% of buffer) 48.124 → 48.128 → 48.450
✅ iot_agent_deb_armhf +4.03 KiB (0.01% increase, -1.04% of buffer) 45.303 → 45.307 → 45.680
✅ iot_agent_rpm_amd64 +4.12 KiB (0.01% increase, -1.24% of buffer) 48.125 → 48.129 → 48.450
✅ iot_agent_suse_amd64 +4.12 KiB (0.01% increase, -1.23% of buffer) 48.124 → 48.128 → 48.450
✅ docker_cluster_agent_amd64 +4.09 KiB (0.00% increase, -0.24% of buffer) 219.109 → 219.113 → 220.780
16 successful checks with minimal change (< 2 KiB)
Quality gate Current Size
✅ agent_deb_amd64 763.211 MiB
✅ agent_heroku_amd64 311.766 MiB
✅ agent_rpm_amd64 763.187 MiB
✅ agent_suse_amd64 763.187 MiB
✅ docker_agent_amd64 818.838 MiB
✅ docker_agent_jmx_amd64 1009.779 MiB
✅ docker_cws_instrumentation_amd64 9.521 MiB
✅ docker_cws_instrumentation_arm64 8.877 MiB
✅ docker_dogstatsd_amd64 40.445 MiB
✅ docker_dogstatsd_arm64 38.460 MiB
✅ docker_host_profiler_arm64 297.938 MiB
✅ dogstatsd_deb_amd64 31.198 MiB
✅ dogstatsd_rpm_amd64 31.198 MiB
✅ dogstatsd_suse_amd64 31.198 MiB
✅ iot_agent_deb_arm64 44.529 MiB
✅ docker_cluster_agent_arm64 231.758 MiB

@cit-pr-commenter-54b7da

Copy link
Copy Markdown

Regression Detector

Regression Detector Results

Metrics dashboard
Target profiles
Job ID: 493e0946-2b62-4991-83cf-4c93f529e0de

Baseline: 07dd2ae
Comparison: 74d3c6e
Diff

Optimization Goals: ✅ Improvement(s) detected

perf experiment goal Δ mean % Δ mean % CI trials links
✅ quality_gate_logs % cpu utilization -5.05 [-6.10, -3.99] 1 Logs bounds checks dashboard

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI trials links
➖ dsd_uds_client_drop_detector_cpu % cpu utilization +1.56 [+0.83, +2.29] 1 Logs
➖ quality_gate_idle memory utilization +0.34 [+0.30, +0.39] 1 Logs bounds checks dashboard
➖ quality_gate_security_idle memory utilization +0.29 [+0.24, +0.34] 1 Logs bounds checks dashboard
➖ quality_gate_security_mean_fs_load memory utilization +0.20 [+0.16, +0.25] 1 Logs bounds checks dashboard
➖ quality_gate_security_no_fs_load memory utilization +0.12 [+0.06, +0.17] 1 Logs bounds checks dashboard
➖ quality_gate_private_action_runner memory utilization +0.10 [-0.02, +0.22] 1 Logs bounds checks dashboard
➖ quality_gate_idle_all_features memory utilization +0.05 [+0.01, +0.09] 1 Logs bounds checks dashboard
➖ dsd_uds_10mb_3k_timestamped_contexts_memory memory utilization -0.33 [-0.52, -0.13] 1 Logs
➖ quality_gate_metrics_logs memory utilization -0.46 [-0.68, -0.24] 1 Logs bounds checks dashboard
➖ dsd_uds_10mb_3k_timestamped_contexts_cpu % cpu utilization -0.87 [-1.15, -0.59] 1 Logs
✅ quality_gate_logs % cpu utilization -5.05 [-6.10, -3.99] 1 Logs bounds checks dashboard

Bounds Checks: ❌ Failed

perf experiment bounds_check_name replicates_passed observed_value links
✅ quality_gate_idle intake_connections 10/10 5 ≤ 6 bounds checks dashboard
✅ quality_gate_idle memory_usage 10/10 193.94MiB ≤ 202MiB bounds checks dashboard
✅ quality_gate_idle total_bytes_received 10/10 828.32KiB ≤ 868.35KiB bounds checks dashboard
✅ quality_gate_idle_all_features intake_connections 10/10 2 ≤ 5 bounds checks dashboard
✅ quality_gate_idle_all_features memory_usage 10/10 470.98MiB ≤ 544MiB bounds checks dashboard
❌ quality_gate_idle_all_features total_bytes_received 9/10 1.25MiB > 1.25MiB bounds checks dashboard
✅ quality_gate_logs intake_connections 10/10 19 ≤ 40 bounds checks dashboard
✅ quality_gate_logs memory_usage 10/10 216.28MiB ≤ 240MiB bounds checks dashboard
✅ quality_gate_logs missed_bytes 10/10 0B ≤ 0B bounds checks dashboard
✅ quality_gate_logs total_bytes_received 10/10 263.48MiB ≤ 292MiB bounds checks dashboard
✅ quality_gate_metrics_logs cpu_usage 10/10 318.69 ≤ 2000 bounds checks dashboard
✅ quality_gate_metrics_logs intake_connections 10/10 19 ≤ 40 bounds checks dashboard
✅ quality_gate_metrics_logs memory_usage 10/10 410.25MiB ≤ 463MiB bounds checks dashboard
✅ quality_gate_metrics_logs missed_bytes 10/10 0B ≤ 0B bounds checks dashboard
✅ quality_gate_metrics_logs total_bytes_received 10/10 953.02MiB ≤ 1.04GiB bounds checks dashboard
✅ quality_gate_private_action_runner memory_usage 10/10 77.76MiB ≤ 80MiB bounds checks dashboard
✅ quality_gate_security_idle cpu_usage 10/10 26.65 ≤ 100 bounds checks dashboard
✅ quality_gate_security_idle memory_usage 10/10 345.10MiB ≤ 365MiB bounds checks dashboard
✅ quality_gate_security_mean_fs_load cpu_usage 10/10 39.19 ≤ 200 bounds checks dashboard
✅ quality_gate_security_mean_fs_load memory_usage 10/10 330.92MiB ≤ 343MiB bounds checks dashboard
✅ quality_gate_security_no_fs_load cpu_usage 10/10 23.84 ≤ 100 bounds checks dashboard
✅ quality_gate_security_no_fs_load memory_usage 10/10 320.86MiB ≤ 356MiB bounds checks dashboard

Explanation

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

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

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

CI Pass/Fail Decision

❌ Failed. Some Quality Gates were violated.

  • quality_gate_idle, bounds check intake_connections: 10/10 replicas passed. Gate passed.
  • quality_gate_idle, bounds check memory_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_idle, bounds check total_bytes_received: 10/10 replicas passed. Gate passed.
  • quality_gate_idle_all_features, bounds check intake_connections: 10/10 replicas passed. Gate passed.
  • quality_gate_idle_all_features, bounds check memory_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_idle_all_features, bounds check total_bytes_received: 9/10 replicas passed. Failed 1 which is > 0. Gate FAILED.
  • quality_gate_logs, bounds check intake_connections: 10/10 replicas passed. Gate passed.
  • quality_gate_logs, bounds check memory_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_logs, bounds check missed_bytes: 10/10 replicas passed. Gate passed.
  • quality_gate_logs, bounds check total_bytes_received: 10/10 replicas passed. Gate passed.
  • quality_gate_metrics_logs, bounds check cpu_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_metrics_logs, bounds check intake_connections: 10/10 replicas passed. Gate passed.
  • quality_gate_metrics_logs, bounds check memory_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_metrics_logs, bounds check missed_bytes: 10/10 replicas passed. Gate passed.
  • quality_gate_metrics_logs, bounds check total_bytes_received: 10/10 replicas passed. Gate passed.
  • quality_gate_private_action_runner, bounds check memory_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_security_idle, bounds check cpu_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_security_idle, bounds check memory_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_security_mean_fs_load, bounds check cpu_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_security_mean_fs_load, bounds check memory_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_security_no_fs_load, bounds check cpu_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_security_no_fs_load, bounds check memory_usage: 10/10 replicas passed. Gate passed.

@AliDatadog

Copy link
Copy Markdown
Collaborator Author

Closing temporary SMP spike PR; expected org2 fleet CPU delta (~0.3–0.6%) is not worth pursuing right now.

@AliDatadog AliDatadog closed this Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal Identify a non-fork PR long review PR is complex, plan time to review it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant