istio / ztunnel

The `ztunnel` component of ambient mesh
Apache License 2.0
296 stars 100 forks source link

Enhance ztunnel heap instrumentation #863

Open bleggett opened 7 months ago

bleggett commented 7 months ago

Right now ztunnel exposes gperftools endpoints for both profiles and heaps, as well as a standard pprof profile.

ATM the gperftools endpoints don't work very well, or at all.

We should probably consolidate on 1 profiler and one heap dumper, and make sure they both work - whether that's gperftools or something else (jemalloc was mentioned).

Whatever we DO pick needs to work equally well on arm64 and amd64, and needs to support remote analysis, ideally.

howardjohn commented 7 months ago

https://github.com/polarsignals/rust-jemalloc-pprof or https://github.com/mkmik/heappy/ seem viable.

Prototype with heappy: https://github.com/howardjohn/ztunnel/pull/new/exp/heappy

bleggett commented 7 months ago

Yep, using https://github.com/polarsignals/rust-jemalloc-pprof, seems to work well enough.

ilrudie commented 7 months ago

should https://github.com/istio/ztunnel/pull/865 close this one out?

bleggett commented 7 months ago

@ilrudie In https://github.com/istio/ztunnel/pull/865 we discussed using jemalloc as an always-on thing, or at least enabled by default for non-release builds.

I added that as another ticket item here, so we can keep this open for that.

daixiang0 commented 6 months ago

seems the second task has be completed, maybe we can close it.