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

[C++][Python] Expose method for benchmarking tools to release unused memory from the allocators #28340

Closed
asfimport opened this issue Apr 28, 2021 · 2 comments

Comments

@asfimport
Copy link

A team working on Arrow benchmarks encountered a problem where the mimalloc allocator was holding onto considerably more RAM than needed (at least 6GB and potentially more).

Mimalloc offers the mi_collect non-standard API which forces mimalloc to release unused pages to the OS.  We could expose this to be called by benchmarking tools to get consistent results and reduce the amount of RAM needed.

Reporter: Weston Pace / @westonpace
Assignee: Weston Pace / @westonpace

PRs and other links:

Note: This issue was originally created as ARROW-12584. Please see the migration documentation for further details.

@asfimport
Copy link
Author

David Li / @lidavidm:
jemalloc isn't under question here, but it can have similar behaviors and offers a similar call to drop all unused memory, if we ever run into issues.


arena.<i>.decay (void) --
    Trigger decay-based purging of unused dirty/muzzy pages for arena <i>, or for all arenas if <i> equals MALLCTL_ARENAS_ALL. The proportion of unused dirty/muzzy pages to be purged depends on the current time; see opt.dirty_decay_ms and opt.muzy_decay_ms for details.

arena.<i>.purge (void) --
    Purge all unused dirty pages for arena <i>, or for all arenas if <i> equals MALLCTL_ARENAS_ALL. 

@asfimport
Copy link
Author

Antoine Pitrou / @pitrou:
Issue resolved by pull request 10186
#10186

@asfimport asfimport added this to the 5.0.0 milestone Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants