datadog-agent icon indicating copy to clipboard operation
datadog-agent copied to clipboard

Support macOS local VMs in KMT

Open gjulianm opened this issue 1 year ago • 3 comments

What does this PR do?

This PR adds support for macOS VMs in the KMT framework:

  • Use vmconfig templates to account for differences in OSs and paths
  • Fix configuration paths for macOS
  • Reorganization of certain files in tasks/kernel_matrix_testing to avoid import loops
  • Use libvirt socket path provided by OS configuration
  • Adapt some libvirt calls to macOS requirements
  • Provide initialisation code for VMs in macOS
  • Update KMT Readme
  • Fix kmt.ssh-config tasks for local VMs

Motivation

https://datadoghq.atlassian.net/browse/EBPF-421

Additional Notes

See additional developer documentation: https://datadoghq.atlassian.net/wiki/spaces/EBPFTEAM/pages/3478291163/Local+VM+support+for+KMT

Possible Drawbacks / Trade-offs

Describe how to test/QA your changes

Tested locally with different agent developers using macOS

gjulianm avatar Feb 16 '24 13:02 gjulianm

Bloop Bleep... Dogbot Here

Regression Detector Results

Run ID: 40a1a3ce-e469-40f9-b334-5b680e776fd8 Baseline: b4f0a172d309dc5b7689bc9674e0487e4fd0cf1b Comparison: ab3690a4ed796e279a125864edb7a939c99e2633

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.

Experiments ignored for regressions

Regressions in experiments with settings containing erratic: true are ignored.

perf experiment goal Δ mean % Δ mean % CI
file_to_blackhole % cpu utilization -0.74 [-7.06, +5.58]

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI
basic_py_check % cpu utilization +1.33 [-1.21, +3.88]
file_tree memory utilization +0.08 [-0.01, +0.18]
process_agent_real_time_mode memory utilization +0.03 [-0.01, +0.06]
uds_dogstatsd_to_api ingress throughput +0.00 [-0.00, +0.00]
trace_agent_msgpack ingress throughput -0.00 [-0.00, +0.00]
tcp_dd_logs_filter_exclude ingress throughput -0.00 [-0.00, +0.00]
trace_agent_json ingress throughput -0.00 [-0.01, +0.01]
idle memory utilization -0.02 [-0.05, +0.01]
process_agent_standard_check_with_stats memory utilization -0.29 [-0.32, -0.26]
process_agent_standard_check memory utilization -0.30 [-0.33, -0.27]
tcp_syslog_to_blackhole ingress throughput -0.31 [-0.37, -0.26]
otel_to_otel_logs ingress throughput -0.42 [-1.12, +0.28]
uds_dogstatsd_to_api_cpu % cpu utilization -0.62 [-2.15, +0.90]
file_to_blackhole % cpu utilization -0.74 [-7.06, +5.58]

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] avatar Feb 16 '24 17:02 pr-commenter[bot]

Test changes on VM

Use this command from test-infra-definitions to manually test this PR changes on a VM:

inv create-vm --pipeline-id=30378511 --os-family=ubuntu

pr-commenter[bot] avatar Mar 15 '24 14:03 pr-commenter[bot]

Regression Detector

Regression Detector Results

Run ID: c0d659d4-2c3d-45bd-a49f-014c04ac48a5 Baseline: e327aa9642852f43cf608d3086fe18f84d5aad68 Comparison: 02c6893dc8af879f498b7faebf69368c6356f647

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.

Experiments ignored for regressions

Regressions in experiments with settings containing erratic: true are ignored.

perf experiment goal Δ mean % Δ mean % CI
file_to_blackhole % cpu utilization +1.30 [-5.11, +7.71]

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI
pycheck_1000_100byte_tags % cpu utilization +2.26 [-2.70, +7.21]
file_to_blackhole % cpu utilization +1.30 [-5.11, +7.71]
tcp_syslog_to_blackhole ingress throughput +0.98 [+0.89, +1.07]
file_tree memory utilization +0.72 [+0.62, +0.82]
process_agent_standard_check_with_stats memory utilization +0.27 [+0.24, +0.31]
otel_to_otel_logs ingress throughput +0.26 [-0.16, +0.68]
process_agent_standard_check memory utilization +0.12 [+0.09, +0.16]
trace_agent_msgpack ingress throughput +0.00 [-0.00, +0.00]
uds_dogstatsd_to_api ingress throughput -0.00 [-0.20, +0.20]
trace_agent_json ingress throughput -0.01 [-0.03, +0.02]
tcp_dd_logs_filter_exclude ingress throughput -0.03 [-0.06, +0.00]
process_agent_real_time_mode memory utilization -0.19 [-0.23, -0.14]
idle memory utilization -0.23 [-0.27, -0.19]
basic_py_check % cpu utilization -1.05 [-3.44, +1.33]
uds_dogstatsd_to_api_cpu % cpu utilization -1.59 [-4.28, +1.09]

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] avatar Mar 15 '24 14:03 pr-commenter[bot]

/trigger-ci

gjulianm avatar Mar 18 '24 14:03 gjulianm

:steam_locomotive: Gitlab pipeline started

Started pipeline #30296275

dd-devflow[bot] avatar Mar 18 '24 14:03 dd-devflow[bot]

/trigger-ci

gjulianm avatar Mar 19 '24 15:03 gjulianm

:steam_locomotive: Gitlab pipeline started

Started pipeline #30378511

dd-devflow[bot] avatar Mar 19 '24 15:03 dd-devflow[bot]

/merge

gjulianm avatar Mar 19 '24 18:03 gjulianm

:steam_locomotive: MergeQueue

Pull request added to the queue.

This build is next! (estimated merge in less than 28m)

Use /merge -c to cancel this operation!

dd-devflow[bot] avatar Mar 19 '24 18:03 dd-devflow[bot]