-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[EBPF] gpu: associate streams to containers #29651
Conversation
fbfcb8a
to
78c1d24
Compare
Gitlab CI Configuration Changes
|
Removed | Modified | Added | Renamed |
---|---|---|---|
0 | 25 | 0 | 0 |
ℹ️ Diff available in the job log.
Regression DetectorRegression Detector ResultsMetrics dashboard Baseline: ea18ec4 Optimization Goals: ❌ Significant changes detected
|
perf | experiment | goal | Δ mean % | Δ mean % CI | trials | links |
---|---|---|---|---|---|---|
❌ | pycheck_lots_of_tags | % cpu utilization | +5.93 | [+2.22, +9.64] | 1 | Logs |
➖ | basic_py_check | % cpu utilization | +1.54 | [-2.43, +5.51] | 1 | Logs |
➖ | uds_dogstatsd_to_api_cpu | % cpu utilization | +0.47 | [-0.26, +1.19] | 1 | Logs |
➖ | file_to_blackhole_300ms_latency | egress throughput | +0.05 | [-0.13, +0.24] | 1 | Logs |
➖ | file_to_blackhole_0ms_latency | egress throughput | +0.02 | [-0.37, +0.42] | 1 | Logs |
➖ | uds_dogstatsd_to_api | ingress throughput | +0.00 | [-0.10, +0.10] | 1 | Logs |
➖ | tcp_dd_logs_filter_exclude | ingress throughput | -0.00 | [-0.01, +0.01] | 1 | Logs |
➖ | file_to_blackhole_100ms_latency | egress throughput | -0.02 | [-0.29, +0.25] | 1 | Logs |
➖ | file_to_blackhole_500ms_latency | egress throughput | -0.07 | [-0.32, +0.18] | 1 | Logs |
➖ | file_to_blackhole_1000ms_latency | egress throughput | -0.14 | [-0.62, +0.34] | 1 | Logs |
➖ | quality_gate_idle | memory utilization | -0.15 | [-0.20, -0.10] | 1 | Logs bounds checks dashboard |
➖ | tcp_syslog_to_blackhole | ingress throughput | -0.42 | [-0.49, -0.36] | 1 | Logs |
➖ | file_tree | memory utilization | -0.71 | [-0.85, -0.57] | 1 | Logs |
➖ | quality_gate_idle_all_features | memory utilization | -1.02 | [-1.16, -0.89] | 1 | Logs bounds checks dashboard |
Bounds Checks: ❌ Failed
perf | experiment | bounds_check_name | replicates_passed | links |
---|---|---|---|---|
❌ | quality_gate_idle_all_features | memory_usage | 7/10 | bounds checks dashboard |
❌ | quality_gate_idle | memory_usage | 8/10 | bounds checks dashboard |
✅ | file_to_blackhole_0ms_latency | lost_bytes | 10/10 | |
✅ | file_to_blackhole_0ms_latency | memory_usage | 10/10 | |
✅ | file_to_blackhole_1000ms_latency | memory_usage | 10/10 | |
✅ | file_to_blackhole_100ms_latency | lost_bytes | 10/10 | |
✅ | file_to_blackhole_100ms_latency | memory_usage | 10/10 | |
✅ | file_to_blackhole_300ms_latency | memory_usage | 10/10 | |
✅ | file_to_blackhole_500ms_latency | memory_usage | 10/10 |
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:
-
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".
2827374
to
271b115
Compare
78c1d24
to
c45414b
Compare
271b115
to
e549b65
Compare
c45414b
to
d0810e0
Compare
e549b65
to
4e3fbec
Compare
d0810e0
to
45c5358
Compare
4e3fbec
to
aef98c6
Compare
45c5358
to
cc5d8d3
Compare
aef98c6
to
ddf5d34
Compare
cc5d8d3
to
192cb2d
Compare
ddf5d34
to
d1bdec4
Compare
d2c334b
to
d9f98b0
Compare
f49e0c9
to
66f71c3
Compare
db8337f
to
6816098
Compare
23cef2c
to
b9610a3
Compare
ac8fe7e
to
00efe9e
Compare
Test changes on VMUse this command from test-infra-definitions to manually test this PR changes on a VM: inv create-vm --pipeline-id=48584063 --os-family=ubuntu Note: This applies to commit ba51a5a |
00efe9e
to
7ad27e6
Compare
9b82c0c
to
a168bda
Compare
pkg/gpu/consumer.go
Outdated
log.Errorf("error getting container ID for cgroup %s: %s", cgroup, err) | ||
} | ||
metadata := model.ProcessMetadata{ContainerID: containerID} | ||
c.streamHandlers[key] = newStreamHandler(key.pid, c.sysCtx, metadata) |
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 the refactor we do after this, I think the stream handler should probably receive a "process context" object that holds the container ID, the GPU assignment, etc.
pkg/gpu/stats.go
Outdated
@@ -36,7 +36,14 @@ func newStatsGenerator(sysCtx *systemContext, currKTime int64, streamHandlers ma | |||
func (g *statsGenerator) getStats(nowKtime int64) *model.GPUStats { | |||
g.currGenerationKTime = nowKtime | |||
|
|||
pidToMetadata := make(map[uint32]model.ProcessMetadata) |
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.
Same as before. A "process context" object would simplify this.
pkg/collector/corechecks/gpu/gpu.go
Outdated
@@ -154,6 +154,10 @@ func (m *Check) emitSysprobeMetrics(snd sender.Sender) error { | |||
for pid, pidStats := range stats.ProcessStats { | |||
// Per-PID metrics are subject to change due to high cardinality | |||
tags := []string{fmt.Sprintf("pid:%d", pid)} | |||
if pidStats.Metadata.ContainerID != "" { | |||
tags = append(tags, fmt.Sprintf("container_id:%s", pidStats.Metadata.ContainerID)) |
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.
I wonder how useful this tag is by itself, instead of using the containerID to look for all of the container tags from the tagger?
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.
We're removing this part from this PR, we'll add the container tags later using the tagger as you say.
[Fast Unit Tests Report] On pipeline 48584063 (CI Visibility). The following jobs did not run any unit tests: Jobs:
If you modified Go files and expected unit tests to run in these jobs, please double check the job logs. If you think tests should have been executed reach out to #agent-devx-help |
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.
reviewed
/merge |
Devflow running:
|
What does this PR do?
This PR adds container context to the data generated by the GPU monitoring module, getting the cgroup from the eBPF probes.
Motivation
With this data, we will be able to retrieve the correct GPU assigned to each container to properly attribute usage.
EBPF-546
GPU Monitoring RFC
Describe how to test/QA your changes
KMT tests included.
Possible Drawbacks / Trade-offs
Alternatives considered to get the container ID:
workloadmeta
: updates via polling, which means that we might not have container associations ready when we first see a process. Considering we will need container assignment to properly calculate which GPU is associated to a container, this makes this component unusable in our case.tracer.ProcessCache
: this component stores PID->CID assignments using data from the event data stream. For our purposes it's overkill, as it receives events and stores data for all process. GPU active processes will be a minority of those running in a system, so using this would waste computing resources.procfs
. Adds complexity as we need to parseprocfs
, and performance cost as we're doing extra syscalls. However, it would be the alternative the more similar to what we have now.Additional Notes
cgroups.h
file has been moved from the ebpfcheck module to thepkg/ebpf/c
package, so that it can be used by multiple probes without replicating code.cudasample
program in KMT. Related PR to add the image to the prebuilt docker disk: https://github.com/DataDog/ami-builder/pull/207