Skip to content
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

A lot of CPU is wasted zipping one-block files processing historical blocks #54

Open
matthewdarwin opened this issue Aug 15, 2024 · 3 comments

Comments

@matthewdarwin
Copy link

It seems like aa lot of CPU is wasted zipping one-block files. If you're running the RPC poller (or even instrumented binary) at historical blocks reader-node will create .dbin.zst one block files, and within a second the merger will then uncompress all these files.

In this scenario it would be better if the compress/uncompress step was just skipped.

  • allow the merger to read one-block files that are either zipped or not
  • provide command line argument to the reader to be able to tell it not to compress files
@maoueh
Copy link
Contributor

maoueh commented Sep 6, 2024

This make sense indeed.

@matthewdarwin
Copy link
Author

Ok, I can ask @fschoell to work on it.

@fschoell
Copy link
Contributor

fschoell commented Sep 9, 2024

@maoueh should be straightforward to add. I could add a --common-one-block-compression flag accepting either none or zstd (maybe also gzip?).

Not sure about the ideal way to handle the file extension though, as there is a bunch of places connecting to the one block storage. The easiest would be to just have it added by dstore automatically after this: https://github.com/streamingfast/dstore/blob/91345d4a31f280d8c432e595ee5af4b18e76f664/stores.go#L92-L94

That way the file extension would also always be matching the actual compression format which would probably be useful. This would break backwards compatibility though as we would be adding .zst automatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants