Change the way to handle perf script output from in-memory handling t… #38
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Testing Min’s Fix (#intel#1002)
To reduce the memory footprint when processing perf script output, data is now read as a stream, on an as-needed basis, rather than loading the entire dataset into memory.
Overview
A significant memory optimization was rolled out on October 26, 2025, for the gprofiler_agent, addressing long-standing memory spikes observed during processing of perf script output. This document summarizes the implemented change, results observed post-deployment, and evidence from monitoring dashboards.
Deployed: October 26, 2025 (cherry-picked and rolled out to production)
Deployment:
Agent side : Cherry picked Min’s changes and merged with gprofiler-agent code of pinterest/gprofiler.
Gprofiler-Build :Created a branch out of master and used this branch to trigger a build.
Triggered a build using jenkins and deployed gprofiler-agent on different Machines (on test environment)
Memory usage before and after the fix was tracked using our internal dashboards for the gprofiler_agent.
Before the Fix (October 24) - 2025-10-24 17:22:49
Frequent spikes and high volatility in memory usage.
Sawtooth patterns and overall increasing memory allocations.
After the Fix (Post-October 26) - 025-10-26 06:59:47
Memory usage is now stable and flat.