Closed msherif1234 closed 3 months ago
@msherif1234: This pull request references NETOBSERV-559 which is a valid jira issue.
Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.16.0" version, but no target version was set.
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: Once this PR has been reviewed and has the lgtm label, please ask for approval from msherif1234. For more information see the Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.
Attention: Patch coverage is 0%
with 90 lines
in your changes are missing coverage. Please review.
Project coverage is 33.44%. Comparing base (
b63f483
) to head (edd8134
). Report is 1 commits behind head on main.:exclamation: Current head edd8134 differs from pull request most recent head 5fdf081. Consider uploading reports for the commit 5fdf081 to get more accurate results
Files | Patch % | Lines |
---|---|---|
pkg/ebpf/tracer_batchapis.go | 0.00% | 57 Missing :warning: |
pkg/ebpf/tracer.go | 0.00% | 33 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@msherif1234: This pull request references NETOBSERV-559 which is a valid jira issue.
Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.16.0" version, but no target version was set.
/ok-to-test
New image: quay.io/netobserv/netobserv-ebpf-agent:6d184cc
It will expire after two weeks.
To deploy this build, run from the operator repo, assuming the operator is running:
USER=netobserv VERSION=6d184cc make set-agent-image
/ok-to-test
New image: quay.io/netobserv/netobserv-ebpf-agent:bfa5ac7
It will expire after two weeks.
To deploy this build, run from the operator repo, assuming the operator is running:
USER=netobserv VERSION=bfa5ac7 make set-agent-image
ran scale based of 4.14 https://docs.google.com/spreadsheets/d/14taH8UGgjiLNqjgCRq66mcNBeNCDCnYEFGsur8Qig9I/edit#gid=2136829211
summary showing increase in ebpf resources
cpuEBPFTotals | cpuEBPFTotals | avg(value) | Fail | 78.57% | 3.405002158 | 6.080411792 |
rssEBPFTotals | rssEBPFTotals | avg(value) | Fail | 53.61% | 3404791063 | 5230041771 |
(pprof) top10 -cum
Showing nodes accounting for 70ms, 3.14% of 2230ms total
Dropped 56 nodes (cum <= 11.15ms)
Showing top 10 nodes out of 92
flat flat% sum% cum cum%
0 0% 0% 1770ms 79.37% github.com/netobserv/netobserv-ebpf-agent/pkg/flow.(*MapTracer).evictFlows
0 0% 0% 1770ms 79.37% github.com/netobserv/netobserv-ebpf-agent/pkg/flow.(*MapTracer).evictionSynchronization
0 0% 0% 1760ms 78.92% github.com/netobserv/netobserv-ebpf-agent/pkg/ebpf.(*FlowFetcher).LookupAndDeleteMap
0 0% 0% 1620ms 72.65% github.com/cilium/ebpf.(*Map).BatchLookupAndDelete (inline)
0 0% 0% 1620ms 72.65% github.com/cilium/ebpf.(*Map).batchLookup
0 0% 0% 1620ms 72.65% github.com/cilium/ebpf.(*Map).batchLookupPerCPU
40ms 1.79% 1.79% 1510ms 67.71% github.com/cilium/ebpf/internal/sysenc.Unmarshal
30ms 1.35% 3.14% 1350ms 60.54% encoding/binary.Read
0 0% 3.14% 1190ms 53.36% github.com/cilium/ebpf.unmarshalBatchPerCPUValue
0 0% 3.14% 1180ms 52.91% github.com/cilium/ebpf.unmarshalPerCPUValue
(pprof)
added bench mark testing for iterate vs batchdelete api
$ go test ./pkg/ebpf/ -exec sudo -bench=BenchmarkFlowFetcher_LookupAndDeleteMap -benchmem -count 5 -run=^#
goos: linux
goarch: amd64
pkg: github.com/netobserv/netobserv-ebpf-agent/pkg/ebpf
cpu: Intel(R) Core(TM) i7-10850H CPU @ 2.70GHz
BenchmarkFlowFetcher_LookupAndDeleteMap/BatchLookupAndDelete-12 403 2507858 ns/op 757583 B/op 2943 allocs/op
BenchmarkFlowFetcher_LookupAndDeleteMap/BatchLookupAndDelete-12 446 2531754 ns/op 746563 B/op 2838 allocs/op
BenchmarkFlowFetcher_LookupAndDeleteMap/BatchLookupAndDelete-12 488 2234317 ns/op 737511 B/op 2753 allocs/op
BenchmarkFlowFetcher_LookupAndDeleteMap/BatchLookupAndDelete-12 526 2209894 ns/op 730663 B/op 2688 allocs/op
BenchmarkFlowFetcher_LookupAndDeleteMap/BatchLookupAndDelete-12 477 2251203 ns/op 739670 B/op 2774 allocs/op
BenchmarkFlowFetcher_LookupAndDeleteMap/IterateLookupAndDelete-12 386 2796254 ns/op 598852 B/op 4355 allocs/op
BenchmarkFlowFetcher_LookupAndDeleteMap/IterateLookupAndDelete-12 345 3105146 ns/op 613746 B/op 4492 allocs/op
BenchmarkFlowFetcher_LookupAndDeleteMap/IterateLookupAndDelete-12 370 2940347 ns/op 604619 B/op 4406 allocs/op
BenchmarkFlowFetcher_LookupAndDeleteMap/IterateLookupAndDelete-12 304 3723941 ns/op 631809 B/op 4664 allocs/op
BenchmarkFlowFetcher_LookupAndDeleteMap/IterateLookupAndDelete-12 326 3699242 ns/op 621145 B/op 4566 allocs/op
PASS
ok github.com/netobserv/netobserv-ebpf-agent/pkg/ebpf 70.103s
started a repro upstream https://github.com/cilium/ebpf/pull/1343
/ok-to-test
New image: quay.io/netobserv/netobserv-ebpf-agent:aafaead
It will expire after two weeks.
To deploy this build, run from the operator repo, assuming the operator is running:
USER=netobserv VERSION=aafaead make set-agent-image
after updating cilium to latest performance scale run not promising still https://docs.google.com/spreadsheets/d/1QaUwO841fIWUiKN8jZ4_d-c0Wpr3WykWEHmNuI1g3l8/edit#gid=1878323530
while benchmark showing better performance
go test ./pkg/ebpf/ -exec sudo -bench=BenchmarkFlowFetcher_LookupAndDeleteMap -benchmem -run=XXX
goos: linux
goarch: amd64
pkg: github.com/netobserv/netobserv-ebpf-agent/pkg/ebpf
cpu: Intel(R) Core(TM) i7-10850H CPU @ 2.70GHz
BenchmarkFlowFetcher_LookupAndDeleteMap/BatchLookupAndDelete-12 1212 944542 ns/op 642167 B/op 1849 allocs/op
BenchmarkFlowFetcher_LookupAndDeleteMap/IterateLookupAndDelete-12 942 1196901 ns/op 478780 B/op 3214 allocs/op
PASS
ok github.com/netobserv/netobserv-ebpf-agent/pkg/ebpf 7.538s
/ok-to-test
New image: quay.io/netobserv/netobserv-ebpf-agent:baad512
It will expire after two weeks.
To deploy this build, run from the operator repo, assuming the operator is running:
USER=netobserv VERSION=baad512 make set-agent-image
@msherif1234: This pull request references NETOBSERV-1550 which is a valid jira issue.
Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.16.0" version, but no target version was set.
@msherif1234 I've created a new jira for this PR, NETOBSERV-1550, and the former is used for not-batched LookupAndDelete with my PR https://github.com/netobserv/netobserv-ebpf-agent/pull/283
/ok-to-test
/ok-to-test
Attention: Patch coverage is 0%
with 90 lines
in your changes are missing coverage. Please review.
Project coverage is 33.44%. Comparing base (
b63f483
) to head (edd8134
). Report is 1 commits behind head on main.:exclamation: Current head edd8134 differs from pull request most recent head 5fdf081. Consider uploading reports for the commit 5fdf081 to get more accurate results
Files | Patch % | Lines |
---|---|---|
pkg/ebpf/tracer_batchapis.go | 0.00% | 57 Missing :warning: |
pkg/ebpf/tracer.go | 0.00% | 33 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
/ok-to-test
New image: quay.io/netobserv/netobserv-ebpf-agent:f8e7e13
It will expire after two weeks.
To deploy this build, run from the operator repo, assuming the operator is running:
USER=netobserv VERSION=f8e7e13 make set-agent-image
I will close this PR as it never shows any real value switching to batchAPIs vs what we have today should we ever reconsider we can reopen it
Description
cilium recently added batchAPI support for PerCPU maps this PR to migrate ebpf agent to use batchapis
https://github.com/cilium/ebpf/discussions/1315
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.