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

Jemalloc option in README.md #461

Merged
merged 1 commit into from
Jan 12, 2025
Merged

Conversation

alxarno
Copy link
Contributor

@alxarno alxarno commented Jan 10, 2025

Issue

I ran into a problem with constantly growing RSS usage, when processing thousands of images sequentially. I used the MALLOC_ARENA_MAX environment variable, which improved the situation, but after the end of the image processing phase (in my application), a large chunk of memory was left by the process ~1.5GB. I started to investigate why this was happening and came to the conclusion that MALLOC_ARENA_MAX does not completely eliminate memory fragmentation. So I decided to replace the standard allocator in libvips, with jemalloc, which is made for such use cases. As a result, this completely fixed the situation, and minimized RSS usage as much as possible (as if libvips had never been used).

Solution

I think it would be useful to add such a feature to the description so that people don't waste their time researching such problems.

@tonimelisma tonimelisma merged commit 8d9c549 into davidbyttow:master Jan 12, 2025
1 check failed
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

Successfully merging this pull request may close these issues.

2 participants