Skip to content

Commit e3a5f58

Browse files
committed
netstacklat: Experiment with 2 nth packet sampling
Sample every 2-nth packet (50%) - Overhead: 6039419756 / 32219314 = 187.44 ns Compared to local atomic-nth overead: 157.67 ns - approx 30 ns extra cost to sample 50% vs 3.12% Signed-off-by: Jesper Dangaard Brouer <hawk@kernel.org>
1 parent da2d609 commit e3a5f58

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/netstacklat.bpf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const __s64 TAI_OFFSET = (37LL * NS_PER_S);
2929
const struct netstacklat_bpf_config user_config = {
3030
.network_ns = 0,
3131
.filter_min_queue_len = 0, /* zero means filter is inactive */
32-
.filter_nth_packet = 32, /* reduce recorded event to every nth packet, use power-of-2 */
32+
.filter_nth_packet = 2, /* reduce recorded event to every nth packet, use power-of-2 */
3333
.filter_pid = false,
3434
.filter_ifindex = true,
3535
.filter_cgroup = true,

0 commit comments

Comments
 (0)