-
Notifications
You must be signed in to change notification settings - Fork 440
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
add zstd compression #134
Comments
this is a big feature since for really large tables with big text fields - compression speed is the bottleneck - zstd would be super helpful with this or better yet might be an option that allows users to choose their own program to pipe SQL through to perform whatever alterations they choose - which could include zstd |
It's quite easy to implement actually. I have it working with zstd 1.4.4 by adding the zstd zlib wrapper. You only have to replace the include for zlib with the wrapper, and include the wrapper files and some headers. Only thing needed then is to replace all I am now testing it with a 1.9TB database and zstd compression level 11, to see if it works properly. However, I am in no way a really experienced C dev or anything related to mysql. So I will upload it to a repo later, for those who want to build it themselves. Since I don't change anything in the actual code of mydumper I expect it to just work, but I cannot guarantee it in any way. Update |
@peterdk I'd love to see what you did to make the zlib zstd wrapper work, even in an unpolished state. Seem to be gzip-bound dumping TBs, and it didn't end up trivial for me use the the wrapper, probably because of my unfamiliarity with cmake. |
I'll look if I can make a dump or instruction. It turned out that
multithreaded zstd did corrupt the data, but single threaded works fine and
is faster then gzip for sure.
Op za 15 aug. 2020 09:22 schreef Randall Farmer <notifications@github.com>:
… @peterdk <https://github.com/peterdk> I'd love to see what you did to
make the zlib zstd wrapper work, even in an unpolished state. Seem to be
gzip-bound dumping TBs, and it didn't end up trivial for me use the the
wrapper, probably because of my unfamiliarity with cmake.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#134 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFDCZ6AQEMOYYTFRR7SIATSAYZTBANCNFSM4FAWR2NQ>
.
|
OK, I managed to do this, but not in the best way or even close. I just worked around I needed to link against libzstd.a from a local zstd build, not In case it helps anybody, the steps were:
So I ended up building mydumper with: Just substituting in 'loader' gets you myloader. (Edited to add: slightly easier to |
(FYI, my comments about zlibwrapper requiring you to link in |
As you can see in #336, I had implemented zstd compression. I'm still working on that, but it will be hopefully released in v0.11.3, but we have to decide what is the best path to complete the implementation of this feature. I'm open to hear any comments, ideas, suggestion, anything! meanwhile, this is the plan that I thought:
So, what we are going to do, is replace zlib with zstd, as I was not able to make both live together. |
https://github.com/facebook/zstd
The text was updated successfully, but these errors were encountered: