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
Report TCP Failed Connections #25517
base: main
Are you sure you want to change the base?
Conversation
Test changes on VMUse this command from test-infra-definitions to manually test this PR changes on a VM: inv create-vm --pipeline-id=34373326 --os-family=ubuntu |
Regression DetectorRegression Detector ResultsRun ID: 11248801-6d41-4085-9fea-c8f2b3a63b89 Performance changes are noted in the perf column of each table:
No significant changes in experiment optimization goalsConfidence level: 90.00% There were no significant changes in experiment optimization goals at this confidence level and effect size tolerance.
|
perf | experiment | goal | Δ mean % | Δ mean % CI |
---|---|---|---|---|
❌ | file_to_blackhole | % cpu utilization | +29.86 | [+23.71, +36.01] |
Fine details of change detection per experiment
perf | experiment | goal | Δ mean % | Δ mean % CI |
---|---|---|---|---|
❌ | file_to_blackhole | % cpu utilization | +29.86 | [+23.71, +36.01] |
➖ | tcp_syslog_to_blackhole | ingress throughput | +5.87 | [-15.91, +27.65] |
➖ | pycheck_1000_100byte_tags | % cpu utilization | +2.73 | [-2.04, +7.50] |
➖ | basic_py_check | % cpu utilization | +1.30 | [-1.24, +3.85] |
➖ | idle | memory utilization | +0.40 | [+0.36, +0.43] |
➖ | tcp_dd_logs_filter_exclude | ingress throughput | +0.01 | [-0.03, +0.06] |
➖ | uds_dogstatsd_to_api | ingress throughput | +0.01 | [-0.20, +0.21] |
➖ | trace_agent_msgpack | ingress throughput | +0.00 | [-0.00, +0.00] |
➖ | trace_agent_json | ingress throughput | +0.00 | [-0.01, +0.01] |
➖ | otel_to_otel_logs | ingress throughput | -0.15 | [-0.53, +0.23] |
➖ | uds_dogstatsd_to_api_cpu | % cpu utilization | -0.59 | [-3.40, +2.22] |
➖ | file_tree | memory utilization | -0.59 | [-0.71, -0.47] |
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:
-
Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.
-
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.
-
Its configuration does not mark it "erratic".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for ebpf-platform owned files
What does this PR do?
Adds the capability to track TCP connection failure codes and send them in the payload (in conjunction with DataDog/agent-payload#301 and https://github.com/DataDog/dd-go/pull/134764). This feature is disabled by default and is in support of a demo at DASH. Afterwards this will be available via private (invite only) beta.
The overall structure of this code is unfortunately hampered by eBPF stack size constraints which prevent us from adding new fields to the connection stats object in kernelspace. As a result we have to "match" closed and failed connections in userspace which is flaky and some failures may be dropped. Upcoming work by the eBPF platform team (in-buffer batching) will relieve this constraint and this code can be refactored at that point to remove the matching logic and optimize the userspace code.
This was tested using the TCP load test which creates a lot of closed connections. By the nature of this test there are a significant amount of failures as well of varying types. Overall performance degraded slightly as expected, as we are storing more data and doing more business logic to match closed and failed connections.
adding graphs here shortly
This code has the capability to track any
errno
set in theskc_err
field visible intcp_done
. With that said, we are filtering errors in userspace so the backend will only ever see connection Timeouts, Resets, and Refusals.Motivation
https://datadoghq.atlassian.net/browse/NPM-3297
Additional Notes
Unit tests are currently broken and skipped. Ignore them for now please.
Order of Merge
Possible Drawbacks / Trade-offs
Describe how to test/QA your changes