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

chore(data model): Wrap metric tag mapping with Arc #15704

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bruceg
Copy link
Member

@bruceg bruceg commented Dec 22, 2022

The tag key:value mappings in a metric is the most expensive data structure in that type. This change wraps that data in a reference counted allocation, under the assumption that it will change little once it is initially created though the surrounding metric may be cloned repeatedly.

This is a proposed optimization similar to #11166

Note that the config bits include two very prominent bits that need fixing in the handling of metadata for Arc-wrapped data types.

The tag key:value mappings in a metric is the most expensive data structure in
that type. This change wraps that data in a reference counted allocation, under
the assumption that it will change little once it is initially created though
the surrounding metric may be cloned repeatedly.
@bruceg bruceg added type: tech debt A code change that does not add user value. domain: performance Anything related to Vector's performance domain: data model Anything related to Vector's internal data model domain: metrics Anything related to Vector's metrics events labels Dec 22, 2022
@bruceg bruceg requested a review from a team December 22, 2022 21:27
@netlify
Copy link

netlify bot commented Dec 22, 2022

Deploy Preview for vector-project ready!

Name Link
🔨 Latest commit 5b2ab6a
🔍 Latest deploy log https://app.netlify.com/sites/vector-project/deploys/63a4cbae9ac9a000081d0e62
😎 Deploy Preview https://deploy-preview-15704--vector-project.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Dec 22, 2022

Deploy Preview for vrl-playground ready!

Name Link
🔨 Latest commit 5b2ab6a
🔍 Latest deploy log https://app.netlify.com/sites/vrl-playground/deploys/63a4cbae8b19000008e35ec1
😎 Deploy Preview https://deploy-preview-15704--vrl-playground.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@github-actions github-actions bot added the domain: core Anything related to core crates i.e. vector-core, core-common, etc label Dec 22, 2022
@github-actions
Copy link

Regression Test Results

Run ID: 9101edb6-1d69-4697-bee6-9f8bdedcd2b5
Baseline: c122394
Comparison: 5b2ab6a
Total vector CPUs: 7

Explanation

A regression test is an integrated performance test for vector in a repeatable rig, with varying configuration for vector. What follows is a statistical summary of a brief vector run for each configuration across SHAs given above. The goal of these tests are to determine, quickly, if vector performance is changed and to what degree by a pull request. Where appropriate units are scaled per-core.

The table below, if present, lists those experiments that have experienced a statistically significant change in their bytes_written_per_cpu_second performance between baseline and comparision SHAs, with 90.0% confidence OR have been detected as newly erratic. Negative values mean that baseline is faster, positive comparison. Results that do not exhibit more than a ±5% change in mean bytes_written_per_cpu_second are discarded. An experiment is erratic if its coefficient of variation is greater than 0.1. The abbreviated table will be omitted if no interesting changes are observed.

No interesting changes in bytes_written_per_cpu_second with confidence ≥ 90.00% and absolute Δ mean >= ±5%.

