netobserv / netobserv-ebpf-agent

Network Observability eBPF Agent
Apache License 2.0
128 stars 33 forks source link

use cached api to retrieve interface name to avoid highcpu #251

Closed msherif1234 closed 8 months ago

msherif1234 commented 8 months ago

Description

use cached APIs and avoid excessive syscalls which showed high cpu utilization

advanced:
  env:
    DEDUPER_JUST_MARK: "false"
    DEDUPER_MERGE: "true" 

Dependencies

n/a

Checklist

If you are not familiar with our processes or don't know what to answer in the list below, let us know in a comment: the maintainers will take care of that.

codecov[bot] commented 8 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (83765d0) 34.06% compared to head (4400d67) 34.03%. Report is 2 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #251 +/- ## ========================================== - Coverage 34.06% 34.03% -0.03% ========================================== Files 39 39 Lines 3508 3502 -6 ========================================== - Hits 1195 1192 -3 + Misses 2243 2241 -2 + Partials 70 69 -1 ``` | [Flag](https://app.codecov.io/gh/netobserv/netobserv-ebpf-agent/pull/251/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=netobserv) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/netobserv/netobserv-ebpf-agent/pull/251/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=netobserv) | `34.03% <100.00%> (-0.03%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=netobserv#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

msherif1234 commented 8 months ago

/ok-to-test

github-actions[bot] commented 8 months ago

New image: quay.io/netobserv/netobserv-ebpf-agent:5e06106

It will expire after two weeks.

To deploy this build, run from the operator repo, assuming the operator is running:

USER=netobserv VERSION=5e06106 make set-agent-image
msherif1234 commented 8 months ago

here is performance results using OCP 4.14 https://docs.google.com/spreadsheets/d/11HBcwLAgDlo3xyCwsKakv4s-Lu5VMkK5oN23ObNufRs/edit#gid=1197991724

jotak commented 8 months ago

/lgtm

msherif1234 commented 8 months ago

/approve

openshift-ci[bot] commented 8 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: msherif1234

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/netobserv/netobserv-ebpf-agent/blob/main/OWNERS)~~ [msherif1234] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment