Skip to content

Cap protocol classification attempts per connection - #376

Merged
LouisParkin merged 7 commits into
masterfrom
classification-attempt-cap
Oct 30, 2026
Merged

LouisParkin merged 7 commits into
masterfrom
classification-attempt-cap

Conversation

@LouisParkin

@LouisParkin LouisParkin commented Oct 27, 2026 •

Copy link
Copy Markdown

Fixes #354

This bumps the fork to StackVista/datadog-agent-upstream-for-process-agent#854, which stops classifying a connection whose protocol is never recognised once it has used its budget of data segments. In the local reproduction with 3000 busy connections, this image raised throughput from 26.6 to 32.6 Gbps (42.3 Gbps with the agent off).

Two new environment variables override the budgets. If unset or out of range, the eBPF defaults apply:

  • STS_PROTOCOL_CLASSIFICATION_HANDSHAKE_MAX_SEGMENTS
  • STS_PROTOCOL_CLASSIFICATION_MID_STREAM_MAX_SEGMENTS

The replace points at the merged fork commit 0560f9e3 on stackstate-7.62.2. Also fixes the unrelated csaf module CI breakage: fixes #381.

Pulls in the fork change that stops USM classification of connections
whose protocol is never recognised once they use their budget of
attempts, which removed most of the throughput loss on dense nodes.

STS_PROTOCOL_CLASSIFICATION_HANDSHAKE_BUDGET and
STS_PROTOCOL_CLASSIFICATION_MID_STREAM_BUDGET override the budgets for
connections with and without an observed handshake; unset or out of
range keeps the eBPF defaults.

Fixes #354

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Comment thread config/config.go Outdated
LouisParkin and others added 2 commits October 28, 2026 14:04
Renames the budget settings and env vars to *_MAX_SEGMENTS so the unit
is explicit, matching the fork's per-segment accounting.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Picks up the review fixes in datadog-agent-upstream-for-process-agent#854:
USM shares the tracer's budget map, segments are counted once, and
entries are removed on tcp_close.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Picks up the retry-budget fix from
StackVista/datadog-agent-upstream-for-process-agent#854.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
StackVista/datadog-agent-upstream-for-process-agent#854 is merged as
c5edc213.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
LouisParkin and others added 2 commits October 30, 2026 10:07
The old module path no longer resolves (a new, tagless repo now sits at
it), which fails go mod download in CI. Replaces do not propagate from
dependencies, so this mirrors the fork's replace, and temporarily points
the fork at the replace-csaf-poc branch until that PR merges.

Refs #381

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Picks up the merged csaf replace (fork #855).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@LouisParkin
LouisParkin merged commit 9c2d0b1 into master Oct 30, 2026
10 checks passed
@LouisParkin
LouisParkin deleted the classification-attempt-cap branch October 30, 2026 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI fails: csaf-poc/csaf_distribution v3.0.0 no longer resolvable Investigate process-agent throughput degradation on high-density Kubernetes nodes

3 participants