Skip to content

Conversation

@ndr-ds
Copy link
Contributor

@ndr-ds ndr-ds commented Sep 6, 2025

Motivation

jemalloc is a more performant allocator (we do see a small performance improvement in benchmarks from it), and if we use it it's easier for us to have memory profiles.

Proposal

This adds support for using jemalloc as an allocator, as well as expose a couple endpoints:

  • One that generates a pprof and returns it once the endpoint is queried
  • One that generates a flamegraph and returns it once the endpoint is queried

Test Plan

Deployed a network with this and the linera-infra changes, saw the memory flamegraphs on Pyroscope, saw the memory profile Grafana dashboard, and managed to curl the flamegraph endpoint and get a memory profile svg returned to me.

Screenshot 2025-09-06 at 02.27.50.png

Release Plan

  • Nothing to do / These changes follow the usual release cycle.

@ndr-ds ndr-ds mentioned this pull request Sep 6, 2025
Copy link
Contributor Author

ndr-ds commented Sep 6, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@ndr-ds ndr-ds force-pushed the 09-03-continuous_memory_profiling branch from 35603d7 to 1675e4f Compare September 6, 2025 05:39
@ndr-ds ndr-ds force-pushed the 09-03-continuous_memory_profiling branch from 1675e4f to ad88597 Compare September 9, 2025 13:29
@ndr-ds ndr-ds force-pushed the 09-03-optimize_rocksdb_prefix_searches branch 2 times, most recently from 2036998 to 4d90ae6 Compare September 10, 2025 14:32
@ndr-ds ndr-ds force-pushed the 09-03-continuous_memory_profiling branch from ad88597 to 38ab4bf Compare September 10, 2025 14:32
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