Repository navigation
feat(events-export): EXM - the destination policy, measured (V403) - #392
Merged
Merged
Conversation
Tier EXM of the events export plan (docs/netlink/events-export.md): the flush constants sized from the committed event corpora, and the test that pins the measured shape. TestEventsExportPolicyInputs (pkg/xtcpnl) walks the 7.1.4 oneshot boot window (five pcaps; the base pcap the union of the four family splits, 355 = 66+125+44+120) and the 66 workbench ev rows at both iproute2 versions, and pins: events, datagrams, the per-event body sizes, the peak 100 ms and 1 s windows, and the quiet gaps. The finding that reshaped the tier: one notification per datagram - every corpus, both kernel eras, every family (max events per datagram = 1, asserted over all 71 pcaps). The plan's premise that the kernel batches notifications into one recvmsg is falsified; the flush policy is the batching. The plan text is amended in the same commit. The numbers: the boot flood peaks at 56 events in 100 ms (60 in the worst second); a churn row's whole window peaks at 17; the quiet gaps run to 16.69 s; the event bodies run 40 bytes to 1548, median 40-116. The constants (pkg/xtcp/events_export_policy.go): - EventsFlushIntervalCst = 1 s - the locality consumer's own chosen latency (the 13 close's "within a 1s debounce"); a lone event waits at most this, and the floods never reach it (the rows cap fires first). - EventsFlushThresholdRowsCst = 64 - above the 56-per-100 ms boot peak, ~4x the churn rows' worst window. - EventsFlushThresholdBytesCst = 64 KiB - ~41 of the widest rows; the record path's rows-primary/bytes-secondary pair. The queue needs no events-specific depth: the destination default (16 envelopes) holds over 1.5 s of the measured worst flood. Notes: the test's walk is manual, not WalkNlMsgsHdr, because the latter's seq filter drops exactly the userspace-caused notifications (IsRtnetlinkNotification's documented trap); a zero nlmsghdr is end-of-datagram padding (the oneshot zero-pads its records - base pcap record 515). The crafted monitor files carry no timestamps, so they are EXP's round-trip inputs, not this measurement's. Gates: both full suites, vet both modes, gofmt, lint-baseline, test-goip-docs, netlink-audit, nix-fmt. The host's io_uring and write-timeout tests flickered under load 33-35 through this tier; the interleaved A/B run fails at main and passes with this change in the same minute, and three consecutive full-package runs are green as the load dropped. Next free evidence: V404. 🤖 Generated with [pi](https://github.com/badlogic/pi-mono)
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.
What
Tier EXM of the events export plan (PR #391): the destination policy's constants, sized from the committed event corpora — measured, not copied from the record path (§14's own rule) — and the test that pins the measured shape.
The measurement
TestEventsExportPolicyInputs(pkg/xtcpnl) walks the 7.1.4 oneshot boot window (five pcaps; the base pcap the union of the four family splits, 355 = 66+125+44+120) and the 66 workbench ev rows at both iproute2 versions, pinning: events, datagrams, per-event body sizes, the peak 100 ms and 1 s windows, and the quiet gaps.The finding that reshaped the tier: one notification per datagram — every corpus, both kernel eras, every family (max events per datagram = 1, asserted over all 71 pcaps). The plan's premise that the kernel batches notifications into one recvmsg is falsified; the flush policy is the batching. The plan text is amended in this PR.
The numbers: the boot flood peaks at 56 events in 100 ms (60 in the worst second); a churn row's whole window peaks at 17; the quiet gaps run to 16.69 s; the event bodies run 40 bytes to 1548, median 40–116.
The constants (
pkg/xtcp/events_export_policy.go)EventsFlushIntervalCstEventsFlushThresholdRowsCstEventsFlushThresholdBytesCstThe queue needs no events-specific depth: the destination default (16 envelopes) holds over 1.5 s of the measured worst flood.
Notes
WalkNlMsgsHdr— the latter's seq filter drops exactly the userspace-caused notifications (IsRtnetlinkNotification's documented trap). A zero nlmsghdr is end-of-datagram padding (the oneshot zero-pads its records — base pcap record 515).Gates
Both full suites, vet both modes, gofmt,
lint-baseline(the prealloc findings fixed in code),test-goip-docs,netlink-audit,nix-fmt— green.🤖 Generated with pi