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

wrapper around jemalloc to track allocator usage by thread #4336

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

alexpyattaev
Copy link

a simple wrapper around jemalloc to track allocator usage by thread name in metrics.
Idea is to get a better idea why node crashes when OOM occurs (at least which threads were allocating memory).
This is for dev use only.

Problem

If/when agave starts leaking memory (or just clogging up some channel) it may be tricky to find where memory allocations are happening that cause the crash. Tracking per-pool allocations is not a replacement for valgrind, but has the advantage of fairly small overhead & integration into metrics.

Summary of Changes

Added feature-flag gated custom wrapper around jemalloc that tracks memory usage, grouped by thread pool name.

@alexpyattaev alexpyattaev force-pushed the memory_metrics branch 2 times, most recently from 414d8b5 to 0ec36fd Compare January 7, 2025 22:56
@alexpyattaev alexpyattaev force-pushed the memory_metrics branch 2 times, most recently from 34d7de8 to b2ac2f7 Compare January 8, 2025 22:25
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.

1 participant