mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-07 03:03:59 +00:00
Add info about contention profiling to profiling.md
This commit is contained in:
parent
e81d9abcac
commit
f6ace4dd83
@ -23,8 +23,12 @@ Even when running profiler I found not really straightforward to use 'go tool pp
|
|||||||
```
|
```
|
||||||
ssh kubernetes_master -L<local_port>:localhost:8080
|
ssh kubernetes_master -L<local_port>:localhost:8080
|
||||||
```
|
```
|
||||||
or analogous one for you Cloud provider. Afterwards you can e.g. run
|
or analogous one for you Cloud provider. Afterwards you can e.g. run
|
||||||
```
|
```
|
||||||
go tool pprof http://localhost:<local_port>/debug/pprof/profile
|
go tool pprof http://localhost:<local_port>/debug/pprof/profile
|
||||||
```
|
```
|
||||||
to get 30 sec. CPU profile.
|
to get 30 sec. CPU profile.
|
||||||
|
|
||||||
|
## Contention profiling
|
||||||
|
|
||||||
|
To enable contetion profiling you need to add line ```rt.SetBlockProfileRate(1)``` to ones added before (```rt``` stands for ```runtime``` in ```master.go```). This enables 'debug/pprof/block' subpage, which can be used as an input go to ```go tool pprof```.
|
||||||
|
Loading…
Reference in New Issue
Block a user