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

[FEATURE] Enable resource profiling for IM #6377

Closed
innobead opened this issue Jul 24, 2023 · 7 comments
Closed

[FEATURE] Enable resource profiling for IM #6377

innobead opened this issue Jul 24, 2023 · 7 comments
Assignees
Labels
area/troubleshoot Troubleshoot related component/longhorn-instance-manager Longhorn instance manager (interface between control and data plane) priority/1 Highly recommended to fix in this release (managed by PO)
Milestone

Comments

@innobead
Copy link
Member

          > How many bad backups is it?

168

Would it be interesting to take a look at profiling data to determine which part of the controller is eating CPU? https://longhorn.io/kb/troubleshooting-generate-pprof-runtime-profiling-data/

This will definitely be useful to me going forward. Thanks for the call out. However, it looks like most of the CPU is eaten up by instance-manager, which we don't appear to have enabled pprof for.

Originally posted by @ejweber in #6358 (comment)

@innobead
Copy link
Member Author

Even though IM is system managed pod by Longhorn, but it still deserves profiling at runtime.

@innobead innobead added this to the v1.6.0 milestone Jul 24, 2023
@innobead innobead added component/longhorn-instance-manager Longhorn instance manager (interface between control and data plane) priority/2 Nice to fix in this release (managed by PO) area/troubleshoot Troubleshoot related labels Jul 24, 2023
@shuo-wu
Copy link
Contributor

shuo-wu commented Jul 25, 2023

One quick question, does this mean that we need a HTTP server inside IM pod for pprof?

@innobead
Copy link
Member Author

It seems @Vicente-Cheng is working on this.

@innobead innobead added priority/1 Highly recommended to fix in this release (managed by PO) and removed priority/2 Nice to fix in this release (managed by PO) labels Sep 14, 2023
@Vicente-Cheng
Copy link

Maybe we could make it related to #6282
These would be similar.

@innobead
Copy link
Member Author

@derekbit is working on it.

@longhorn-io-github-bot
Copy link

longhorn-io-github-bot commented Nov 13, 2023

Pre Ready-For-Testing Checklist

  • Where is the reproduce steps/test steps documented?
    The reproduce steps/test steps are at:

  • Does the PR include the explanation for the fix or the feature?

  • Have the backend code been merged (Manager, Engine, Instance Manager, BackupStore etc) (including backport-needed/*)?
    The PR is at

longhorn/longhorn-instance-manager#307

  • Which areas/issues this PR might have potential impacts on?
    Area: profiling
    Issues

@innobead innobead modified the milestones: v1.6.0, v1.7.0 Nov 29, 2023
@innobead innobead modified the milestones: v1.7.0, v1.6.0 Dec 27, 2023
@roger-ryao
Copy link

Verified on master-head 20231229

The test steps

  1. Forward the port 6060 from the instance-manager pod to local port 6060:
    kubectl port-forward ${instance-manager-pod-name} -n longhorn-system 6060:6060
    
  2. see the pprof debug web page: http://localhost:6060/debug/pprof/

Result Passed

  1. pprof service works as expected.

Screenshot_20231229_114532

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/troubleshoot Troubleshoot related component/longhorn-instance-manager Longhorn instance manager (interface between control and data plane) priority/1 Highly recommended to fix in this release (managed by PO)
Projects
None yet
Development

No branches or pull requests

7 participants