enhancement(io): rework how framing interacts with I/O buffers#983
enhancement(io): rework how framing interacts with I/O buffers#983
Conversation
Regression Detector (Agent Data Plane)Regression Detector ResultsRun ID: a22c8a00-c443-4b6e-8215-6ceb2a42006d Baseline: 2b02146 ❌ Experiments with retried target crashesThis is a critical error. One or more replicates failed with a non-zero exit code. These replicates may have been retried. See Replicate Execution Details for more information.
Optimization Goals: ✅ Improvement(s) detected
|
| perf | experiment | goal | Δ mean % | Δ mean % CI | trials | links |
|---|---|---|---|---|---|---|
| ❌ | otlp_ingest_logs_5mb_memory | memory utilization | +8.48 | [+7.96, +9.00] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_logs_5mb_throughput | ingress throughput | -0.02 | [-0.14, +0.11] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_logs_5mb_cpu | % cpu utilization | -0.16 | [-5.46, +5.13] | 1 | (metrics) (profiles) (logs) |
Fine details of change detection per experiment
| perf | experiment | goal | Δ mean % | Δ mean % CI | trials | links |
|---|---|---|---|---|---|---|
| ✅ | dsd_uds_500mb_3k_contexts_throughput | ingress throughput | +8.83 | [+8.70, +8.96] | 1 | (metrics) (profiles) (logs) |
| ❌ | otlp_ingest_logs_5mb_memory | memory utilization | +8.48 | [+7.96, +9.00] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_1mb_3k_contexts_cpu | % cpu utilization | +6.15 | [-49.32, +61.62] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_metrics_5mb_memory | memory utilization | +3.56 | [+3.33, +3.80] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_traces_5mb_cpu | % cpu utilization | +3.43 | [+1.24, +5.62] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_metrics_5mb_cpu | % cpu utilization | +2.74 | [-3.24, +8.73] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_500mb_3k_contexts_memory | memory utilization | +1.21 | [+1.02, +1.40] | 1 | (metrics) (profiles) (logs) |
| ➖ | quality_gates_rss_dsd_low | memory utilization | +0.74 | [+0.57, +0.90] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_1mb_3k_contexts_memory | memory utilization | +0.55 | [+0.36, +0.73] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_100mb_3k_contexts_memory | memory utilization | +0.19 | [-0.01, +0.39] | 1 | (metrics) (profiles) (logs) |
| ➖ | quality_gates_rss_dsd_heavy | memory utilization | +0.16 | [+0.03, +0.28] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_512kb_3k_contexts_memory | memory utilization | +0.03 | [-0.15, +0.21] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_100mb_3k_contexts_throughput | ingress throughput | +0.02 | [-0.03, +0.08] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_10mb_3k_contexts_throughput | ingress throughput | +0.01 | [-0.15, +0.16] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_traces_5mb_throughput | ingress throughput | -0.00 | [-0.02, +0.02] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_1mb_3k_contexts_throughput | ingress throughput | -0.00 | [-0.06, +0.05] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_512kb_3k_contexts_throughput | ingress throughput | -0.00 | [-0.06, +0.05] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_logs_5mb_throughput | ingress throughput | -0.02 | [-0.14, +0.11] | 1 | (metrics) (profiles) (logs) |
| ➖ | quality_gates_rss_dsd_medium | memory utilization | -0.02 | [-0.21, +0.16] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_metrics_5mb_throughput | ingress throughput | -0.04 | [-0.17, +0.09] | 1 | (metrics) (profiles) (logs) |
| ➖ | quality_gates_rss_dsd_ultraheavy | memory utilization | -0.13 | [-0.27, +0.01] | 1 | (metrics) (profiles) (logs) |
| ➖ | quality_gates_rss_idle | memory utilization | -0.13 | [-0.18, -0.08] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_10mb_3k_contexts_memory | memory utilization | -0.14 | [-0.34, +0.06] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_logs_5mb_cpu | % cpu utilization | -0.16 | [-5.46, +5.13] | 1 | (metrics) (profiles) (logs) |
| ➖ | otlp_ingest_traces_5mb_memory | memory utilization | -0.45 | [-0.73, -0.16] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_500mb_3k_contexts_cpu | % cpu utilization | -0.61 | [-1.94, +0.73] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_512kb_3k_contexts_cpu | % cpu utilization | -3.43 | [-58.63, +51.77] | 1 | (metrics) (profiles) (logs) |
| ➖ | dsd_uds_10mb_3k_contexts_cpu | % cpu utilization | -6.35 | [-36.11, +23.41] | 1 | (metrics) (profiles) (logs) |
| ✅ | dsd_uds_100mb_3k_contexts_cpu | % cpu utilization | -6.90 | [-12.79, -1.01] | 1 | (metrics) (profiles) (logs) |
Bounds Checks: ✅ Passed
| perf | experiment | bounds_check_name | replicates_passed | links |
|---|---|---|---|---|
| ✅ | quality_gates_rss_dsd_heavy | memory_usage | 10/10 | (metrics) (profiles) (logs) |
| ✅ | quality_gates_rss_dsd_low | memory_usage | 10/10 | (metrics) (profiles) (logs) |
| ✅ | quality_gates_rss_dsd_medium | memory_usage | 10/10 | (metrics) (profiles) (logs) |
| ✅ | quality_gates_rss_dsd_ultraheavy | memory_usage | 10/10 | (metrics) (profiles) (logs) |
| ✅ | quality_gates_rss_idle | memory_usage | 10/10 | (metrics) (profiles) (logs) |
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".
Replicate Execution Details
We run multiple replicates for each experiment/variant. However, we allow replicates to be automatically retried if there are any failures, up to 8 times, at which point the replicate is marked dead and we are unable to run analysis for the entire experiment. We call each of these attempts at running replicates a replicate execution. This section lists all replicate executions that failed due to the target crashing or being oom killed.
Note: In the below tables we bucket failures by experiment, variant, and failure type. For each of these buckets we list out the replicate indexes that failed with an annotation signifying how many times said replicate failed with the given failure mode. In the below example the baseline variant of the experiment named experiment_with_failures had two replicates that failed by oom kills. Replicate 0, which failed 8 executions, and replicate 1 which failed 6 executions, all with the same failure mode.
| Experiment | Variant | Replicates | Failure | Logs | Debug Dashboard |
|---|---|---|---|---|---|
| experiment_with_failures | baseline | 0 (x8) 1 (x6) | Oom killed | Debug Dashboard |
The debug dashboard links will take you to a debugging dashboard specifically designed to investigate replicate execution failures.
❌ Retried Normal Replicate Execution Failures (non-profiling)
| Experiment | Variant | Replicates | Failure | Debug Dashboard |
|---|---|---|---|---|
| otlp_ingest_metrics_5mb_throughput | comparison | 8 | Failed to shutdown when requested | Debug Dashboard |
| otlp_ingest_traces_5mb_cpu | comparison | 9 | Failed to shutdown when requested | Debug Dashboard |
| quality_gates_rss_dsd_low | comparison | 6 | Failed to shutdown when requested | Debug Dashboard |
| quality_gates_rss_dsd_ultraheavy | comparison | 7 | Failed to shutdown when requested | Debug Dashboard |
5d9fb67 to
1410ea6
Compare
lukesteensen
left a comment
There was a problem hiding this comment.
I can't say I've really internalized how it works, but I think I get it and it seems reasonable 😅
| // Figure out how far the buffer view has been advanced and advance the underlying buffer | ||
| // by that many bytes, which keeps things consistent. | ||
| let advance_by = self.0.borrow_buf().remaining() - self.0.borrow_iter().buf_len(); |
There was a problem hiding this comment.
Does the remaining call here match with the use of chunk above? Seems like it could be wrong for non-contiguous buffers. It could be simpler to just keep track of how much we consume directly.
There was a problem hiding this comment.
You're right on both fronts.
We never use non-contiguous buffers on the ingest side (BytesBuffer) so our usage of Buf here is somewhat loose here: this should be correct, but may not always be.
We could tie to more directly to BytesBuffer and revisit this generic approach later on if necessary, or we could do the bit you mentioned about tracking it directly... but I'm not sure I grok what you're envisioning there. Could you give a little more detail on that idea?
There was a problem hiding this comment.
Sorry, just realized I had a diff for this and totally forgot to respond 😞
Pushed to a branch here, feel free to take it or leave it. Claude added some tests and things you may or may not care about.
1410ea6 to
8b75c42
Compare
9bdc522 to
3af664a
Compare
Binary Size Analysis (Agent Data Plane)Target: 2b02146 (baseline) vs cf6bd87 (comparison) diff
|
| Module | File Size | Symbols |
|---|---|---|
saluki_components::sources::dogstatsd |
-8.61 KiB | 6 |
saluki_io::deser::framing |
-2.95 KiB | 20 |
[Unmapped] |
+2.71 KiB | 1 |
bytes |
-1.52 KiB | 7 |
core |
+1.04 KiB | 38 |
hyper_rustls |
-505 B | 2 |
saluki_io::buf::vec |
-192 B | 1 |
[sections] |
-189 B | 7 |
saluki_common::task::instrument |
-146 B | 2 |
h2 |
+90 B | 7 |
hyper |
-81 B | 2 |
saluki_components::common::datadog |
-60 B | 1 |
saluki_io::net::client |
-60 B | 1 |
unicode_segmentation |
-48 B | 1 |
hickory_proto |
+43 B | 11 |
__finalized.1738 |
-24 B | 1 |
tokio |
+14 B | 32 |
saluki_components::sources::otlp |
+5 B | 1 |
std |
-4 B | 15 |
agent_data_plane::internal::remote_agent |
-3 B | 1 |
Detailed Symbol Changes
FILE SIZE VM SIZE
-------------- --------------
[NEW] +17.6Ki [NEW] +17.5Ki _<saluki_common::task::instrument::InstrumentedTask<F> as core::future::future::Future>::poll::h667ef4daee0ab193
[NEW] +9.34Ki [NEW] +9.15Ki _<saluki_components::sources::dogstatsd::DogStatsD as saluki_core::components::sources::Source>::run::_{{closure}}::h03e2f754767dbe2e
[NEW] +5.13Ki [NEW] +5.00Ki <hickory_proto::rr::record_data::RData as core::clone::Clone>::clone.11464
[NEW] +4.71Ki [NEW] +4.59Ki <rustls::error::Error as core::clone::Clone>::clone.11429
[NEW] +3.83Ki [NEW] +3.71Ki <webpki::error::Error as core::fmt::Debug>::fmt.11626
[NEW] +3.57Ki [NEW] +3.45Ki <rustls::error::Error as core::fmt::Debug>::fmt.11430
+93% +2.71Ki [ = ] 0 [Unmapped]
[NEW] +1.79Ki [NEW] +1.65Ki <tonic::transport::channel::endpoint::Endpoint as core::clone::Clone>::clone.13194
[NEW] +1.57Ki [NEW] +1.50Ki tokio::runtime::task::raw::poll::h8ae0139d00aaf8e1
[NEW] +1.54Ki [NEW] +1.46Ki tokio::runtime::task::raw::poll::h141b155b261cedb3
[DEL] -1.54Ki [DEL] -1.46Ki tokio::runtime::task::raw::poll::ha188c6dffca733f0
[DEL] -1.57Ki [DEL] -1.50Ki tokio::runtime::task::raw::poll::h216e0a17c8efef6a
[DEL] -1.79Ki [DEL] -1.65Ki <tonic::transport::channel::endpoint::Endpoint as core::clone::Clone>::clone.13208
[DEL] -3.57Ki [DEL] -3.45Ki <rustls::error::Error as core::fmt::Debug>::fmt.11444
[DEL] -3.83Ki [DEL] -3.71Ki <webpki::error::Error as core::fmt::Debug>::fmt.11640
-0.3% -4.38Ki -0.2% -2.05Ki [229 Others]
[DEL] -4.71Ki [DEL] -4.59Ki <rustls::error::Error as core::clone::Clone>::clone.11443
[DEL] -5.13Ki [DEL] -5.00Ki <hickory_proto::rr::record_data::RData as core::clone::Clone>::clone.11478
-26.5% -8.71Ki -26.6% -8.71Ki saluki_components::sources::dogstatsd::drive_stream::_{{closure}}::h7a0b9c0eda95cb0d
[DEL] -9.28Ki [DEL] -9.09Ki _<saluki_components::sources::dogstatsd::DogStatsD as saluki_core::components::sources::Source>::run::_{{closure}}::h7acbbb6388dcee1a
[DEL] -17.8Ki [DEL] -17.6Ki _<saluki_common::task::instrument::InstrumentedTask<F> as core::future::future::Future>::poll::he2ecef1bad274487
-0.0% -10.5Ki -0.0% -10.8Ki TOTAL
0ed1380 to
2da0414
Compare
76ba3fa to
cf6bd87
Compare

Summary
Work in progress.
Change Type
How did you test this PR?
References