Troubleshooting: Generate pprof runtime profiling data

Derek Su | October 18, 2021

Applicable versions

Longhorn >= v1.1.2.

Symptoms

Not able to investigate the longhorn-manager performance bottlenecks from the external state of the longhorn processes.

Solution

To invesigate the longhorn-manager performance bottlenecks, the runtime CPU profiling data can be collected by pprof.

  1. Forward the port 6060 from the longhorn-manager pod to local port 6060:

    kubectl port-forward ${pod-name} -n longhorn-system 6060:6060
    
  2. Collect a 180-second CPU profile:

    wget -O profile.out "http://localhost:6060/debug/pprof/profile?seconds=180"
    
Back to Knowledge Base

© 2019-2021 Longhorn Authors | Documentation Distributed under CC-BY-4.0


© 2021 The Linux Foundation. All rights reserved. The Linux Foundation has registered trademarks and uses trademarks. For a list of trademarks of The Linux Foundation, please see our Trademark Usage page.