-
Notifications
You must be signed in to change notification settings - Fork 101
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
Conversation
Signed-off-by: Benjamin Leggett <benjamin.leggett@solo.io>
af16112
to
10d19a6
Compare
@@ -6,7 +6,7 @@ rust-version = "1.65" | |||
|
|||
[features] | |||
default = ["tls-ring"] | |||
gperftools = ["dep:gperftools"] | |||
jemalloc = ["dep:tikv-jemallocator", "dep:jemalloc_pprof"] |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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(); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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>
Signed-off-by: Benjamin Leggett <benjamin.leggett@solo.io>
Signed-off-by: Benjamin Leggett <benjamin.leggett@solo.io>
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