lnd+config: add ability to obtain blocking and mutex profiles
In this commit, we add the ability to obtain blocking and mutex profiles. The blocking profile will show which goroutines are consistently blocked on synchronization primitives like channels, or I/O. The mutex profile will show which mutexes are very contested. The blocking profile can be enabled with a new arg: `--blockingprofile`. The mutex profile can be enabled with a new arg: `--mutexprofile`. These are both ignored if the profile port isn't set. Activating these profiles requires the caller to pass in a sampling rate. For now I've set it just to `1` to test things out. Unfortunately documentation is rather scarce, so there aren't any good guides re what these values should be set to. AFAICT, these add more overhead than the other prowling options, so they shouldn't necessarily be enabled persistently in production.
This commit is contained in:
4 files changed
+28
No files matched your search
@@ -270,6 +270,18 @@
|
||||
; 65536. The profile can be access at: http://localhost:<PORT>/debug/pprof/.
|
||||
; profile=
|
||||
|
||||
; Enable a blocking profile to be obtained from the profiling port. A blocking
|
||||
; profile can show where goroutines are blocking (stuck on mutexes, I/O, etc).
|
||||
; This takes a value from 0 to 1, with 0 turning off the setting, and 1 sampling
|
||||
; every blocking event (it's a rate value).
|
||||
; blockingprofile=0
|
||||
|
||||
; Enable a mutex profile to be obtained from the profiling port. A mutex
|
||||
; profile can show where goroutines are blocked on mutexes, and which mutexes
|
||||
; have high contention. This takes a value from 0 to 1, with 0 turning off the
|
||||
; setting, and 1 sampling every mutex event (it's a rate value).
|
||||
; mutexprofile=0
|
||||
|
||||
; DEPRECATED: Allows the rpcserver to intentionally disconnect from peers with
|
||||
; open channels. THIS FLAG WILL BE REMOVED IN 0.10.0.
|
||||
; unsafe-disconnect=false
|
||||
|
||||
Reference in new issue
Block a user