You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
perf(dpdk): reduce pending socket scans and per-completion vector compaction #35
Follow-up to #33 (worker-owned shared-ring progression and sleep coordination). This is a source-based optimization opportunity, not a measured performance result.
Current behavior
DpdkBackend::Impl::SocketCompletions() scans pending connects, accepts, sends, reads, and disconnects on each poll. Non-ready requests repeatedly return EAGAIN. Completed entries are erased individually from vectors, shifting the remaining entries; retiring a large batch can cause quadratic aggregate movement.
Proposed work
Replace repeated middle erases with stable batch compaction or another representation that preserves required ordering and ownership. Audit completion callbacks, reentrant submissions/cancellations, and socket-slot pins before choosing a representation.
Evaluate readiness-driven processing to avoid scanning inactive sockets. Treat this as a separate, larger substep requiring a FreeBSD notification/lifecycle design; batch compaction can land independently.
Acceptance
Benchmark many idle connections, many pending reads/writes, and batches where many requests complete together.
Record request visits, element movement/allocation, instructions per completion, throughput, and p99.
Test mixed ready/non-ready requests, partial writes, EAGAIN, cancellation, close/handle reuse, and callback reentry.
Preserve per-operation completion semantics, fairness, and ownership through terminal callbacks. Do not reorder requests without proving the relevant contract permits it.
State whether only compaction or also readiness-driven scheduling is implemented; the latter is not a prerequisite for the first improvement.
Benchmark reports should identify the tested revision/build and compare instructions, cycles, throughput, and p99 latency where relevant. Record only non-default settings after checking the tested version's defaults. Preserve notification preparation/recheck/cleanup, mailbox wake_seq, DPDK parked handshakes, and pending-I/O sleep vetoes.
Activity