-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
chore: switch to pure-go zstd decoder for snapshot imports #12857
Conversation
Thanks for the work here @masih . Quick question: why is there a release/backport label? I believe there is no active release train to backport into. I assume the next release (assuming not a rushed security update) will branch from master. |
Yep, no need to rush this one. I understand the label to mean "please include in the next release". Please let me know if I am misinterpreting the label. |
It means to backport to an existing release candidate. Everything in master will automatically go into the next release unless the release process is already underway. |
I was explicitly explained to that for anything to end up in a release it needs that label. I am also known to missunderstand things at times. Thank you for clarifying this for me, Steven. |
Yeah, I'm guessing the intent of that statement was "if it needs to end up in this release that's currently baking". |
Current lotus to import a mainnet snapshot into a fresh repo:
Same data, this branch:
So .. I'm not really sure what to make of the reduction in real time there (I was doing other things during both of these runs so likely skewed) but we can at least say that (1) the pure-go implementation has to work harder to get the job done, and that (2) the bulk of the cost of snapshot import is almost entirely in Badger so zstd effort isn't really a factor here. |
Related Issues
DataDog/zstd
with the pure-go implementation byklauspost/compress
#12852Proposed Changes
Additional Info
The benchmarking performed as part of #12852 shows that the pure-go implementation of zstd decoder is fast-enough for snapshot import.
Switch to it motivated by the desire to reduce CGO dependencies across Lotus.
Fixes #12852
Checklist
Before you mark the PR ready for review, please make sure that: