-
Notifications
You must be signed in to change notification settings - Fork 351
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
filters/auth: release tokeninfo cache mutex earlier #3241
Merged
AlexanderYastrebov
merged 2 commits into
master
from
filters/auth/tokeninfocache-release-mutex-early
Sep 20, 2024
Merged
filters/auth: release tokeninfo cache mutex earlier #3241
AlexanderYastrebov
merged 2 commits into
master
from
filters/auth/tokeninfocache-release-mutex-early
Sep 20, 2024
Conversation
This file contains 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
Signed-off-by: Alexander Yastrebov <[email protected]>
AlexanderYastrebov
added
the
major
moderate risk, for example new API, small filter changes that have no risk like refactoring or logs
label
Sep 20, 2024
Cached value is readonly so release cache mutex early to copy and adjust cached value outside of critical section. ``` goos: linux goarch: amd64 pkg: github.com/zalando/skipper/filters/auth cpu: Intel(R) Core(TM) i5-8350U CPU @ 1.70GHz │ HEAD~1 │ HEAD │ │ sec/op │ sec/op vs base │ TokeninfoCache/tokens=1,cacheSize=1,p=0-8 639.4n ± 21% 271.9n ± 6% -57.48% (p=0.000 n=10) TokeninfoCache/tokens=2,cacheSize=2,p=0-8 625.7n ± 24% 420.4n ± 32% -32.81% (p=0.000 n=10) TokeninfoCache/tokens=100,cacheSize=100,p=0-8 869.8n ± 17% 463.4n ± 3% -46.72% (p=0.000 n=10) TokeninfoCache/tokens=100,cacheSize=100,p=10000-8 670.8n ± 12% 594.6n ± 2% -11.36% (p=0.000 n=10) TokeninfoCache/tokens=4,cacheSize=2,p=0-8 2.553m ± 1% 2.554m ± 1% ~ (p=0.684 n=10) TokeninfoCache/tokens=100,cacheSize=10,p=0-8 2.581m ± 1% 2.566m ± 0% ~ (p=0.089 n=10) geomean 10.74µ 7.688µ -28.44% │ HEAD~1 │ HEAD │ │ B/op │ B/op vs base │ TokeninfoCache/tokens=1,cacheSize=1,p=0-8 344.0 ± 0% 344.0 ± 0% ~ (p=1.000 n=10) ¹ TokeninfoCache/tokens=2,cacheSize=2,p=0-8 344.0 ± 0% 344.0 ± 0% ~ (p=1.000 n=10) ¹ TokeninfoCache/tokens=100,cacheSize=100,p=0-8 344.0 ± 0% 344.0 ± 0% ~ (p=1.000 n=10) ¹ TokeninfoCache/tokens=100,cacheSize=100,p=10000-8 366.0 ± 0% 366.0 ± 1% ~ (p=0.452 n=10) TokeninfoCache/tokens=4,cacheSize=2,p=0-8 27.00 ± 4% 27.00 ± 0% ~ (p=0.474 n=10) TokeninfoCache/tokens=100,cacheSize=10,p=0-8 28.00 ± 7% 27.00 ± 7% ~ (p=0.259 n=10) geomean 149.7 148.8 -0.60% ¹ all samples are equal │ HEAD~1 │ HEAD │ │ allocs/op │ allocs/op vs base │ TokeninfoCache/tokens=1,cacheSize=1,p=0-8 3.000 ± 0% 3.000 ± 0% ~ (p=1.000 n=10) ¹ TokeninfoCache/tokens=2,cacheSize=2,p=0-8 3.000 ± 0% 3.000 ± 0% ~ (p=1.000 n=10) ¹ TokeninfoCache/tokens=100,cacheSize=100,p=0-8 3.000 ± 0% 3.000 ± 0% ~ (p=1.000 n=10) ¹ TokeninfoCache/tokens=100,cacheSize=100,p=10000-8 3.000 ± 0% 3.000 ± 0% ~ (p=1.000 n=10) ¹ TokeninfoCache/tokens=4,cacheSize=2,p=0-8 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ TokeninfoCache/tokens=100,cacheSize=10,p=0-8 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ geomean ² +0.00% ² ¹ all samples are equal ² summaries must be >0 to compute geomean ``` Signed-off-by: Alexander Yastrebov <[email protected]>
AlexanderYastrebov
force-pushed
the
filters/auth/tokeninfocache-release-mutex-early
branch
from
September 20, 2024 15:38
a3fb874
to
f3088ac
Compare
👍 |
AlexanderYastrebov
changed the title
Filters/auth/tokeninfocache release mutex early
filters/auth: release tokeninfo cache mutex earlier
Sep 20, 2024
👍 |
AlexanderYastrebov
deleted the
filters/auth/tokeninfocache-release-mutex-early
branch
September 20, 2024 17:33
RomanZavodskikh
pushed a commit
to zalando-incubator/kubernetes-on-aws
that referenced
this pull request
Sep 25, 2024
+ zalando/skipper#3227 + zalando/skipper#3225 + zalando/skipper#3234 + zalando/skipper#3239 + zalando/skipper#3240 + zalando/skipper#3241 + zalando/skipper#3242 + zalando/skipper#3245 + zalando/skipper#3246 + zalando/skipper#3247 + zalando/skipper#3249 + zalando/skipper#3248 FYI zalando/skipper@v0.21.198...v0.21.208 Signed-off-by: Roman Zavodskikh <[email protected]>
RomanZavodskikh
pushed a commit
to zalando-incubator/kubernetes-on-aws
that referenced
this pull request
Sep 26, 2024
+ zalando/skipper#3227 + zalando/skipper#3225 + zalando/skipper#3234 + zalando/skipper#3239 + zalando/skipper#3240 + zalando/skipper#3241 + zalando/skipper#3242 + zalando/skipper#3245 + zalando/skipper#3246 + zalando/skipper#3247 + zalando/skipper#3249 + zalando/skipper#3248 FYI zalando/skipper@v0.21.198...v0.21.208 Signed-off-by: Roman Zavodskikh <[email protected]>
RomanZavodskikh
pushed a commit
to zalando-incubator/kubernetes-on-aws
that referenced
this pull request
Sep 30, 2024
+ zalando/skipper#3227 + zalando/skipper#3225 + zalando/skipper#3234 + zalando/skipper#3239 + zalando/skipper#3240 + zalando/skipper#3241 + zalando/skipper#3242 + zalando/skipper#3245 + zalando/skipper#3246 + zalando/skipper#3247 + zalando/skipper#3249 + zalando/skipper#3248 FYI zalando/skipper@v0.21.198...v0.21.208 canary was updated #8214 Signed-off-by: Roman Zavodskikh <[email protected]>
Pushpalanka
pushed a commit
that referenced
this pull request
Oct 11, 2024
* filters/auth: reset parallelism for BenchmarkTokeninfoCache Signed-off-by: Alexander Yastrebov <[email protected]> * filters/auth: release tokeninfo cache mutex earlier Cached value is readonly so release cache mutex early to copy and adjust cached value outside of critical section. ``` goos: linux goarch: amd64 pkg: github.com/zalando/skipper/filters/auth cpu: Intel(R) Core(TM) i5-8350U CPU @ 1.70GHz │ HEAD~1 │ HEAD │ │ sec/op │ sec/op vs base │ TokeninfoCache/tokens=1,cacheSize=1,p=0-8 639.4n ± 21% 271.9n ± 6% -57.48% (p=0.000 n=10) TokeninfoCache/tokens=2,cacheSize=2,p=0-8 625.7n ± 24% 420.4n ± 32% -32.81% (p=0.000 n=10) TokeninfoCache/tokens=100,cacheSize=100,p=0-8 869.8n ± 17% 463.4n ± 3% -46.72% (p=0.000 n=10) TokeninfoCache/tokens=100,cacheSize=100,p=10000-8 670.8n ± 12% 594.6n ± 2% -11.36% (p=0.000 n=10) TokeninfoCache/tokens=4,cacheSize=2,p=0-8 2.553m ± 1% 2.554m ± 1% ~ (p=0.684 n=10) TokeninfoCache/tokens=100,cacheSize=10,p=0-8 2.581m ± 1% 2.566m ± 0% ~ (p=0.089 n=10) geomean 10.74µ 7.688µ -28.44% │ HEAD~1 │ HEAD │ │ B/op │ B/op vs base │ TokeninfoCache/tokens=1,cacheSize=1,p=0-8 344.0 ± 0% 344.0 ± 0% ~ (p=1.000 n=10) ¹ TokeninfoCache/tokens=2,cacheSize=2,p=0-8 344.0 ± 0% 344.0 ± 0% ~ (p=1.000 n=10) ¹ TokeninfoCache/tokens=100,cacheSize=100,p=0-8 344.0 ± 0% 344.0 ± 0% ~ (p=1.000 n=10) ¹ TokeninfoCache/tokens=100,cacheSize=100,p=10000-8 366.0 ± 0% 366.0 ± 1% ~ (p=0.452 n=10) TokeninfoCache/tokens=4,cacheSize=2,p=0-8 27.00 ± 4% 27.00 ± 0% ~ (p=0.474 n=10) TokeninfoCache/tokens=100,cacheSize=10,p=0-8 28.00 ± 7% 27.00 ± 7% ~ (p=0.259 n=10) geomean 149.7 148.8 -0.60% ¹ all samples are equal │ HEAD~1 │ HEAD │ │ allocs/op │ allocs/op vs base │ TokeninfoCache/tokens=1,cacheSize=1,p=0-8 3.000 ± 0% 3.000 ± 0% ~ (p=1.000 n=10) ¹ TokeninfoCache/tokens=2,cacheSize=2,p=0-8 3.000 ± 0% 3.000 ± 0% ~ (p=1.000 n=10) ¹ TokeninfoCache/tokens=100,cacheSize=100,p=0-8 3.000 ± 0% 3.000 ± 0% ~ (p=1.000 n=10) ¹ TokeninfoCache/tokens=100,cacheSize=100,p=10000-8 3.000 ± 0% 3.000 ± 0% ~ (p=1.000 n=10) ¹ TokeninfoCache/tokens=4,cacheSize=2,p=0-8 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ TokeninfoCache/tokens=100,cacheSize=10,p=0-8 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ geomean ² +0.00% ² ¹ all samples are equal ² summaries must be >0 to compute geomean ``` Signed-off-by: Alexander Yastrebov <[email protected]> --------- Signed-off-by: Alexander Yastrebov <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
major
moderate risk, for example new API, small filter changes that have no risk like refactoring or logs
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.
Cached value is readonly so release cache mutex early to
copy and adjust cached value outside of critical section.