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
hubble: Optimize namespace tracking #26547
hubble: Optimize namespace tracking #26547
Conversation
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 @glibsm!
pkg/hubble/relay/observer/server.go
needs to be adapted accordingly.
Note that after the patch, adding a flow's src/dst namespaces is no longer "atomic" from the namespaceManager
point of view but I don't think that's an issue.
We should back port this to 1.14 since this functionality is new in 1.14 and that memory increase could be viewed as a performance regression. |
Avoiding the use of varargs saves some allocations Before ``` Benchmark_TrackNamespaces-12 5122684 231.8 ns/op 192 B/op 6 allocs/op ``` After ``` Benchmark_TrackNamespaces-12 6114062 187.9 ns/op 168 B/op 4 allocs/op ``` Signed-off-by: Glib Smaga <code@gsmaga.com>
ec5c36c
to
f2ca387
Compare
/test |
Avoiding the use of varargs saves some allocations
Before
After