Skip to content

Commit

Permalink
README: Further clarify production overhead
Browse files Browse the repository at this point in the history
The previous wording wasn't ideal. The more goroutines are running (or
even parked), the slower sampling will get. I don't actually know for
sure how much goroutines that need async preemption for stopTheWorld()
play into it, so let's not talk about that for now.
  • Loading branch information
felixge committed Jun 26, 2020
1 parent 2b17c88 commit 1c69cbf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -176,7 +176,7 @@ fgprof is implemented as a background goroutine that wakes up 99 times per secon

This data is used to maintain an in-memory stack counter which can be converted to the pprof or folded output format. The meat of the implementation is super simple and < 100 lines of code, you should [check it out](./fgprof.go).

Generally speaking, fgprof should not have a big impact on the performance of your program. However `runtime.GoroutineProfile` calls `stopTheWorld()`, which could be slow if you have a lot of goroutines running in loops without function calls. For now the advise is to test the impact of the profiler on a development environment before running it against production instances. In the future this README will try to provide a more detailed analysis of the performance impact.
Generally speaking, fgprof should not have a big impact on the performance of your program. However `runtime.GoroutineProfile` calls `stopTheWorld()` and could be slow if you have a lot of running goroutines. For now the advise is to test the impact of the profiler on a development environment before running it against production instances. In the future this README will try to provide a more detailed analysis of the performance impact.

### Go's builtin CPU Profiler

Expand Down

0 comments on commit 1c69cbf

Please sign in to comment.