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(kafka source): Reorder message consume loop to avoid memory growth #20467

Merged
merged 2 commits into from
May 9, 2024

Conversation

bruceg
Copy link
Member

@bruceg bruceg commented May 9, 2024

This will hopefully address #20403. Commentary is in the code comments.

@bruceg bruceg added type: bug A code related bug. source: kafka Anything `kafka` source related domain: performance Anything related to Vector's performance labels May 9, 2024
@bruceg bruceg requested a review from jszwedko May 9, 2024 15:39
@bruceg bruceg requested a review from a team as a code owner May 9, 2024 15:39
@github-actions github-actions bot added the domain: sources Anything related to the Vector's sources label May 9, 2024
@datadog-vectordotdev
Copy link

datadog-vectordotdev bot commented May 9, 2024

Datadog Report

Branch report: bruceg/fix-kafka-source-ack-leak
Commit report: cd062d1
Test service: vector

✅ 0 Failed, 8 Passed, 0 Skipped, 25.38s Total Time

Copy link
Member

@jszwedko jszwedko left a comment

Choose a reason for hiding this comment

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

Nice! This makes sense to me. I appreciate the code comment explaining why.

@bruceg bruceg enabled auto-merge May 9, 2024 17:52
@bruceg bruceg added this pull request to the merge queue May 9, 2024
Copy link

github-actions bot commented May 9, 2024

Regression Detector Results

Run ID: b15bc223-edfc-40ae-ae99-15535ccec51f
Baseline: 783ed1f
Comparison: 8301101
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_humio_logs ingress throughput +5.30 [+5.08, +5.51]

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI
syslog_humio_logs ingress throughput +5.30 [+5.08, +5.51]
syslog_splunk_hec_logs ingress throughput +4.10 [+3.99, +4.22]
http_text_to_http_json ingress throughput +2.71 [+2.56, +2.87]
fluent_elasticsearch ingress throughput +1.85 [+1.35, +2.34]
syslog_regex_logs2metric_ddmetrics ingress throughput +1.56 [+1.37, +1.75]
otlp_http_to_blackhole ingress throughput +1.24 [+1.11, +1.37]
syslog_log2metric_tag_cardinality_limit_blackhole ingress throughput +1.05 [+0.88, +1.22]
datadog_agent_remap_datadog_logs ingress throughput +1.03 [+0.91, +1.15]
syslog_log2metric_splunk_hec_metrics ingress throughput +0.94 [+0.79, +1.08]
datadog_agent_remap_blackhole ingress throughput +0.87 [+0.77, +0.98]
datadog_agent_remap_datadog_logs_acks ingress throughput +0.74 [+0.66, +0.82]
syslog_loki ingress throughput +0.47 [+0.38, +0.56]
http_to_http_noack ingress throughput +0.12 [+0.05, +0.19]
otlp_grpc_to_blackhole ingress throughput +0.08 [-0.01, +0.18]
http_to_http_json ingress throughput +0.03 [-0.04, +0.11]
splunk_hec_to_splunk_hec_logs_acks ingress throughput +0.01 [-0.13, +0.14]
splunk_hec_indexer_ack_blackhole ingress throughput +0.00 [-0.14, +0.15]
splunk_hec_to_splunk_hec_logs_noack ingress throughput -0.05 [-0.17, +0.06]
enterprise_http_to_http ingress throughput -0.14 [-0.22, -0.07]
http_to_s3 ingress throughput -0.15 [-0.43, +0.13]
http_elasticsearch ingress throughput -0.38 [-0.48, -0.28]
socket_to_socket_blackhole ingress throughput -0.76 [-0.84, -0.67]
syslog_log2metric_humio_metrics ingress throughput -0.79 [-0.93, -0.66]
datadog_agent_remap_blackhole_acks ingress throughput -0.89 [-1.01, -0.76]
http_to_http_acks ingress throughput -1.09 [-2.43, +0.24]
splunk_hec_route_s3 ingress throughput -1.37 [-1.85, -0.89]
file_to_blackhole egress throughput -1.46 [-3.87, +0.94]

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 master with commit 8301101 May 9, 2024
50 checks passed
@bruceg bruceg deleted the bruceg/fix-kafka-source-ack-leak branch May 9, 2024 19:25
@jszwedko jszwedko mentioned this pull request May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain: performance Anything related to Vector's performance domain: sources Anything related to the Vector's sources source: kafka Anything `kafka` source related type: bug A code related bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants