You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/docs/1.10.0/troubleshoot/troubleshooting.md
+35Lines changed: 35 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -76,3 +76,38 @@ By default, Kubernetes uses `/usr/libexec/kubernetes/kubelet-plugins/volume/exec
76
76
Some vendors choose to change the directory for various reasons. For example, GKE uses `/home/kubernetes/flexvolume` instead.
77
77
78
78
The correct directory can be found by running `ps aux|grep kubelet` on the host and check the `--volume-plugin-dir` parameter. If there is none, the default `/usr/libexec/kubernetes/kubelet-plugins/volume/exec/` will be used.
79
+
80
+
## Profiling
81
+
82
+
### Engine, replica, and sync agent runtime
83
+
84
+
You can enable the `pprof` server dynamically to perform runtime profiling.
85
+
To enable profiling, you can:
86
+
87
+
1. Shell into the instance manager pod.
88
+
2. Identify the runtime process and its port using `ps`:
89
+
```bash
90
+
$ ps aux | more
91
+
92
+
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
$ /host/var/lib/longhorn/engine-binaries/longhornio-longhorn-engine-v1.10.0/longhorn --url http://localhost:10002 profiler show
103
+
104
+
Profiler enabled at Addr: *:36060
105
+
```
106
+
> The `pprof` server is now accessible at `http://localhost:36060`*inside the instance manager pod*.
107
+
4. Use the `pprof` interface for runtime inspection. For more details, refer to the [official pprof documentation](https://pkg.go.dev/net/http/pprof#hdr-Usage_examples).
108
+
5. Disable the profiler after completing your analysis:
0 commit comments