-
Notifications
You must be signed in to change notification settings - Fork 190
doc(troubleshooting): sync agent profiler usage #1166
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
Conversation
✅ Deploy Preview for longhornio ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
680ccee
to
10b8cde
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some suggestions for your consideration.
Thanks.
### Engine, replica, and sync agent runtime | ||
|
||
Pprof server can be enabled dynamically for runtime profiling. | ||
|
||
To enable profiling, shell into the instance manager pod, and check the port of the runtime using `ps`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
### Engine, replica, and sync agent runtime | |
Pprof server can be enabled dynamically for runtime profiling. | |
To enable profiling, shell into the instance manager pod, and check the port of the runtime using `ps`: | |
### Engine, Replica, and Sync Agent Runtime | |
You can enable the `pprof` server dynamically to perform runtime profiling. | |
To enable profiling, you can: | |
1. Shell into the instance manager pod. | |
2. Identify the runtime process and its port using `ps`: |
--replica tcp://10.42.1.7:10000 --listen 0.0.0.0:10010 | ||
``` | ||
|
||
And assign a port to enable the pprof server for given runtime process: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And assign a port to enable the pprof server for given runtime process: | |
3. Enable the `pprof` server for the desired runtime (for example, sync-agent): | |
> In this example, the sync-agent process listens on port `10002`. |
The pprof server of sync agent (serves at port `10002`) is available at `http://localhost:36060` inside the instance manager pod in the example. Refer to the [pprof official document](https://pkg.go.dev/net/http/pprof#hdr-Usage_examples) for the profiler usage. | ||
|
||
The profiler can be disabled after profiling. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pprof server of sync agent (serves at port `10002`) is available at `http://localhost:36060` inside the instance manager pod in the example. Refer to the [pprof official document](https://pkg.go.dev/net/http/pprof#hdr-Usage_examples) for the profiler usage. | |
The profiler can be disabled after profiling. | |
> The `pprof` server is now accessible at `http://localhost:36060` *inside the instance manager pod*. | |
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). | |
5. Disable the profiler after completing your analysis: |
10b8cde
to
0abe0a9
Compare
longhorn-11386 Signed-off-by: Raphanus Lo <[email protected]>
0abe0a9
to
1be89be
Compare
Which issue(s) this PR fixes:
Issue longhorn/longhorn#11386
What this PR does / why we need it:
Special notes for your reviewer:
Additional documentation or context