Skip to content
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

fix(host_metrics source): Include cgroups2 root memory metrics #20294

Merged

Conversation

bwerthmann
Copy link
Contributor

@bwerthmann bwerthmann commented Apr 12, 2024

  • cgroup_memory_anon_bytes and cgroup_memory_file_bytes are no longer zero on cgroups v2 systems
  • test sources::host_metrics::cgroups::tests::generates_cgroups_metrics should no longer flap

I'm not sure why the is_root check was there for cgroups v2. Memory is only in the root cgroup dir. No child dirs exist in cgroup root on my machine.

Fixes #18697

* cgroup_memory_anon_bytes and cgroup_memory_file_bytes are no longer
  zero on cgroups v2 systems
* test sources::host_metrics::cgroups::tests::generates_cgroups_metrics
  should no longer flap

I'm not sure why the is_root check was there for cgroups v2. Memory is
only in the root cgroup dir. No child dirs exist in cgroup root on my machine.
@bwerthmann bwerthmann requested a review from a team as a code owner April 12, 2024 17:11
@bits-bot
Copy link

bits-bot commented Apr 12, 2024

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions bot added the domain: sources Anything related to the Vector's sources label Apr 12, 2024
@bruceg bruceg self-requested a review April 17, 2024 18:24
@jszwedko
Copy link
Member

Thanks for this @bwerthmann ! We'll review soon.

@jszwedko jszwedko added the no-changelog Changes in this PR do not need user-facing explanations in the release changelog label Apr 17, 2024
@bruceg bruceg changed the title fix(host_metrics source): cgroups2 memeory metrics from root fix(host_metrics source): Include cgroups2 root memory metrics Apr 22, 2024
Copy link
Member

@bruceg bruceg left a comment

Choose a reason for hiding this comment

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

Thanks for this fix @bwerthmann. Your explanation makes sense to me. I wrote this initially, and checked the logs as well, and have no evidence why the root check was in there.

@bruceg bruceg added this pull request to the merge queue Apr 22, 2024
Copy link

Regression Detector Results

Run ID: 32c0e992-b4c4-4ef7-afaa-d19a8ef36269
Baseline: 69f985d
Comparison: 0efb520
Total CPUs: 7

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

Significant changes in experiment optimization goals

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

perf experiment goal Δ mean % Δ mean % CI
syslog_regex_logs2metric_ddmetrics ingress throughput +8.32 [+8.14, +8.50]

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI
syslog_regex_logs2metric_ddmetrics ingress throughput +8.32 [+8.14, +8.50]
otlp_http_to_blackhole ingress throughput +2.95 [+2.82, +3.08]
socket_to_socket_blackhole ingress throughput +2.84 [+2.75, +2.92]
syslog_log2metric_tag_cardinality_limit_blackhole ingress throughput +2.46 [+2.34, +2.58]
syslog_humio_logs ingress throughput +1.91 [+1.72, +2.11]
http_to_http_acks ingress throughput +1.67 [+0.31, +3.04]
http_text_to_http_json ingress throughput +1.10 [+0.95, +1.24]
datadog_agent_remap_blackhole_acks ingress throughput +1.09 [+0.95, +1.23]
syslog_log2metric_splunk_hec_metrics ingress throughput +0.80 [+0.65, +0.96]
datadog_agent_remap_datadog_logs_acks ingress throughput +0.77 [+0.69, +0.85]
splunk_hec_route_s3 ingress throughput +0.53 [+0.04, +1.01]
datadog_agent_remap_datadog_logs ingress throughput +0.48 [+0.35, +0.60]
syslog_loki ingress throughput +0.20 [+0.10, +0.29]
http_to_http_noack ingress throughput +0.17 [+0.07, +0.26]
http_elasticsearch ingress throughput +0.07 [-0.01, +0.16]
http_to_http_json ingress throughput +0.04 [-0.04, +0.11]
splunk_hec_indexer_ack_blackhole ingress throughput +0.00 [-0.14, +0.15]
splunk_hec_to_splunk_hec_logs_acks ingress throughput +0.00 [-0.14, +0.14]
splunk_hec_to_splunk_hec_logs_noack ingress throughput -0.04 [-0.15, +0.08]
enterprise_http_to_http ingress throughput -0.12 [-0.20, -0.05]
datadog_agent_remap_blackhole ingress throughput -0.16 [-0.26, -0.05]
http_to_s3 ingress throughput -0.43 [-0.71, -0.15]
file_to_blackhole egress throughput -0.57 [-3.02, +1.88]
syslog_log2metric_humio_metrics ingress throughput -0.60 [-0.71, -0.49]
syslog_splunk_hec_logs ingress throughput -0.60 [-0.72, -0.48]
otlp_grpc_to_blackhole ingress throughput -0.77 [-0.86, -0.69]
fluent_elasticsearch ingress throughput -0.86 [-1.35, -0.38]

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

Merged via the queue into vectordotdev:master with commit 0efb520 Apr 22, 2024
53 of 55 checks passed
@bwerthmann bwerthmann deleted the fix-cgroups2-generates_cgroups_metrics branch April 22, 2024 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain: sources Anything related to the Vector's sources no-changelog Changes in this PR do not need user-facing explanations in the release changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Some tests fail with 0.33.0 (sources::host_metrics::cgroups::tests::generates_cgroups_metrics)
4 participants