Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tetragon: Add buffer between perf reader and events processing code #593

Merged
merged 2 commits into from
Sep 6, 2023

Commits on Sep 1, 2023

  1. tetragon: Add queue between perf reader and sensor processing code

    Adding extra layer between perf ring buffer reader and event
    processing by sensor code.
    
    Basically it's new channel (default size 65k) that is written by
    perf ringbuffer reader and read by new go routine that processes
    these events.
    
    This way we keep the perf reader fast and we won't get lost events
    if sensor processing code have a hiccup and takes longer.
    
    When the eventsQueue channel is full we drop the event. It's configurable
    by new --rb-queue-size option, the default is 65k.
    
    Signed-off-by: Jiri Olsa <jolsa@kernel.org>
    olsajiri committed Sep 1, 2023
    Configuration menu
    Copy the full SHA
    4e10600 View commit details
    Browse the repository at this point in the history
  2. tetragon: Add events buffer queue metrics

    Adding following metric counters for events buffer queue:
    
      ringbufqueuemetrics.Received - number of records received from perf event reader go routine
      ringbufqueuemetrics.Lost     - number of records lost because the RB Queue channel was full
    
    Signed-off-by: Jiri Olsa <jolsa@kernel.org>
    olsajiri committed Sep 1, 2023
    Configuration menu
    Copy the full SHA
    dcd1faa View commit details
    Browse the repository at this point in the history