[release-1.15] istio: improve deep copy for ServiceAttribute#42670
Closed
istio-testing wants to merge 2 commits intoistio:release-1.15from
Closed
[release-1.15] istio: improve deep copy for ServiceAttribute#42670istio-testing wants to merge 2 commits intoistio:release-1.15from
istio-testing wants to merge 2 commits intoistio:release-1.15from
Conversation
added 2 commits
January 4, 2023 21:57
DeepCopy using reflection is super slow, and a big chunk of init push context time is doing deep copy. This is already improved a lot by this PR: istio#37932 (init push context time drop from 1m30s to 40s). ServiceAttribute DeepCopy is still taking more than 10% cpu time, so improving this function can further reduce the init push context time and hence our propagation delay. Benchmark results: (before) goos: darwin goarch: amd64 pkg: istio.io/istio/pilot/pkg/model cpu: Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz BenchmarkServiceDeepCopy BenchmarkServiceDeepCopy-16 132760 8190 ns/op PASS (after) goos: darwin goarch: amd64 pkg: istio.io/istio/pilot/pkg/model cpu: Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz BenchmarkServiceDeepCopy BenchmarkServiceDeepCopy-16 1213035 1019 ns/op PASS Change-Id: Ied3e81d252ccf226bbb8d1d56eb88bff7c146af4 Reviewed-on: https://gerrit.musta.ch/c/public/istio/+/3700 Reviewed-by: Douglas Jordan <douglas.jordan@airbnb.com> Reviewed-by: Weibo He <weibo.he@airbnb.com>
AddressMap contains a mutex which govet complains if we return a copy, ignoring the vet error (behavior is the same as before). Change-Id: If0274e6e1412eb50586ea609a07c302557297ad8 Reviewed-on: https://gerrit.musta.ch/c/public/istio/+/3706 Reviewed-by: Weibo He <weibo.he@airbnb.com>
Member
|
Istio has a cherry-picking policy that only bug fixes and CVE fixes can be cherry-picked. This PR does not appear to meet that criteria. |
Contributor
|
Thanks for providing the cherry-picking policy! This PR (and #42671) are performance improvements. For future reference, are those considered a special case of a bug fix, or are bug fixes limited to functional requirements not working as expected? (Apologies for the delayed reply, forgot to subscribe) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is an automated cherry-pick of #40966