Skip to content

Commit

Permalink
profiling: use debug=1 for goroutine profile to avoid STW (#1614)
Browse files Browse the repository at this point in the history
* use debug=2 for goroutines

* add comment

---------

Co-authored-by: Yexiang Zhang <[email protected]>
Co-authored-by: Sparkle <[email protected]>
  • Loading branch information
3 people authored Dec 14, 2023
1 parent 5aec71c commit f13291e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/apiserver/profiling/pprof.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ func (f *fetcher) FetchAndWriteToFile(duration uint, fileNameWithoutExt string,
fileExtenstion = "*.proto"
}
case ProfilingTypeGoroutine:
url = "/debug/pprof/goroutine?debug=2"
// debug=2 causes STW when collecting the stacks. See https://github.com/pingcap/tidb/issues/48695.
url = "/debug/pprof/goroutine?debug=1"
profilingRawDataType = RawDataTypeText
fileExtenstion = "*.txt"
case ProfilingTypeMutex:
Expand Down

0 comments on commit f13291e

Please sign in to comment.