Repository navigation
feat: estimate offloaded throughput on the API dashboards - #40
Merged
Merged
Conversation
The API collector now keeps the dataplane ibytes/obytes of each physical port as dp_in_octets/dp_out_octets, next to the MAC-level port counters (only when the port block exists, so a missing port counter never reads as zero offload). The general section of both API dashboards gains a "Throughput Received: Dataplane vs Offloaded" panel: dataplane and offloaded (port minus dataplane) stacked, plus the total line. Small platforms refresh the port counters late and in bursts: on a PA-440 without offload, 20 s differences swung by several Mb/s both ways and 2-minute windows still read up to +27%. A burst reads negative then positive in consecutive windows, while real offload stays positive, so the estimate takes the smaller of two consecutive window differences, over windows of at least 2 minutes, floored at 5% of the total. SNMP exposes no dataplane byte counter, so the SNMP dashboards are unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The API dashboards show the total throughput from the MAC-level port counters since v1.4.5, but nothing shows how much of it is hardware-offloaded. During the PA-5580 load test the dataplane
ibytesread ~47 Gb/s and the port counters ~97 Gb/s; the difference was the offloaded UDP.Solution
ibytes/obytesof each physical port asdp_in_octets/dp_out_octets, only when the matchingport/rx-bytes/port/tx-bytesexist (no fake "0 offload" on platforms without the port block). Existing fields are unchanged.Why the smoothing
On the PA-440 (no offload hardware) the port counter is refreshed late and in bursts: 20 s differences swung by up to ±12 Mb/s, and 2-minute windows still read +11.6% and +27.6%. A late refresh reads negative then positive in consecutive windows, real offload stays positive, so min(current, previous) removes it. Trade-off: offload onset shows one window late.
Testing
dp_*fields written for the 3 physical ports only; panel query through Grafana/api/ds/queryreturns Dataplane / Offloaded / Total, offloaded 0 on the PA-440.Not covered
Deploy
Rerun
./generate.shto rebuild the Telegraf image.🤖 Generated with Claude Code