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
Improve Hubble decoding performance for drop, debug, policy and tracesock events #25751
Conversation
Commit a67f17db1fe1b26b9a17a2bb29ce25da5d86f9f3 does not contain "Signed-off-by". Please follow instructions provided in https://docs.cilium.io/en/stable/contributing/development/contributing_guide/#developer-s-certificate-of-origin |
a67f17d
to
d6ca50c
Compare
Commit 769eb64476fd5ec1cbb1b464e247d1b357460ebe does not contain "Signed-off-by". Please follow instructions provided in https://docs.cilium.io/en/stable/contributing/development/contributing_guide/#developer-s-certificate-of-origin |
769eb64
to
ce16730
Compare
55e3d12
to
19ce6d2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the patch @Jack-R-lantern! The commit split is great, as are the added benchmark functions 🙏
This Travis-CI failure seems related to the patch (TestDecodeDebugEvent
). Also couple of requests:
- Please do the length check in the "private" functions, i.e. right before indexing
data
- I think in addition the the benchmark we need to have some safeguard unit test around decoding, in case any of the message struct change. See the unit tests added by this PR if you need inspiration.
Thanks for the feedback, I'll make changes based on your feedback and add a new commit |
19ce6d2
to
4f9b422
Compare
4f9b422
to
4389862
Compare
4389862
to
034ea86
Compare
034ea86
to
9af8c7c
Compare
Nit: 11 commits is a little on the high side for these changes. Would you be able to squash them down to one or two logical changes? Otherwise, this will inflate the commit history for no benefit. |
9af8c7c
to
cde2f3d
Compare
@ti-mo I did a rebase and pushed it to a PR. |
/test |
@Jack-R-lantern Thanks! Running tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the patch @Jack-R-lantern, couple of nitpicking on the way but overall LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Looks good to me (besides the things Alex already pointed out)
66b8821
to
a20bbb5
Compare
e9dc98d
to
edca6b5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update @Jack-R-lantern, the patch LGTM.
This commit is to improve decode performance. Due to the performance degradation caused by the reflection of 'binary.Read', added functions for each structure. Signed-off-by: Jack-R-lantern <tjdfkr2421@gmail.com> Co-authored-by: Alexandre Perrin <alex@kaworu.ch>
edca6b5
to
e114a2e
Compare
/test |
Legit failure here in
|
@ldelossa Is there any action I should take? |
I don't think that failure is legitimate. This change here purely affects observability internals and does not impact the datapath, policy engine or K8s connectivity in any way. I think we have discovered a new flake. Edit: I have created #26591 to track it. Edit 2: It is suspicious that the error occurred two times in a row, but I really don't see how it could be related. Restarted again. I've also checked the sysdump (you need to go to the latest attempt for that) and don't see anything suspicious in the affected agent logs either. I think we have a race in the agent where it tries to fetch CiliumNetworkPolicies before they are ready, but again, that is unrelated to the changes in this PR. Edit 3: Third time's the charm. That CI pipeline is green now ✔️ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Please ensure your pull request adheres to the following guidelines:
description and a
Fixes: #XXX
line if the commit addresses a particularGitHub issue.
Fixes: <commit-id>
tag, thenplease add the commit author[s] as reviewer[s] to this issue.
I implemented the function by referencing #24162.
reduced CPU usage.
DecodeDropNotify Benchmark Result
DecodePolicyVerdictNotify
DecodeDebugCapture/DecodeDebugMsg
DecodeTraceSockNotify
Fixes: #25657