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

Reduce memory consumption of the meta backup procedure #4455

Closed
polyrabbit opened this issue Mar 6, 2024 · 3 comments · Fixed by #4481
Closed

Reduce memory consumption of the meta backup procedure #4455

polyrabbit opened this issue Mar 6, 2024 · 3 comments · Fixed by #4481
Labels
kind/feature New feature or request

Comments

@polyrabbit
Copy link
Contributor

polyrabbit commented Mar 6, 2024

What would you like to be added:

Refine code of meta backup procedure, so it won't load everything into memory and marshal all at once into json.

Why is this needed:

OOM happens when backing up ~20 million inodes in a 5GiB memory mount pod.

We can setup a dedicated large container to do the backup, but it's not a good solution - still hoping the code can do some streaming.

Version: 1.1
Meta Engine: redis

@polyrabbit polyrabbit added the kind/feature New feature or request label Mar 6, 2024
@SandyXSD
Copy link
Contributor

SandyXSD commented Mar 7, 2024

Already fixed in the main branch by #4253 .

@polyrabbit
Copy link
Contributor Author

Just did a quick test using juicefs dump. It seems the issue still exists:

image

And here is the heap profiling data: pprof.alloc_objects.alloc_space.inuse_objects.inuse_space.005.pb.gz

@davies
Copy link
Contributor

davies commented Mar 11, 2024

@polyrabbit I can't reproduce his behavior with 10 millions of files generated by juicefs mdtest. Is there a huge directory with tens of millions of files in your case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants