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

Remove gperftools, use jemalloc #865

Merged
merged 6 commits into from
Apr 3, 2024

Conversation

bleggett
Copy link
Contributor

@bleggett bleggett commented Apr 2, 2024

Seems to actually work, requires no container deps, keeping as an optional build target for now.

Signed-off-by: Benjamin Leggett benjamin.leggett@solo.io

@bleggett bleggett requested a review from a team as a code owner April 2, 2024 23:17
@istio-testing istio-testing added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Apr 2, 2024
Signed-off-by: Benjamin Leggett <benjamin.leggett@solo.io>
@@ -6,7 +6,7 @@ rust-version = "1.65"

[features]
default = ["tls-ring"]
gperftools = ["dep:gperftools"]
jemalloc = ["dep:tikv-jemallocator", "dep:jemalloc_pprof"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we default to jemalloc? and/or unconditionally use it? or do we think we need more performance testing?

Copy link
Contributor Author

@bleggett bleggett Apr 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now I would rather not, this is just a drop-in replacement for what we had before that works, but we can certainly look into doing that later, yeah.

I think the impact will be minimal tho, I just haven't tried it myself.

src/admin.rs Outdated
async fn handle_jemalloc_pprof_heapgen(_req: Request<Incoming>) -> Response<Full<Bytes>> {
const FILE_PATH: &str = "/tmp/jemalloc-pprof-heap.prof";
// make sure the file exists/is writable before handing to gprof
File::create(FILE_PATH).await.unwrap();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we stream it back instead of file? is the format the "pprof" format that can be read by go tool pprof or some other format?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

go tool pprof - starting a PROFILING.md

Signed-off-by: Benjamin Leggett <benjamin.leggett@solo.io>
@bleggett bleggett requested a review from a team as a code owner April 2, 2024 23:44
Signed-off-by: Benjamin Leggett <benjamin.leggett@solo.io>
Signed-off-by: Benjamin Leggett <benjamin.leggett@solo.io>
Signed-off-by: Benjamin Leggett <benjamin.leggett@solo.io>
Signed-off-by: Benjamin Leggett <benjamin.leggett@solo.io>
@istio-testing istio-testing merged commit cc89867 into istio:master Apr 3, 2024
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants