Questions tagged [pprof]
pprof is a golang package used to profile various runtime properties of golang's http server.
pprof
140
questions
1
vote
0
answers
23
views
Pprof stuck and for a very long period when target process working heavily
I tried to get pprof of one process running on my ubuntu 22.04 with the command as following:
go tool pprof http://localhost:9091/debug/pprof/profile
well, when the target process running at a light ...
0
votes
0
answers
34
views
Does pprof CPU profiling work for large executable?
I have a customized version of envoy proxy that has a performance problem. I am trying to do CPU profiling using gperftools to identify the root cause. However, the output of 'pprof' has only hex ...
1
vote
0
answers
102
views
Golang Memory Leak: pprof Unable to Locate the Source
Differences among Golang runtime, pprof, and the ps aux command
I found that the results of monitoring Go memory with ps aux, pprof, and the Go runtime package are completely different. Only the Go ...
2
votes
0
answers
79
views
understanding go pprof output
I have an networking application in go, which I am trying to do memory profiling. I periodically generate pprof files by calling pprof.WriteHeapProfile(f), which generates a file mem1.pprof. Then I do:...
1
vote
2
answers
96
views
How to pinpoint a function that is hanging
I have a simple golang program:
package main
import (
"fmt"
"net/http"
_ "net/http/pprof"
"os/exec"
)
func bar() {
// wait 5 seconds
...
5
votes
1
answer
888
views
Golang service running on Kubernetes (EKS) gets OOM killed (high RES memory value, low runtime.Memstats.Alloc value)
I have a Go service that I'm running in Kubernetes (AWS EKS). I'm observing that the RES memory grows to the max resources.limits.memory of 365Mi and gets OOMKilled by Kubernetes. The RES memory grows ...
1
vote
0
answers
67
views
go tool pprof interpretation
I am using list command in go tool pprof to analyse heap profile. On using the list command I am expecting to see lines in source that allocates specified amount of memory. This is how my result looks ...
0
votes
1
answer
63
views
Can I analyze tcmalloc heap profile dump without golang being part of my environment (pprof can't be installed without go)?
Due to certain restrictions I can not have golang as part of my environment. I would like to use the HEAPPROFILE generated by tcmalloc. To the best of my knowledge only way to make it human readable ...
0
votes
1
answer
208
views
Strange pink flame graphs with Google pprof
The "new" flame graph in Google pprof is uniformly pink on my machine (Mac OS 10). Is this supposed to happen? It's not as nice as the old flame graph, so I wonder if something is not ...
-1
votes
1
answer
117
views
how can I run runtime/pprof inside a go program and look at the data inside the same program?
The normal way is to use:
go tool pprof
But my use case is this: I'm using a golang javascript interpreter like https://github.com/robertkrimen/otto or https://github.com/rogchap/v8go
I want to ...
1
vote
0
answers
224
views
go tool pprof: no matches found for regexp
cmd:go tool pprof -alloc_objects main.test memprofile.out
File: main.test
Type: alloc_objects
Time: Aug 16, 2023 at 4:33pm (CST)
Entering interactive mode (type "help" for commands, "o&...
1
vote
0
answers
673
views
Top RES is showing more memory usage than the golang pprof-heap/runtime.MemStats
We have a golang process that internally uses CGO libraries. We are observing OOM kills for this process after some time.
kernel: [322533.632311] Memory cgroup out of memory: Killed process 1895550 (...
0
votes
0
answers
399
views
Golang heapsize remains constant but the allocations are increasing
I have a go microservice for which the resident memory consumption is constantly increasing with number of requests.
I used pprof to determine whether i have any of following scenarios:
increasing ...
3
votes
1
answer
318
views
Interpret pprof cpu profile - which function causes calls to allocSpan in the attached profile
The pprof cpu profile shows user code (on the left) and code from the runtime package with their consumption of cpu time. I am wondering whether it is possible to make the connection between the two ...
0
votes
1
answer
502
views
How can I write go profile to file as it goes?
I am trying to profile a go application and below is the code:
func main() {
defer pprof.StopCPUProfile()
f, err := os.Create("./profile.tar.gz")
if err != nil {
log....