Fine details of change detection per experiment.
experiment Δ mean Δ mean % confidence baseline mean baseline stdev baseline stderr baseline outlier % baseline CoV comparison mean comparison stdev comparison stderr comparison outlier % comparison CoV erratic declared erratic
syslog_log2metric_humio_metrics 123.9KiB/CPU-s 2.02 100.00% 5.99MiB/CPU-s 118.89KiB/CPU-s 1.53KiB/CPU-s 0.0 0.019384 6.11MiB/CPU-s 134.53KiB/CPU-s 1.74KiB/CPU-s 0.0 0.0215 False False
datadog_agent_remap_datadog_logs 336.34KiB/CPU-s 0.97 100.00% 34.03MiB/CPU-s 1.17MiB/CPU-s 15.43KiB/CPU-s 0.0 0.034318 34.36MiB/CPU-s 1.1MiB/CPU-s 14.52KiB/CPU-s 0.0 0.031985 False False
socket_to_socket_blackhole 95.21KiB/CPU-s 0.68 100.00% 13.61MiB/CPU-s 219.92KiB/CPU-s 2.84KiB/CPU-s 0.0 0.015773 13.71MiB/CPU-s 165.01KiB/CPU-s 2.13KiB/CPU-s 0.0 0.011754 False False
otlp_http_to_blackhole 8.35KiB/CPU-s 0.53 99.99% 1.53MiB/CPU-s 115.72KiB/CPU-s 1.49KiB/CPU-s 0.0 0.07376 1.54MiB/CPU-s 118.56KiB/CPU-s 1.53KiB/CPU-s 0.0 0.075166 False False
datadog_agent_remap_datadog_logs_acks 115.02KiB/CPU-s 0.33 100.00% 33.8MiB/CPU-s 1.07MiB/CPU-s 14.14KiB/CPU-s 0.0 0.031654 33.91MiB/CPU-s 989.51KiB/CPU-s 12.77KiB/CPU-s 0.0 0.028494 False False
http_text_to_http_json 69.92KiB/CPU-s 0.27 100.00% 25.29MiB/CPU-s 575.63KiB/CPU-s 7.43KiB/CPU-s 0.0 0.022226 25.36MiB/CPU-s 527.0KiB/CPU-s 6.8KiB/CPU-s 0.0 0.020294 False False
syslog_loki 9.68KiB/CPU-s 0.11 98.63% 8.36MiB/CPU-s 236.99KiB/CPU-s 3.06KiB/CPU-s 0.0 0.027684 8.37MiB/CPU-s 190.82KiB/CPU-s 2.46KiB/CPU-s 0.0 0.022265 False False
otlp_grpc_to_blackhole 666.76B/CPU-s 0.06 55.37% 1.02MiB/CPU-s 40.8KiB/CPU-s 539.34B/CPU-s 0.0 0.038987 1.02MiB/CPU-s 52.18KiB/CPU-s 689.55B/CPU-s 0.0 0.049831 False False
syslog_humio_logs 4.85KiB/CPU-s 0.05 97.03% 8.82MiB/CPU-s 152.53KiB/CPU-s 1.97KiB/CPU-s 0.0 0.016883 8.83MiB/CPU-s 81.42KiB/CPU-s 1.05KiB/CPU-s 0.0 0.009007 False False
enterprise_http_to_http 6.16KiB/CPU-s 0.04 83.35% 13.62MiB/CPU-s 286.01KiB/CPU-s 3.69KiB/CPU-s 0.0 0.020511 13.62MiB/CPU-s 193.02KiB/CPU-s 2.49KiB/CPU-s 0.0 0.013837 False False
splunk_hec_to_splunk_hec_logs_noack 4.71KiB/CPU-s 0.03 77.19% 13.62MiB/CPU-s 231.91KiB/CPU-s 2.99KiB/CPU-s 0.0 0.016626 13.63MiB/CPU-s 194.78KiB/CPU-s 2.51KiB/CPU-s 0.0 0.013959 False False
fluent_elasticsearch 86.67B/CPU-s 0.0 12.38% 45.41MiB/CPU-s 29.57KiB/CPU-s 386.55B/CPU-s 0.0 0.000636 45.41MiB/CPU-s 30.61KiB/CPU-s 400.24B/CPU-s 0.0 0.000658 False False
http_to_http_noack -2.03KiB/CPU-s -0.01 27.04% 13.61MiB/CPU-s 311.17KiB/CPU-s 4.02KiB/CPU-s 0.0 0.02232 13.61MiB/CPU-s 333.14KiB/CPU-s 4.3KiB/CPU-s 0.0 0.023899 False False
splunk_hec_indexer_ack_blackhole -798.41B/CPU-s -0.01 13.52% 13.62MiB/CPU-s 249.78KiB/CPU-s 3.22KiB/CPU-s 0.0 0.017911 13.62MiB/CPU-s 252.24KiB/CPU-s 3.25KiB/CPU-s 0.0 0.018088 False False
file_to_blackhole -11.03KiB/CPU-s -0.02 41.61% 54.5MiB/CPU-s 1.04MiB/CPU-s 13.73KiB/CPU-s 0.0 0.019077 54.49MiB/CPU-s 1.12MiB/CPU-s 14.73KiB/CPU-s 0.0 0.020484 False False
splunk_hec_to_splunk_hec_logs_acks -2.44KiB/CPU-s -0.02 30.49% 13.62MiB/CPU-s 342.88KiB/CPU-s 4.42KiB/CPU-s 0.0 0.024588 13.61MiB/CPU-s 339.49KiB/CPU-s 4.38KiB/CPU-s 0.0 0.024349 False False
http_to_http_json -24.3KiB/CPU-s -0.17 100.00% 13.62MiB/CPU-s 208.31KiB/CPU-s 2.69KiB/CPU-s 0.0 0.014933 13.6MiB/CPU-s 250.55KiB/CPU-s 3.23KiB/CPU-s 0.0 0.017992 False False
splunk_hec_route_s3 -36.61KiB/CPU-s -0.3 99.99% 11.91MiB/CPU-s 533.59KiB/CPU-s 6.88KiB/CPU-s 0.0 0.043765 11.87MiB/CPU-s 522.72KiB/CPU-s 6.75KiB/CPU-s 0.0 0.043002 False False
datadog_agent_remap_blackhole -185.04KiB/CPU-s -0.58 100.00% 31.23MiB/CPU-s 826.81KiB/CPU-s 10.68KiB/CPU-s 0.0 0.02585 31.05MiB/CPU-s 895.09KiB/CPU-s 11.55KiB/CPU-s 0.0 0.028148 False False
datadog_agent_remap_blackhole_acks -263.07KiB/CPU-s -0.81 100.00% 31.67MiB/CPU-s 638.68KiB/CPU-s 8.25KiB/CPU-s 0.0 0.019693 31.41MiB/CPU-s 862.64KiB/CPU-s 11.14KiB/CPU-s 0.0 0.026815 False False
syslog_splunk_hec_logs -80.17KiB/CPU-s -0.88 100.00% 8.85MiB/CPU-s 112.74KiB/CPU-s 1.46KiB/CPU-s 0.0 0.01244 8.77MiB/CPU-s 175.26KiB/CPU-s 2.26KiB/CPU-s 0.0 0.019511 False False
http_to_http_acks -50.41KiB/CPU-s -0.94 67.08% 5.24MiB/CPU-s 2.73MiB/CPU-s 36.03KiB/CPU-s 0.0 0.520464 5.19MiB/CPU-s 2.8MiB/CPU-s 37.02KiB/CPU-s 0.0 0.539745 True False
syslog_regex_logs2metric_ddmetrics -69.34KiB/CPU-s -1.9 100.00% 3.57MiB/CPU-s 387.06KiB/CPU-s 5.0KiB/CPU-s 0.0 0.105851 3.5MiB/CPU-s 351.7KiB/CPU-s 4.54KiB/CPU-s 0.0 0.098041 True False
syslog_log2metric_splunk_hec_metrics -192.33KiB/CPU-s -2.04 100.00% 9.2MiB/CPU-s 139.94KiB/CPU-s 1.81KiB/CPU-s 0.0 0.014848 9.02MiB/CPU-s 208.36KiB/CPU-s 2.69KiB/CPU-s 0.0 0.022568 False False

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain: core Anything related to core crates i.e. vector-core, core-common, etc domain: data model Anything related to Vector's internal data model domain: metrics Anything related to Vector's metrics events domain: performance Anything related to Vector's performance type: tech debt A code change that does not add user value.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant