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

Start with ~10GB genesis.json consume ~150GB of RAM at peaks #1158

Open
alpha-omega-labs opened this issue Sep 10, 2023 · 5 comments
Open

Start with ~10GB genesis.json consume ~150GB of RAM at peaks #1158

alpha-omega-labs opened this issue Sep 10, 2023 · 5 comments

Comments

@alpha-omega-labs
Copy link

Hello,
Start with ~10GB genesis.json consume ~150GB of RAM at peaks and about 80GB after initialization. Is there a way to improve that, maybe cut some checks?
It takes 30min to 10h to finish process.
Thank you

@yihuang
Copy link
Collaborator

yihuang commented Sep 11, 2023

you need to open this to cosmos-sdk, I think there's some streaming json support in newer version.

@alpha-omega-labs
Copy link
Author

Yes, they seems to be working on it for some time with genesis.json streaming.
cosmos/cosmos-sdk#11601
At the moment start of chain from big (not so big, just ~10GB) genesis.json seems to be not possible because or resource usage - ram and CPU. e.g 10GB genesis.json cause up to 200GB ram spikes during initialization and attempts to sign blocks.
Keeping in mind that cronos also have very big state - you might benefit from streaming genesis.json in future too.

@yihuang
Copy link
Collaborator

yihuang commented Sep 19, 2023

I think there's already some streaming support with the collections module: https://github.com/cosmos/cosmos-sdk/blob/main/collections/genesis.go

@alpha-omega-labs
Copy link
Author

Looks like there is no actual way to optimize this, chain, resource wide, cannot be started with .json of big size.

We will rollback on v0.44 and after try to make inplace upgrade to cronos.
Few questions:
Is v0.47 of cronos available? are you going towards v0.5?

Do you have in-place upgrade code or examples for v0.44 to v0.46.15 jump?

Thank you!

@leejw51crypto
Copy link
Contributor

changing to capnproto and flatbuffer would be helpful (not plain text json)
or bson

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