Skip to content

Add collect_heap_pprofs.sh script for easier collection of heap profiles#2160

Merged
ddelnano merged 3 commits intopixie-io:mainfrom
ddelnano:ddelnano/update-heap-scripts-for-easier-use
Mar 29, 2025
Merged

Add collect_heap_pprofs.sh script for easier collection of heap profiles#2160
ddelnano merged 3 commits intopixie-io:mainfrom
ddelnano:ddelnano/update-heap-scripts-for-easier-use

Conversation

@ddelnano
Copy link
Copy Markdown
Member

Summary: Add collect_heap_pprofs.sh script for easier collection of heap profiles

I've been profiling PEM memory usage often. The existing script was difficult to use when collecting profiles across an entire cluster -- the download_heap_prof_mapped_files.sh script hard codes a file path causing each profile to overwrite the previously downloaded one.

This new script orchestrates collecting the heap profiles via the px cli and uses a modified version of the download_heap_prof_mapped_files.sh to collect the memory mapped files.

Relevant Issues: N/A

Type of change: /kind cleanup

Test Plan: Script runs successfully on cluster with 9 nodes and pprof command printed to console works

$ ./scripts/collect_heap_pprofs.sh heap_capture <vizier_id> --project=<gcp_project>

$ PPROF_BINARY_PATH=heap_capture/gke-csmc-new--csmc-node-pool-c67a9bcf-v31i pprof -http=localhost:8888 heap_capture/gke-csmc-new--csmc-node-pool-c67a9bcf-v31i.txt
Serving web UI on http://localhost:8888
[1651124:1651124:0328/060122.987270:ERROR:ozone_platform_x11.cc(244)] Missing X server or $DISPLAY
[1651124:1651124:0328/060122.987541:ERROR:env.cc(258)] The platform failed to initialize.  Exiting.

Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
@ddelnano ddelnano requested review from a team as code owners March 28, 2025 06:04
Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
Comment thread scripts/download_heap_prof_mapped_files.sh
Comment thread scripts/download_heap_prof_mapped_files.sh Outdated
Comment thread scripts/collect_heap_pprofs.sh Outdated
Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
@ddelnano ddelnano merged commit 93cf09f into pixie-io:main Mar 29, 2025
20 checks passed
ddelnano added a commit to ddelnano/pixie that referenced this pull request Aug 6, 2025
ddelnano added a commit to k8sstormcenter/pixie that referenced this pull request Feb 25, 2026
ddelnano added a commit to k8sstormcenter/pixie that referenced this pull request Feb 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants