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

cmd/pprof, runtime/pprof: add stack size profiler #20010

Closed
valyala opened this issue Apr 17, 2017 · 3 comments
Closed

cmd/pprof, runtime/pprof: add stack size profiler #20010

valyala opened this issue Apr 17, 2017 · 3 comments

Comments

@valyala
Copy link
Contributor

@valyala valyala commented Apr 17, 2017

Programs that run millions of concurrent goroutines (i.e. busy web servers, game servers, rpc servers) are usually sensitive to the amount of memory occupied by goroutines' stacks.

For instance, we currently have a web service running up to a million of concurrent goroutines per physical machine. It eats up to 4Gb of stack per machine and it is OK. But when we tried enabling gzip compression the first time, we immediately hit #18625 , that increased per-machine stack usage to more than 40Gb. We couldn't quickly figure out who ate the stack, so resorted to a hack instead of fixing the issue in the compress/flate package.

It would be great to have stack size profiler, which could show stack traces that led to the peak stack usage, so stack hogs could be easily detected and fixed.

@bradfitz
Copy link
Contributor

@bradfitz bradfitz commented Apr 17, 2017

@dAdAbird
Copy link
Contributor

@dAdAbird dAdAbird commented Apr 17, 2017

Dup of #15848

@bradfitz
Copy link
Contributor

@bradfitz bradfitz commented Apr 17, 2017

@dAdAbird, thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.