xdp-for-windows icon indicating copy to clipboard operation
xdp-for-windows copied to clipboard

XDP performance counters

Open mtfriesen opened this issue 2 years ago • 3 comments

Expose perf/diagnostics counters. Query using XDP APIs and/or expose through Windows perf counter framework?

mtfriesen avatar Jul 13 '22 19:07 mtfriesen

My opinion: We should not add new non-cross-plat APIs

dthaler avatar Jul 13 '22 19:07 dthaler

expose through Windows perf counter framework?

This makes sense to me. We added perf counters to MsQuic (kernel mode) and they've been useful. At least on Windows, diagnostics at scale is much easier with perf counters.

My opinion: We should not add new non-cross-plat APIs

If we think certain counters are useful when run on Windows, might they also be useful on Linux? Assuming we do converge APIs (which I believe we should), each platform/version of XDP is still independent and will update asynchronously. So, I don't think it's unreasonable for the Windows version to add a new API, that may then carry over to Linux.

nibanks avatar Jul 14 '22 14:07 nibanks

Ideally, we'd surface each counter via all applicable surfaces; native Windows perf counters will be useful for many scenarios, and we're already providing XSK counters via a socket option similar to Linux.

There will be cases where a Windows perf counter is clearly the wrong choice (e.g. a per-socket counter) and others where a cross-platform API is less feasible (e.g. a low-level diagnostic such as "NDIS low resources NBLs dropped" which has no SKB analogue on Linux). In the latter case, the low-level diagnostic should also be attributed in a broader, cross-platform counter, whether just "RX drop" or something similar.

mtfriesen avatar Jul 14 '22 15:07 mtfriesen