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

cli: disable block profiling by default #48133

Merged
merged 1 commit into from Apr 29, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 5 additions & 2 deletions pkg/cli/start.go
Expand Up @@ -280,8 +280,11 @@ func initBlockProfile() {
// will sample one event per X nanoseconds spent blocking.
//
// The block profile can be viewed with `pprof http://HOST:PORT/debug/pprof/block`
d := envutil.EnvOrDefaultInt64("COCKROACH_BLOCK_PROFILE_RATE",
10000000 /* 1 sample per 10 milliseconds spent blocking */)
//
// The utility of the block profile (aka blocking profile) has diminished
// with the advent of the mutex profile. We currently leave the block profile
// disabled by default as it has a non-zero performance impact.
d := envutil.EnvOrDefaultInt64("COCKROACH_BLOCK_PROFILE_RATE", 0)
runtime.SetBlockProfileRate(int(d))
}

Expand Down