I'd like to BPF_PERF_OUTPUT() at a high rate (>1000/s), and have these
buffered and read in groups by bcc. But the typical loop we're using:

b["events"].open_perf_buffer(print_event)
while 1:
    b.kprobe_poll()

Wakes up as quick as it can, without much buffering. Lots of context
switching.

I can fix it by inserting a delay:

b["events"].open_perf_buffer(print_event)
while 1:
    sleep(0.1)
    b.kprobe_poll()

Am I crazy? This does seem to work.

Brendan
_______________________________________________
iovisor-dev mailing list
[email protected]
https://lists.iovisor.org/mailman/listinfo/iovisor-dev

Reply via email to