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

High memory consumption using parquet encoder #9

Open
coutug opened this issue Nov 12, 2024 · 2 comments
Open

High memory consumption using parquet encoder #9

coutug opened this issue Nov 12, 2024 · 2 comments

Comments

@coutug
Copy link

coutug commented Nov 12, 2024

Using the feature/parquet branch, I get really high memory usage from running this configuration:

substreams-sink-files run \
eos.substreams.pinax.network:443 \
https://github.com/pinax-network/substreams-antelope-tokens/releases/download/v1.0.0/antelope-tokens-v1.0.0.spkg \
map_events \
s3://pinax/eos?region=us-east-1 \
"2:" --encoder=parquet

This mainly happens running EOS blockchain specificaly when there is already data in the target s3 bucket. If the bucket is create by the process, it runs fine (using around 3Gi of RAM). But if the container gets killed and restarts, the memory consumption steadily starts to climb up, as shown in the image below.

image

@maoueh
Copy link
Contributor

maoueh commented Nov 12, 2024

The bundle of a segment is all done in memory, so that is expected right now. I haven't implemented scratch space to put data on disk and limit memory for now.

Workaround if too bit currently is to reduce blocks per bundle and perform merging of "parquet bundle" off process.

@coutug
Copy link
Author

coutug commented Nov 13, 2024

Thank you for the quick answer. After further investigation, the problem was related to the cursor file being lost on container restart since I was not using a persistent volume. I am not sure why this use case was causing some sort of memory leak. I would have expect the process to simply start back at the start block.

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

2 participants