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

doc: explain how to debug performance problems in Go programs #19980

Open
rsc opened this issue Apr 14, 2017 · 7 comments

Comments

@rsc
Copy link
Contributor

commented Apr 14, 2017

We should probably have a doc explaining how to debug performance problems in Go programs. There is the profiling blog post, but a larger survey of the field might be good.

/cc @aclements @alandonovan

@rsc rsc added this to the Go1.9 milestone Apr 14, 2017

@mvdan

This comment has been minimized.

Copy link
Member

commented Apr 14, 2017

Would this be about both pprof and trace?

@dgryski

This comment has been minimized.

Copy link
Contributor

commented Apr 19, 2017

Once upon a time I started https://github.com/dgryski/go-perfbook to collect resources for this.

@kevinburke

This comment has been minimized.

Copy link
Contributor

commented Apr 19, 2017

Happy to contribute https://kev.inburke.com/kevin/real-life-go-benchmarking/ if it's at all helpful.

@smasher164

This comment has been minimized.

Copy link
Member

commented May 9, 2017

I constantly reference examples from this talk: https://github.com/bradfitz/talk-yapc-asia-2015/blob/master/talk.md.

@bradfitz bradfitz modified the milestones: Go1.10, Go1.9 Jun 13, 2017

@rsc rsc modified the milestones: Go1.10, Go1.11 Dec 1, 2017

@dgryski

This comment has been minimized.

Copy link
Contributor

commented Feb 3, 2018

@pciet

This comment has been minimized.

Copy link
Contributor

commented Feb 5, 2018

@dgryski this could use a section on benchmarks. The first Google result for me is @davecheney https://dave.cheney.net/2013/06/30/how-to-write-benchmarks-in-go which I used before and @kevinburke has an article above.

Software testing methodologies help make isolated performance test cases too where those tools become more useful. The right setup is important to get good results. For example, a web server profile will be inaccurate when a test client is running on the same computer without limiting max procs, and virtual servers may compete with other instances on the same machine no matter what you do.

@MikeSpreitzer

This comment has been minimized.

Copy link

commented Mar 13, 2018

https://tip.golang.org/doc/diagnostics.html#profiling is the first place I found that lists all six of the built-in profiles! It would be great if that complete list were in a more central place. It would also be great to have a little more expansive definition of each of those profiles. For example, it wouldn't hurt to emphasize that the "block" profile includes time waiting on empty channels, selects with nothing to do, and so on; that is, time found here is not necessarily a problem, some if it is a symptom of a system eagerly waiting for something to do.

@gopherbot gopherbot modified the milestones: Go1.11, Unplanned May 23, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
9 participants
You can’t perform that action at this time.