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

Restore performances in filtering case #496

Merged
merged 3 commits into from
Jan 9, 2025

Conversation

jotak
Copy link
Member

@jotak jotak commented Dec 20, 2024

Follow-up on #488

Return early in case of filters being set without any conditional sampling.
As discussed here , some use cases would see a non negligible performance drop if we don't restore an optimal early return.

@jotak jotak requested a review from msherif1234 December 20, 2024 12:33
@jotak jotak added the ok-to-test To set manually when a PR is safe to test. Triggers image build on PR. label Dec 20, 2024
Copy link

New image:
quay.io/netobserv/netobserv-ebpf-agent:7b27021

It will expire after two weeks.

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

USER=netobserv VERSION=7b27021 make set-agent-image

Copy link

codecov bot commented Dec 20, 2024

Codecov Report

Attention: Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.

Project coverage is 29.98%. Comparing base (9e28edf) to head (1045ffe).

Files with missing lines Patch % Lines
pkg/tracer/tracer.go 0.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #496      +/-   ##
==========================================
- Coverage   30.01%   29.98%   -0.04%     
==========================================
  Files          48       48              
  Lines        4828     4833       +5     
==========================================
  Hits         1449     1449              
- Misses       3269     3274       +5     
  Partials      110      110              
Flag Coverage Δ
unittests 29.98% <0.00%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
pkg/tracer/tracer.go 0.00% <0.00%> (ø)

@msherif1234
Copy link
Contributor

/lgtm

if cfg.EnableFlowFilter {
enableFlowFiltering = 1
for _, f := range cfg.FilterConfig {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: we can have this as function in flow_filter.go and call it or even move the flow_filter processing up and let it return the flag not urgent can be done later

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm yes ... while doing that I realize it's not handled in the bpfman case .. I need to duplicate that logic in the operator, for bpfman, right?

@msherif1234
Copy link
Contributor

remember to delete the new const from the spec in NewPacketFetcher

@jotak
Copy link
Member Author

jotak commented Jan 8, 2025

remember to delete the new const from the spec in NewPacketFetcher

@msherif1234 actually, shouldn't I add the same logic in the PacketFetcher code path ?

@msherif1234
Copy link
Contributor

remember to delete the new const from the spec in NewPacketFetcher

@msherif1234 actually, shouldn't I add the same logic in the PacketFetcher code path ?

packetfiltering has sampling on by default and it doesn't support sampling override

@openshift-ci openshift-ci bot removed the lgtm label Jan 8, 2025
@jotak jotak requested a review from msherif1234 January 8, 2025 12:46
@github-actions github-actions bot removed the ok-to-test To set manually when a PR is safe to test. Triggers image build on PR. label Jan 8, 2025
@jotak
Copy link
Member Author

jotak commented Jan 8, 2025

@msherif1234 comments addressed

@msherif1234
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Jan 8, 2025
Copy link

openshift-ci bot commented Jan 8, 2025

@jotak: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/qe-e2e-tests 053e0b7 link false /test qe-e2e-tests

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@msherif1234
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Jan 9, 2025
@msherif1234
Copy link
Contributor

/approve

Copy link

openshift-ci bot commented Jan 9, 2025

[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:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved label Jan 9, 2025
@msherif1234 msherif1234 merged commit 983f777 into netobserv:main Jan 9, 2025
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants