-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
util/growstack: increase stack growth for 1.19 #88187
Conversation
Now that we've adopted go 1.19, we notice that the performance is much worse (~8%) than we observed in go 1.18. Interestingly, we observe in profiles that we spend a lot more time increasing our stack size underneath request evaluation. This implied to me that some part of this is probably due to the runtime's new stack growth behavior. Perhaps what is going on is that the initial stacks are now smaller than they used to be so when we grow it, we grow it by less than we need to. I ran a benchmark that seems to indicate that this theory is true. I'd like to merge this to master and then backport it after we collect some more data. We never released this, so no note. Touches cockroachdb#88038 Release note: None
I'm running a benchmark, I'll report the results when it finishes. |
I'm pretty sure this is it. The profiles showed a clear difference and the difference in throughput here with this configuration is undeniable. The benchmark was https://gist.github.com/ajwerner/43e8b48645a9ade337d7cd654a58de0e with |
TFTR! bors r=nvanbenschoten |
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.
Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @ajwerner)
pkg/util/growstack/growstack.s
line 13 at r1 (raw file):
#include "funcdata.h" TEXT ·Grow(SB),0,$32768-0
nit: we should adjust the comments in growstack.go
according to the new 32KiB value.
I'll do it in the backport and another PR |
Build failed (retrying...): |
Build succeeded: |
Now that we've adopted go 1.19, we notice that the performance is much worse (~8%) than we observed in go 1.18. Interestingly, we observe in profiles that we spend a lot more time increasing our stack size underneath request evaluation. This implied to me that some part of this is probably due to the runtime's new stack growth behavior. Perhaps what is going on is that the initial stacks are now smaller than they used to be so when we grow it, we grow it by less than we need to. I ran a benchmark that seems to indicate that this theory is true. I'd like to merge this to master and then backport it after we collect some more data.
We never released this, so no note.
Touches #88038
Release note: None