On Linux, one-collect currently polls the perf ring buffer on a fixed sleep interval when no data is available. The perf subsystem supports event-driven wakeup via a configurable byte watermark - the kernel signals the perf fd only when enough data has accumulated, eliminating unnecessary polling.
Supporting this would allow callers to tune the latency/throughput tradeoff:
- Low watermark -> wake on every event, minimum latency
- High watermark -> amortize wakeup cost, better throughput at scale
On Linux, one-collect currently polls the perf ring buffer on a fixed sleep interval when no data is available. The perf subsystem supports event-driven wakeup via a configurable byte watermark - the kernel signals the perf fd only when enough data has accumulated, eliminating unnecessary polling.
Supporting this would allow callers to tune the latency/throughput tradeoff: