-
Notifications
You must be signed in to change notification settings - Fork 156
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
Return zst Decoder to sync.pool when finished #770
base: master
Are you sure you want to change the base?
Conversation
defered close for dec was broken due to shadowed variable so removed. Added defer close in the go func that calls cache.Put With this change we can handle higher load on the server without crash due GOMAXPROCS.
…estream Writes This is an alternative fix to buchgr#770. Thanks to Thorbjorn Larsson @tobbe76 for reporting this issue.
Hi, thanks for the fix- out of curiosity, how did you find this? I wonder if there's a better linter I could be using here. I propose that we fix this in a slightly different way (see #771) which covers more cases than this PR- in particular, if the |
Thanks @mostynb I'm a golang beginner took a while to understand the sync.pool. I used http://remote/debug/pprof/heap on the live server and found a huge total count for this object. bazel-remote/cache/disk/casblob/casblob.go Line 580 in e83828a
I have added a sync pool here also and tested it locally with good results but not yet tested on the production server. What do you think, is it a good idea? Why do a fsync here? It's not good for ssd performance. bazel-remote/cache/disk/casblob/casblob.go Line 637 in e83828a
|
Sounds good- do you want to open a new PR for that?
That is done to reduce the chance of cache corruption. I think this is most important for action cache entries which can't be verified by their hash and large/compressed CAS blobs which would be costly to verify. |
zstd Decoder was not returned to sync.pool so a new instance was allocated each time. This reduced performance.
We can now handle higher loads on the bazel-remote server.