Skip to content

Conversation

@RobKenis
Copy link

@RobKenis RobKenis commented Jan 15, 2025

This allows us to enable the profiler endpoints on both the server and the node agent.
This helps me in troubleshooting the high memory usage when restoring lots of small files.

Refs: #8582

Thank you for contributing to Velero!

Please add a summary of your change

Add --profiler-address option to node agent

Does your change fix a particular issue?

No. But this helps me in understanding #8582

Please indicate you've done the following:

kaovilai
kaovilai previously approved these changes Jan 16, 2025
@codecov
Copy link

codecov bot commented Jan 19, 2025

Codecov Report

Attention: Patch coverage is 0% with 21 lines in your changes missing coverage. Please review.

Project coverage is 60.03%. Comparing base (d889ad3) to head (1f37818).

Files with missing lines Patch % Lines
pkg/cmd/cli/nodeagent/server.go 0.00% 21 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8618      +/-   ##
==========================================
- Coverage   60.06%   60.03%   -0.03%     
==========================================
  Files         378      378              
  Lines       42883    42903      +20     
==========================================
  Hits        25757    25757              
- Misses      15580    15600      +20     
  Partials     1546     1546              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@reasonerjt
Copy link
Contributor

@RobKenis Thanks for the PR, this change looks good to me.

Would you mind adding a changelog to the PR?

@reasonerjt reasonerjt requested review from Lyndon-Li and removed request for blackpiglet and reasonerjt January 20, 2025 03:31
This allows us to enable the profiler endpoints on both the
server and the node agent.
This helps me in troubleshooting the high memory usage when
restoring lots of small files.

Refs: vmware-tanzu#8582

Signed-off-by: Rob Kenis <[email protected]>
@RobKenis
Copy link
Author

@reasonerjt I have added a changelog. The codecov fails, but I don't really see the solution to write tests on the profiler. For the velero server component, I cannot find any related tests to the profiler

Comment on lines +412 to +414
if err := server.ListenAndServe(); err != nil {
s.logger.WithError(errors.WithStack(err)).Error("error running profiler http server")
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no graceful shutdown of the profiler server when s.ctx is cancelled., tho the same can be said about current metrics server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants